From 1ff35a6b63f9d64ea5f7d78a0022c1fab9c95411 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 06:32:27 -0700 Subject: [PATCH] feat: Release API version v1beta1 (no changes to v1alpha2) (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Release API version v1beta1 (no changes to v1alpha2) PiperOrigin-RevId: 463269555 Source-Link: https://github.com/googleapis/googleapis/commit/5261728f2ee874bc9f14bfecc52e4a178acaf711 Source-Link: https://github.com/googleapis/googleapis-gen/commit/20a9a4c74a41a6f085e40ef5a17416c000c2fc94 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjBhOWE0Yzc0YTQxYTZmMDg1ZTQwZWY1YTE3NDE2YzAwMGMyZmM5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- linkinator.config.json | 5 +- .../cloud/dataform/v1beta1/dataform.proto | 1629 ++ protos/protos.d.ts | 8403 +++++++ protos/protos.js | 19394 ++++++++++++++++ protos/protos.json | 2307 ++ .../dataform.cancel_workflow_invocation.js | 58 + .../dataform.commit_workspace_changes.js | 72 + .../dataform.create_compilation_result.js | 64 + .../v1beta1/dataform.create_repository.js | 70 + .../dataform.create_workflow_invocation.js | 64 + .../v1beta1/dataform.create_workspace.js | 70 + .../v1beta1/dataform.delete_repository.js | 64 + .../dataform.delete_workflow_invocation.js | 58 + .../v1beta1/dataform.delete_workspace.js | 58 + .../v1beta1/dataform.fetch_file_diff.js | 63 + .../dataform.fetch_file_git_statuses.js | 58 + .../dataform.fetch_git_ahead_behind.js | 64 + .../v1beta1/dataform.fetch_remote_branches.js | 58 + .../dataform.get_compilation_result.js | 58 + .../v1beta1/dataform.get_repository.js | 58 + .../dataform.get_workflow_invocation.js | 58 + .../v1beta1/dataform.get_workspace.js | 58 + .../v1beta1/dataform.install_npm_packages.js | 58 + .../dataform.list_compilation_results.js | 74 + .../v1beta1/dataform.list_repositories.js | 84 + .../dataform.list_workflow_invocations.js | 74 + .../v1beta1/dataform.list_workspaces.js | 84 + .../v1beta1/dataform.make_directory.js | 64 + .../v1beta1/dataform.move_directory.js | 70 + .../generated/v1beta1/dataform.move_file.js | 68 + .../v1beta1/dataform.pull_git_commits.js | 69 + .../v1beta1/dataform.push_git_commits.js | 63 + ...taform.query_compilation_result_actions.js | 79 + .../dataform.query_directory_contents.js | 79 + ...aform.query_workflow_invocation_actions.js | 74 + .../generated/v1beta1/dataform.read_file.js | 63 + .../v1beta1/dataform.remove_directory.js | 64 + .../generated/v1beta1/dataform.remove_file.js | 63 + .../dataform.reset_workspace_changes.js | 67 + .../v1beta1/dataform.update_repository.js | 63 + .../generated/v1beta1/dataform.write_file.js | 68 + ...etadata.google.cloud.dataform.v1beta1.json | 1647 ++ src/index.ts | 5 +- src/v1beta1/dataform_client.ts | 5293 +++++ src/v1beta1/dataform_client_config.json | 170 + src/v1beta1/dataform_proto_list.json | 3 + src/v1beta1/gapic_metadata.json | 411 + src/v1beta1/index.ts | 19 + test/gapic_dataform_v1beta1.ts | 7084 ++++++ 49 files changed, 48745 insertions(+), 6 deletions(-) create mode 100644 protos/google/cloud/dataform/v1beta1/dataform.proto create mode 100644 samples/generated/v1beta1/dataform.cancel_workflow_invocation.js create mode 100644 samples/generated/v1beta1/dataform.commit_workspace_changes.js create mode 100644 samples/generated/v1beta1/dataform.create_compilation_result.js create mode 100644 samples/generated/v1beta1/dataform.create_repository.js create mode 100644 samples/generated/v1beta1/dataform.create_workflow_invocation.js create mode 100644 samples/generated/v1beta1/dataform.create_workspace.js create mode 100644 samples/generated/v1beta1/dataform.delete_repository.js create mode 100644 samples/generated/v1beta1/dataform.delete_workflow_invocation.js create mode 100644 samples/generated/v1beta1/dataform.delete_workspace.js create mode 100644 samples/generated/v1beta1/dataform.fetch_file_diff.js create mode 100644 samples/generated/v1beta1/dataform.fetch_file_git_statuses.js create mode 100644 samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js create mode 100644 samples/generated/v1beta1/dataform.fetch_remote_branches.js create mode 100644 samples/generated/v1beta1/dataform.get_compilation_result.js create mode 100644 samples/generated/v1beta1/dataform.get_repository.js create mode 100644 samples/generated/v1beta1/dataform.get_workflow_invocation.js create mode 100644 samples/generated/v1beta1/dataform.get_workspace.js create mode 100644 samples/generated/v1beta1/dataform.install_npm_packages.js create mode 100644 samples/generated/v1beta1/dataform.list_compilation_results.js create mode 100644 samples/generated/v1beta1/dataform.list_repositories.js create mode 100644 samples/generated/v1beta1/dataform.list_workflow_invocations.js create mode 100644 samples/generated/v1beta1/dataform.list_workspaces.js create mode 100644 samples/generated/v1beta1/dataform.make_directory.js create mode 100644 samples/generated/v1beta1/dataform.move_directory.js create mode 100644 samples/generated/v1beta1/dataform.move_file.js create mode 100644 samples/generated/v1beta1/dataform.pull_git_commits.js create mode 100644 samples/generated/v1beta1/dataform.push_git_commits.js create mode 100644 samples/generated/v1beta1/dataform.query_compilation_result_actions.js create mode 100644 samples/generated/v1beta1/dataform.query_directory_contents.js create mode 100644 samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js create mode 100644 samples/generated/v1beta1/dataform.read_file.js create mode 100644 samples/generated/v1beta1/dataform.remove_directory.js create mode 100644 samples/generated/v1beta1/dataform.remove_file.js create mode 100644 samples/generated/v1beta1/dataform.reset_workspace_changes.js create mode 100644 samples/generated/v1beta1/dataform.update_repository.js create mode 100644 samples/generated/v1beta1/dataform.write_file.js create mode 100644 samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json create mode 100644 src/v1beta1/dataform_client.ts create mode 100644 src/v1beta1/dataform_client_config.json create mode 100644 src/v1beta1/dataform_proto_list.json create mode 100644 src/v1beta1/gapic_metadata.json create mode 100644 src/v1beta1/index.ts create mode 100644 test/gapic_dataform_v1beta1.ts diff --git a/linkinator.config.json b/linkinator.config.json index e51cbcc..befd23c 100644 --- a/linkinator.config.json +++ b/linkinator.config.json @@ -5,10 +5,7 @@ "www.googleapis.com", "img.shields.io", "https://console.cloud.google.com/cloudshell", - "https://support.google.com", - "https://github.com/googleapis/nodejs-dataform/blob/master/CHANGELOG.md", - "https://cloud.google.com/nodejs/docs/reference/dataform/latest", - "https://github.com/googleapis/nodejs-dataform/blob/addSamples/CHANGELOG.md" + "https://support.google.com" ], "silent": true, "concurrency": 5, diff --git a/protos/google/cloud/dataform/v1beta1/dataform.proto b/protos/google/cloud/dataform/v1beta1/dataform.proto new file mode 100644 index 0000000..57d43c3 --- /dev/null +++ b/protos/google/cloud/dataform/v1beta1/dataform.proto @@ -0,0 +1,1629 @@ +// Copyright 2022 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dataform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.Dataform.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dataform/v1beta1;dataform"; +option java_multiple_files = true; +option java_outer_classname = "DataformProto"; +option java_package = "com.google.cloud.dataform.v1beta1"; +option php_namespace = "Google\\Cloud\\Dataform\\V1beta1"; +option ruby_package = "Google::Cloud::Dataform::V1beta1"; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{version}" +}; + +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +service Dataform { + option (google.api.default_host) = "dataform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Repositories in a given project and location. + rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Repository in a given project and location. + rpc CreateRepository(CreateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + } + + // Updates a single Repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a single Repository. + rpc DeleteRepository(DeleteRepositoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Fetches a Repository's remote branches. + rpc FetchRemoteBranches(FetchRemoteBranchesRequest) returns (FetchRemoteBranchesResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }; + } + + // Lists Workspaces in a given Repository. + rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Workspace. + rpc GetWorkspace(GetWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Workspace in a given Repository. + rpc CreateWorkspace(CreateWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + body: "workspace" + }; + option (google.api.method_signature) = "parent,workspace,workspace_id"; + } + + // Deletes a single Workspace. + rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Installs dependency NPM packages (inside a Workspace). + rpc InstallNpmPackages(InstallNpmPackagesRequest) returns (InstallNpmPackagesResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages" + body: "*" + }; + } + + // Pulls Git commits from the Repository's remote into a Workspace. + rpc PullGitCommits(PullGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull" + body: "*" + }; + } + + // Pushes Git commits from a Workspace to the Repository's remote. + rpc PushGitCommits(PushGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push" + body: "*" + }; + } + + // Fetches Git statuses for the files in a Workspace. + rpc FetchFileGitStatuses(FetchFileGitStatusesRequest) returns (FetchFileGitStatusesResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }; + } + + // Fetches Git ahead/behind against a remote branch. + rpc FetchGitAheadBehind(FetchGitAheadBehindRequest) returns (FetchGitAheadBehindResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }; + } + + // Applies a Git commit for uncommitted files in a Workspace. + rpc CommitWorkspaceChanges(CommitWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit" + body: "*" + }; + } + + // Performs a Git reset for uncommitted files in a Workspace. + rpc ResetWorkspaceChanges(ResetWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset" + body: "*" + }; + } + + // Fetches Git diff for an uncommitted file in a Workspace. + rpc FetchFileDiff(FetchFileDiffRequest) returns (FetchFileDiffResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }; + } + + // Returns the contents of a given Workspace directory. + rpc QueryDirectoryContents(QueryDirectoryContentsRequest) returns (QueryDirectoryContentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }; + } + + // Creates a directory inside a Workspace. + rpc MakeDirectory(MakeDirectoryRequest) returns (MakeDirectoryResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory" + body: "*" + }; + } + + // Deletes a directory (inside a Workspace) and all of its contents. + rpc RemoveDirectory(RemoveDirectoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory" + body: "*" + }; + } + + // Moves a directory (inside a Workspace), and all of its contents, to a new + // location. + rpc MoveDirectory(MoveDirectoryRequest) returns (MoveDirectoryResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory" + body: "*" + }; + } + + // Returns the contents of a file (inside a Workspace). + rpc ReadFile(ReadFileRequest) returns (ReadFileResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }; + } + + // Deletes a file (inside a Workspace). + rpc RemoveFile(RemoveFileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile" + body: "*" + }; + } + + // Moves a file (inside a Workspace) to a new location. + rpc MoveFile(MoveFileRequest) returns (MoveFileResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile" + body: "*" + }; + } + + // Writes to a file (inside a Workspace). + rpc WriteFile(WriteFileRequest) returns (WriteFileResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile" + body: "*" + }; + } + + // Lists CompilationResults in a given Repository. + rpc ListCompilationResults(ListCompilationResultsRequest) returns (ListCompilationResultsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single CompilationResult. + rpc GetCompilationResult(GetCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new CompilationResult in a given project and location. + rpc CreateCompilationResult(CreateCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + body: "compilation_result" + }; + option (google.api.method_signature) = "parent,compilation_result"; + } + + // Returns CompilationResultActions in a given CompilationResult. + rpc QueryCompilationResultActions(QueryCompilationResultActionsRequest) returns (QueryCompilationResultActionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }; + } + + // Lists WorkflowInvocations in a given Repository. + rpc ListWorkflowInvocations(ListWorkflowInvocationsRequest) returns (ListWorkflowInvocationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single WorkflowInvocation. + rpc GetWorkflowInvocation(GetWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new WorkflowInvocation in a given Repository. + rpc CreateWorkflowInvocation(CreateWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + body: "workflow_invocation" + }; + option (google.api.method_signature) = "parent,workflow_invocation"; + } + + // Deletes a single WorkflowInvocation. + rpc DeleteWorkflowInvocation(DeleteWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Requests cancellation of a running WorkflowInvocation. + rpc CancelWorkflowInvocation(CancelWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel" + body: "*" + }; + } + + // Returns WorkflowInvocationActions in a given WorkflowInvocation. + rpc QueryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest) returns (QueryWorkflowInvocationActionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }; + } +} + +// Represents a Dataform Git repository. +message Repository { + option (google.api.resource) = { + type: "dataform.googleapis.com/Repository" + pattern: "projects/{project}/locations/{location}/repositories/{repository}" + }; + + // Controls Git remote configuration for a repository. + message GitRemoteSettings { + // Indicates the status of a Git authentication token. + enum TokenStatus { + // Default value. This value is unused. + TOKEN_STATUS_UNSPECIFIED = 0; + + // The token could not be found in Secret Manager (or the Dataform + // Service Account did not have permission to access it). + NOT_FOUND = 1; + + // The token could not be used to authenticate against the Git remote. + INVALID = 2; + + // The token was used successfully to authenticate against the Git remote. + VALID = 3; + } + + // Required. The Git remote's URL. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Git remote's default branch name. + string default_branch = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Secret Manager secret version to use as an + // authentication token for Git operations. Must be in the format + // `projects/*/secrets/*/versions/*`. + string authentication_token_secret_version = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Output only. Indicates the status of the Git access token. + TokenStatus token_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The repository's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If set, configures this repository to be linked to a Git remote. + GitRemoteSettings git_remote_settings = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` request message. +message ListRepositoriesRequest { + // Required. The location in which to list repositories. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of repositories to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListRepositories` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRepositories` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` response message. +message ListRepositoriesResponse { + // List of repositories. + repeated Repository repositories = 1; + + // A token which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetRepository` request message. +message GetRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `CreateRepository` request message. +message CreateRepositoryRequest { + // Required. The location in which to create the repository. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The repository to create. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the repository, which will become the final component of + // the repository's resource name. + string repository_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `UpdateRepository` request message. +message UpdateRepositoryRequest { + // Optional. Specifies the fields to be updated in the repository. If left unset, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The repository to update. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteRepository` request message. +message DeleteRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // 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.) + bool force = 2; +} + +// `FetchRemoteBranches` request message. +message FetchRemoteBranchesRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `FetchRemoteBranches` response message. +message FetchRemoteBranchesResponse { + // The remote repository's branch names. + repeated string branches = 1; +} + +// Represents a Dataform Git workspace. +message Workspace { + option (google.api.resource) = { + type: "dataform.googleapis.com/Workspace" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }; + + // Output only. The workspace's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkspaces` request message. +message ListWorkspacesRequest { + // Required. The repository in which to list workspaces. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workspaces to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkspaces` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkspaces` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkspaces` response message. +message ListWorkspacesResponse { + // List of workspaces. + repeated Workspace workspaces = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkspace` request message. +message GetWorkspaceRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `CreateWorkspace` request message. +message CreateWorkspaceRequest { + // Required. The repository in which to create the workspace. Must be in the format + // `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workspace to create. + Workspace workspace = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the workspace, which will become the final component of + // the workspace's resource name. + string workspace_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkspace` request message. +message DeleteWorkspaceRequest { + // Required. The workspace resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// Represents the author of a Git commit. +message CommitAuthor { + // Required. The commit author's name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The commit author's email address. + string email_address = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `PullGitCommits` request message. +message PullGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote from which to pull commits. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The author of any merge commit which may be created as a result of merging + // fetched Git commits into this workspace. + CommitAuthor author = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `PushGitCommits` request message. +message PushGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote to which commits should be pushed. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileGitStatuses` request message. +message FetchFileGitStatusesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `FetchFileGitStatuses` response message. +message FetchFileGitStatusesResponse { + // Represents the Git state of a file with uncommitted changes. + message UncommittedFileChange { + // Indicates the status of an uncommitted file change. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The file has been newly added. + ADDED = 1; + + // The file has been deleted. + DELETED = 2; + + // The file has been modified. + MODIFIED = 3; + + // The file contains merge conflicts. + HAS_CONFLICTS = 4; + } + + // The file's full path including filename, relative to the workspace root. + string path = 1; + + // Indicates the status of the file. + State state = 2; + } + + // A list of all files which have uncommitted Git changes. There will only be + // a single entry for any given file. + repeated UncommittedFileChange uncommitted_file_changes = 1; +} + +// `FetchGitAheadBehind` request message. +message FetchGitAheadBehindRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote against which this workspace + // should be compared. If left unset, the repository's default branch name + // will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchGitAheadBehind` response message. +message FetchGitAheadBehindResponse { + // The number of commits in the remote branch that are not in the workspace. + int32 commits_ahead = 1; + + // The number of commits in the workspace that are not in the remote branch. + int32 commits_behind = 2; +} + +// `CommitWorkspaceChanges` request message. +message CommitWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The commit's author. + CommitAuthor author = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The commit's message. + string commit_message = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full file paths to commit including filename, rooted at workspace root. If + // left empty, all files will be committed. + repeated string paths = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ResetWorkspaceChanges` request message. +message ResetWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. Full file paths to reset back to their committed state including filename, + // rooted at workspace root. If left empty, all files will be reset. + repeated string paths = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, untracked files will be deleted. + bool clean = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileDiff` request message. +message FetchFileDiffRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `FetchFileDiff` response message. +message FetchFileDiffResponse { + // The raw formatted Git diff for the file. + string formatted_diff = 1; +} + +// `QueryDirectoryContents` request message. +message QueryDirectoryContentsRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The directory's full path including directory name, relative to the + // workspace root. If left unset, the workspace root is used. + string path = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of paths to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryDirectoryContents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryDirectoryContents` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryDirectoryContents` response message. +message QueryDirectoryContentsResponse { + // Represents a single entry in a workspace directory. + message DirectoryEntry { + oneof entry { + // A file in the directory. + string file = 1; + + // A child directory in the directory. + string directory = 2; + } + } + + // List of entries in the directory. + repeated DirectoryEntry directory_entries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `MakeDirectory` request message. +message MakeDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MakeDirectory` response message. +message MakeDirectoryResponse { + +} + +// `RemoveDirectory` request message. +message RemoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` request message. +message MoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new path for the directory including directory name, rooted at + // workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` response message. +message MoveDirectoryResponse { + +} + +// `ReadFile` request message. +message ReadFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `ReadFile` response message. +message ReadFileResponse { + // The file's contents. + bytes file_contents = 1; +} + +// `RemoveFile` request message. +message RemoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` request message. +message MoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's new path including filename, relative to the workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` response message. +message MoveFileResponse { + +} + +// `WriteFile` request message. +message WriteFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's contents. + bytes contents = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `WriteFile` response message. +message WriteFileResponse { + +} + +// `InstallNpmPackages` request message. +message InstallNpmPackagesRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `InstallNpmPackages` response message. +message InstallNpmPackagesResponse { + +} + +// Represents the result of compiling a Dataform project. +message CompilationResult { + option (google.api.resource) = { + type: "dataform.googleapis.com/CompilationResult" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }; + + // Configures various aspects of Dataform code compilation. + message CodeCompilationConfig { + // Optional. The default database (Google Cloud project ID). + string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID). + string default_schema = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default BigQuery location to use. Defaults to "US". + // See the BigQuery docs for a full list of locations: + // https://cloud.google.com/bigquery/docs/locations. + string default_location = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID) for assertions. + string assertion_schema = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined variables that are made available to project code during + // compilation. + map vars = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all database (Google Cloud project + // ID) names. + string database_suffix = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all schema (BigQuery dataset ID) + // names. + string schema_suffix = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix that should be prepended to all table names. + string table_prefix = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // An error encountered when attempting to compile a Dataform project. + message CompilationError { + // Output only. The error's top level message. + string message = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error's full stack trace. + string stack = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path of the file where this error occurred, if available, relative to + // the project root. + string path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The identifier of the action where this error occurred, if available. + Target action_target = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The compilation result's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + oneof source { + // Immutable. Git commit/tag/branch name at which the repository should be compiled. + // Must exist in the remote repository. + // Examples: + // - a commit SHA: `12ade345` + // - a tag: `tag1` + // - a branch name: `branch1` + string git_commitish = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The name of the workspace to compile. Must be in the format + // `projects/*/locations/*/repositories/*/workspaces/*`. + string workspace = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + } + + // Immutable. If set, fields of `code_compilation_overrides` override the default + // compilation settings that are specified in dataform.json. + CodeCompilationConfig code_compilation_config = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The version of `@dataform/core` that was used for compilation. + string dataform_core_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered during project compilation. + repeated CompilationError compilation_errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListCompilationResults` request message. +message ListCompilationResultsRequest { + // Required. The repository in which to list compilation results. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListCompilationResults` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCompilationResults` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListCompilationResults` response message. +message ListCompilationResultsResponse { + // List of compilation results. + repeated CompilationResult compilation_results = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetCompilationResult` request message. +message GetCompilationResultRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; +} + +// `CreateCompilationResult` request message. +message CreateCompilationResultRequest { + // Required. The repository in which to create the compilation result. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The compilation result to create. + CompilationResult compilation_result = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents an action identifier. If the action writes output, the output +// will be written to the referenced database object. +message Target { + // The action's database (Google Cloud project ID) . + string database = 1; + + // The action's schema (BigQuery dataset ID), within `database`. + string schema = 2; + + // The action's name, within `database` and `schema`. + string name = 3; +} + +// Describes a relation and its columns. +message RelationDescriptor { + // Describes a column. + message ColumnDescriptor { + // The identifier for the column. Each entry in `path` represents one level + // of nesting. + repeated string path = 1; + + // A textual description of the column. + string description = 2; + + // A list of BigQuery policy tags that will be applied to the column. + repeated string bigquery_policy_tags = 3; + } + + // A text description of the relation. + string description = 1; + + // A list of descriptions of columns within the relation. + repeated ColumnDescriptor columns = 2; + + // A set of BigQuery labels that should be applied to the relation. + map bigquery_labels = 3; +} + +// Represents a single Dataform action in a compilation result. +message CompilationResultAction { + // Represents a database relation. + message Relation { + // Indicates the type of this relation. + enum RelationType { + // Default value. This value is unused. + RELATION_TYPE_UNSPECIFIED = 0; + + // The relation is a table. + TABLE = 1; + + // The relation is a view. + VIEW = 2; + + // The relation is an incrementalized table. + INCREMENTAL_TABLE = 3; + + // The relation is a materialized view. + MATERIALIZED_VIEW = 4; + } + + // Contains settings for relations of type `INCREMENTAL_TABLE`. + message IncrementalTableConfig { + // The SELECT query which returns rows which should be inserted into the + // relation if it already exists and is not being refreshed. + string incremental_select_query = 1; + + // Whether this table should be protected from being refreshed. + bool refresh_disabled = 2; + + // A set of columns or SQL expressions used to define row uniqueness. + // If any duplicates are discovered (as defined by `unique_key_parts`), + // only the newly selected rows (as defined by `incremental_select_query`) + // will be included in the relation. + repeated string unique_key_parts = 3; + + // A SQL expression conditional used to limit the set of existing rows + // considered for a merge operation (see `unique_key_parts` for more + // information). + string update_partition_filter = 4; + + // SQL statements to be executed before inserting new rows into the + // relation. + repeated string incremental_pre_operations = 5; + + // SQL statements to be executed after inserting new rows into the + // relation. + repeated string incremental_post_operations = 6; + } + + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for the relation and its columns. + RelationDescriptor relation_descriptor = 4; + + // The type of this relation. + RelationType relation_type = 5; + + // The SELECT query which returns rows which this relation should contain. + string select_query = 6; + + // SQL statements to be executed before creating the relation. + repeated string pre_operations = 7; + + // SQL statements to be executed after creating the relation. + repeated string post_operations = 8; + + // Configures `INCREMENTAL_TABLE` settings for this relation. Only set if + // `relation_type` is `INCREMENTAL_TABLE`. + IncrementalTableConfig incremental_table_config = 9; + + // The SQL expression used to partition the relation. + string partition_expression = 10; + + // A list of columns or SQL expressions used to cluster the table. + repeated string cluster_expressions = 11; + + // Sets the partition expiration in days. + int32 partition_expiration_days = 12; + + // Specifies whether queries on this table must include a predicate filter + // that filters on the partitioning column. + bool require_partition_filter = 13; + + // Additional options that will be provided as key/value pairs into the + // 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. + map additional_options = 14; + } + + // Represents a list of arbitrary database operations. + message Operations { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for any output relation and its columns. Only set if + // `has_output` is true. + RelationDescriptor relation_descriptor = 6; + + // A list of arbitrary SQL statements that will be executed without + // alteration. + repeated string queries = 4; + + // Whether these operations produce an output relation. + bool has_output = 5; + } + + // Represents an assertion upon a SQL query which is required return zero + // rows. + message Assertion { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // The parent action of this assertion. Only set if this assertion was + // automatically generated. + Target parent_action = 5; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // The SELECT query which must return zero rows in order for this assertion + // to succeed. + string select_query = 4; + + // Descriptor for the assertion's automatically-generated view and its + // columns. + RelationDescriptor relation_descriptor = 6; + } + + // Represents a relation which is not managed by Dataform but which may be + // referenced by Dataform actions. + message Declaration { + // Descriptor for the relation and its columns. Used as documentation only, + // i.e. values here will result in no changes to the relation's metadata. + RelationDescriptor relation_descriptor = 1; + } + + // This action's identifier. Unique within the compilation result. + Target target = 1; + + // The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2; + + // The full path including filename in which this action is located, relative + // to the workspace root. + string file_path = 3; + + oneof compiled_object { + // The database relation created/updated by this action. + Relation relation = 4; + + // The database operations executed by this action. + Operations operations = 5; + + // The assertion executed by this action. + Assertion assertion = 6; + + // The declaration declared by this action. + Declaration declaration = 7; + } +} + +// `QueryCompilationResultActions` request message. +message QueryCompilationResultActionsRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryCompilationResultActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryCompilationResultActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional filter for the returned list. Filtering is only currently + // supported on the `file_path` field. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryCompilationResultActions` response message. +message QueryCompilationResultActionsResponse { + // List of compilation result actions. + repeated CompilationResultAction compilation_result_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Represents a single invocation of a compilation result. +message WorkflowInvocation { + option (google.api.resource) = { + type: "dataform.googleapis.com/WorkflowInvocation" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }; + + // Includes various configuration options for this workflow invocation. + // If both `included_targets` and `included_tags` are unset, all actions + // will be included. + message InvocationConfig { + // Immutable. The set of action identifiers to include. + repeated Target included_targets = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The set of tags to include. + repeated string included_tags = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependencies of included actions will be + // executed. + bool transitive_dependencies_included = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependents of included actions will be + // executed. + bool transitive_dependents_included = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, any incremental tables will be fully refreshed. + bool fully_refresh_incremental_tables_enabled = 5 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Represents the current state of a workflow invocation. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The workflow invocation is currently running. + RUNNING = 1; + + // The workflow invocation succeeded. A terminal state. + SUCCEEDED = 2; + + // The workflow invocation was cancelled. A terminal state. + CANCELLED = 3; + + // The workflow invocation failed. A terminal state. + FAILED = 4; + + // The workflow invocation is being cancelled, but some actions are still + // running. + CANCELING = 5; + } + + // Output only. The workflow invocation's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of the compilation result to compile. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string compilation_result = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Immutable. If left unset, a default InvocationConfig will be used. + InvocationConfig invocation_config = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. This workflow invocation's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This workflow invocation's timing details. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkflowInvocations` request message. +message ListWorkflowInvocationsRequest { + // Required. The parent resource of the WorkflowInvocation type. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkflowInvocations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflowInvocations` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkflowInvocations` response message. +message ListWorkflowInvocationsResponse { + // List of workflow invocations. + repeated WorkflowInvocation workflow_invocations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkflowInvocation` request message. +message GetWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CreateWorkflowInvocation` request message. +message CreateWorkflowInvocationRequest { + // Required. The repository in which to create the workflow invocation. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workflow invocation resource to create. + WorkflowInvocation workflow_invocation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkflowInvocation` request message. +message DeleteWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CancelWorkflowInvocation` request message. +message CancelWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// Represents a single action in a workflow invocation. +message WorkflowInvocationAction { + // Represents the current state of an workflow invocation action. + enum State { + // The action has not yet been considered for invocation. + PENDING = 0; + + // The action is currently running. + RUNNING = 1; + + // Execution of the action was skipped because upstream dependencies did not + // all complete successfully. A terminal state. + SKIPPED = 2; + + // Execution of the action was disabled as per the configuration of the + // corresponding compilation result action. A terminal state. + DISABLED = 3; + + // The action succeeded. A terminal state. + SUCCEEDED = 4; + + // The action was cancelled. A terminal state. + CANCELLED = 5; + + // The action failed. A terminal state. + FAILED = 6; + } + + // Represents a workflow action that will run against BigQuery. + message BigQueryAction { + // Output only. The generated BigQuery SQL script that will be executed. + string sql_script = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This action's identifier. Unique within the workflow invocation. + Target target = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If and only if action's state is FAILED a failure reason is set. + string failure_reason = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's timing details. + // `start_time` will be set if the action is in [RUNNING, SUCCEEDED, + // CANCELLED, FAILED] state. + // `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED] + // state. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The workflow action's bigquery action details. + BigQueryAction bigquery_action = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `QueryWorkflowInvocationActions` request message. +message QueryWorkflowInvocationActionsRequest { + // Required. The workflow invocation's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryWorkflowInvocationActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryWorkflowInvocationActions` response message. +message QueryWorkflowInvocationActionsResponse { + // List of workflow invocation actions. + repeated WorkflowInvocationAction workflow_invocation_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 9c130ba..630cd57 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -8425,6 +8425,8409 @@ export namespace google { public toJSON(): { [k: string]: any }; } } + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Represents a Dataform */ + class Dataform extends $protobuf.rpc.Service { + + /** + * Constructs a new Dataform service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Dataform service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Dataform; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.cloud.dataform.v1beta1.IListRepositoriesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.cloud.dataform.v1beta1.IListRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.cloud.dataform.v1beta1.IGetRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.cloud.dataform.v1beta1.IGetRepositoryRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public createRepository(request: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.cloud.dataform.v1beta1.ICreateRepositoryRequest): Promise; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public updateRepository(request: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteRepository(request: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest): Promise; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranchesCallback): void; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @returns Promise + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest): Promise; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkspacesResponse + */ + public listWorkspaces(request: google.cloud.dataform.v1beta1.IListWorkspacesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListWorkspacesCallback): void; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @returns Promise + */ + public listWorkspaces(request: google.cloud.dataform.v1beta1.IListWorkspacesRequest): Promise; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public getWorkspace(request: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetWorkspaceCallback): void; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @returns Promise + */ + public getWorkspace(request: google.cloud.dataform.v1beta1.IGetWorkspaceRequest): Promise; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public createWorkspace(request: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateWorkspaceCallback): void; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @returns Promise + */ + public createWorkspace(request: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest): Promise; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkspace(request: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteWorkspaceCallback): void; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @returns Promise + */ + public deleteWorkspace(request: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest): Promise; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + */ + public installNpmPackages(request: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, callback: google.cloud.dataform.v1beta1.Dataform.InstallNpmPackagesCallback): void; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @returns Promise + */ + public installNpmPackages(request: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest): Promise; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pullGitCommits(request: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, callback: google.cloud.dataform.v1beta1.Dataform.PullGitCommitsCallback): void; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @returns Promise + */ + public pullGitCommits(request: google.cloud.dataform.v1beta1.IPullGitCommitsRequest): Promise; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pushGitCommits(request: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, callback: google.cloud.dataform.v1beta1.Dataform.PushGitCommitsCallback): void; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @returns Promise + */ + public pushGitCommits(request: google.cloud.dataform.v1beta1.IPushGitCommitsRequest): Promise; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatusesCallback): void; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @returns Promise + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest): Promise; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehindCallback): void; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @returns Promise + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest): Promise; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, callback: google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChangesCallback): void; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest): Promise; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChangesCallback): void; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest): Promise; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileDiffResponse + */ + public fetchFileDiff(request: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchFileDiffCallback): void; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @returns Promise + */ + public fetchFileDiff(request: google.cloud.dataform.v1beta1.IFetchFileDiffRequest): Promise; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + */ + public queryDirectoryContents(request: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContentsCallback): void; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @returns Promise + */ + public queryDirectoryContents(request: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest): Promise; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MakeDirectoryResponse + */ + public makeDirectory(request: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.MakeDirectoryCallback): void; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @returns Promise + */ + public makeDirectory(request: google.cloud.dataform.v1beta1.IMakeDirectoryRequest): Promise; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeDirectory(request: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.RemoveDirectoryCallback): void; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @returns Promise + */ + public removeDirectory(request: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest): Promise; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveDirectoryResponse + */ + public moveDirectory(request: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.MoveDirectoryCallback): void; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @returns Promise + */ + public moveDirectory(request: google.cloud.dataform.v1beta1.IMoveDirectoryRequest): Promise; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadFileResponse + */ + public readFile(request: google.cloud.dataform.v1beta1.IReadFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.ReadFileCallback): void; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @returns Promise + */ + public readFile(request: google.cloud.dataform.v1beta1.IReadFileRequest): Promise; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeFile(request: google.cloud.dataform.v1beta1.IRemoveFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.RemoveFileCallback): void; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @returns Promise + */ + public removeFile(request: google.cloud.dataform.v1beta1.IRemoveFileRequest): Promise; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveFileResponse + */ + public moveFile(request: google.cloud.dataform.v1beta1.IMoveFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.MoveFileCallback): void; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @returns Promise + */ + public moveFile(request: google.cloud.dataform.v1beta1.IMoveFileRequest): Promise; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteFileResponse + */ + public writeFile(request: google.cloud.dataform.v1beta1.IWriteFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.WriteFileCallback): void; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @returns Promise + */ + public writeFile(request: google.cloud.dataform.v1beta1.IWriteFileRequest): Promise; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + */ + public listCompilationResults(request: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListCompilationResultsCallback): void; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @returns Promise + */ + public listCompilationResults(request: google.cloud.dataform.v1beta1.IListCompilationResultsRequest): Promise; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public getCompilationResult(request: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetCompilationResultCallback): void; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @returns Promise + */ + public getCompilationResult(request: google.cloud.dataform.v1beta1.IGetCompilationResultRequest): Promise; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public createCompilationResult(request: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateCompilationResultCallback): void; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @returns Promise + */ + public createCompilationResult(request: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest): Promise; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActionsCallback): void; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @returns Promise + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest): Promise; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocationsCallback): void; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @returns Promise + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest): Promise; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocationCallback): void; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest): Promise; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocationCallback): void; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest): Promise; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocationCallback): void; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest): Promise; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocationCallback): void; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest): Promise; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActionsCallback): void; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @returns Promise + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest): Promise; + } + + namespace Dataform { + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteRepository}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchRemoteBranches}. + * @param error Error, if any + * @param [response] FetchRemoteBranchesResponse + */ + type FetchRemoteBranchesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkspaces}. + * @param error Error, if any + * @param [response] ListWorkspacesResponse + */ + type ListWorkspacesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkspacesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type GetWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type CreateWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkspace}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkspaceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#installNpmPackages}. + * @param error Error, if any + * @param [response] InstallNpmPackagesResponse + */ + type InstallNpmPackagesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.InstallNpmPackagesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pullGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PullGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pushGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PushGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileGitStatuses}. + * @param error Error, if any + * @param [response] FetchFileGitStatusesResponse + */ + type FetchFileGitStatusesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchGitAheadBehind}. + * @param error Error, if any + * @param [response] FetchGitAheadBehindResponse + */ + type FetchGitAheadBehindCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#commitWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type CommitWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#resetWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type ResetWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileDiff}. + * @param error Error, if any + * @param [response] FetchFileDiffResponse + */ + type FetchFileDiffCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileDiffResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryDirectoryContents}. + * @param error Error, if any + * @param [response] QueryDirectoryContentsResponse + */ + type QueryDirectoryContentsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#makeDirectory}. + * @param error Error, if any + * @param [response] MakeDirectoryResponse + */ + type MakeDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MakeDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeDirectory}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveDirectoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveDirectory}. + * @param error Error, if any + * @param [response] MoveDirectoryResponse + */ + type MoveDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#readFile}. + * @param error Error, if any + * @param [response] ReadFileResponse + */ + type ReadFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ReadFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeFile}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveFileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveFile}. + * @param error Error, if any + * @param [response] MoveFileResponse + */ + type MoveFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#writeFile}. + * @param error Error, if any + * @param [response] WriteFileResponse + */ + type WriteFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WriteFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listCompilationResults}. + * @param error Error, if any + * @param [response] ListCompilationResultsResponse + */ + type ListCompilationResultsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListCompilationResultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type GetCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type CreateCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryCompilationResultActions}. + * @param error Error, if any + * @param [response] QueryCompilationResultActionsResponse + */ + type QueryCompilationResultActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkflowInvocations}. + * @param error Error, if any + * @param [response] ListWorkflowInvocationsResponse + */ + type ListWorkflowInvocationsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type GetWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type CreateWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#cancelWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryWorkflowInvocationActions}. + * @param error Error, if any + * @param [response] QueryWorkflowInvocationActionsResponse + */ + type QueryWorkflowInvocationActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse) => void; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository name */ + name?: (string|null); + + /** Repository gitRemoteSettings */ + gitRemoteSettings?: (google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRepository); + + /** Repository name. */ + public name: string; + + /** Repository gitRemoteSettings. */ + public gitRemoteSettings?: (google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null); + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRepository): google.cloud.dataform.v1beta1.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Repository { + + /** Properties of a GitRemoteSettings. */ + interface IGitRemoteSettings { + + /** GitRemoteSettings url */ + url?: (string|null); + + /** GitRemoteSettings defaultBranch */ + defaultBranch?: (string|null); + + /** GitRemoteSettings authenticationTokenSecretVersion */ + authenticationTokenSecretVersion?: (string|null); + + /** GitRemoteSettings tokenStatus */ + tokenStatus?: (google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|null); + } + + /** Represents a GitRemoteSettings. */ + class GitRemoteSettings implements IGitRemoteSettings { + + /** + * Constructs a new GitRemoteSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings); + + /** GitRemoteSettings url. */ + public url: string; + + /** GitRemoteSettings defaultBranch. */ + public defaultBranch: string; + + /** GitRemoteSettings authenticationTokenSecretVersion. */ + public authenticationTokenSecretVersion: string; + + /** GitRemoteSettings tokenStatus. */ + public tokenStatus: (google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus); + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GitRemoteSettings instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Verifies a GitRemoteSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitRemoteSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @param message GitRemoteSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Repository.GitRemoteSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitRemoteSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GitRemoteSettings { + + /** TokenStatus enum. */ + enum TokenStatus { + TOKEN_STATUS_UNSPECIFIED = 0, + NOT_FOUND = 1, + INVALID = 2, + VALID = 3 + } + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListRepositoriesRequest orderBy */ + orderBy?: (string|null); + + /** ListRepositoriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** ListRepositoriesRequest orderBy. */ + public orderBy: string; + + /** ListRepositoriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListRepositoriesRequest): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.cloud.dataform.v1beta1.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRepositoriesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.cloud.dataform.v1beta1.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRepositoriesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListRepositoriesResponse): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetRepositoryRequest): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateRepositoryRequest): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateRepositoryRequest. */ + interface IUpdateRepositoryRequest { + + /** UpdateRepositoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1beta1.IRepository|null); + } + + /** Represents an UpdateRepositoryRequest. */ + class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + + /** + * Constructs a new UpdateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Verifies an UpdateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @param message UpdateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + + /** DeleteRepositoryRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** DeleteRepositoryRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchRemoteBranchesRequest. */ + interface IFetchRemoteBranchesRequest { + + /** FetchRemoteBranchesRequest name */ + name?: (string|null); + } + + /** Represents a FetchRemoteBranchesRequest. */ + class FetchRemoteBranchesRequest implements IFetchRemoteBranchesRequest { + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest); + + /** FetchRemoteBranchesRequest name. */ + public name: string; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchRemoteBranchesResponse. */ + interface IFetchRemoteBranchesResponse { + + /** FetchRemoteBranchesResponse branches */ + branches?: (string[]|null); + } + + /** Represents a FetchRemoteBranchesResponse. */ + class FetchRemoteBranchesResponse implements IFetchRemoteBranchesResponse { + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse); + + /** FetchRemoteBranchesResponse branches. */ + public branches: string[]; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Workspace. */ + interface IWorkspace { + + /** Workspace name */ + name?: (string|null); + } + + /** Represents a Workspace. */ + class Workspace implements IWorkspace { + + /** + * Constructs a new Workspace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkspace); + + /** Workspace name. */ + public name: string; + + /** + * Creates a new Workspace instance using the specified properties. + * @param [properties] Properties to set + * @returns Workspace instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkspace): google.cloud.dataform.v1beta1.Workspace; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Workspace; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Workspace; + + /** + * Verifies a Workspace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Workspace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Workspace; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @param message Workspace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Workspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Workspace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkspacesRequest. */ + interface IListWorkspacesRequest { + + /** ListWorkspacesRequest parent */ + parent?: (string|null); + + /** ListWorkspacesRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkspacesRequest pageToken */ + pageToken?: (string|null); + + /** ListWorkspacesRequest orderBy */ + orderBy?: (string|null); + + /** ListWorkspacesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListWorkspacesRequest. */ + class ListWorkspacesRequest implements IListWorkspacesRequest { + + /** + * Constructs a new ListWorkspacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkspacesRequest); + + /** ListWorkspacesRequest parent. */ + public parent: string; + + /** ListWorkspacesRequest pageSize. */ + public pageSize: number; + + /** ListWorkspacesRequest pageToken. */ + public pageToken: string; + + /** ListWorkspacesRequest orderBy. */ + public orderBy: string; + + /** ListWorkspacesRequest filter. */ + public filter: string; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkspacesRequest): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Verifies a ListWorkspacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @param message ListWorkspacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkspacesResponse. */ + interface IListWorkspacesResponse { + + /** ListWorkspacesResponse workspaces */ + workspaces?: (google.cloud.dataform.v1beta1.IWorkspace[]|null); + + /** ListWorkspacesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkspacesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkspacesResponse. */ + class ListWorkspacesResponse implements IListWorkspacesResponse { + + /** + * Constructs a new ListWorkspacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkspacesResponse); + + /** ListWorkspacesResponse workspaces. */ + public workspaces: google.cloud.dataform.v1beta1.IWorkspace[]; + + /** ListWorkspacesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkspacesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkspacesResponse): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Verifies a ListWorkspacesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @param message ListWorkspacesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetWorkspaceRequest. */ + interface IGetWorkspaceRequest { + + /** GetWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkspaceRequest. */ + class GetWorkspaceRequest implements IGetWorkspaceRequest { + + /** + * Constructs a new GetWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetWorkspaceRequest); + + /** GetWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetWorkspaceRequest): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Verifies a GetWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @param message GetWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateWorkspaceRequest. */ + interface ICreateWorkspaceRequest { + + /** CreateWorkspaceRequest parent */ + parent?: (string|null); + + /** CreateWorkspaceRequest workspace */ + workspace?: (google.cloud.dataform.v1beta1.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId */ + workspaceId?: (string|null); + } + + /** Represents a CreateWorkspaceRequest. */ + class CreateWorkspaceRequest implements ICreateWorkspaceRequest { + + /** + * Constructs a new CreateWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest); + + /** CreateWorkspaceRequest parent. */ + public parent: string; + + /** CreateWorkspaceRequest workspace. */ + public workspace?: (google.cloud.dataform.v1beta1.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId. */ + public workspaceId: string; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Verifies a CreateWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @param message CreateWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkspaceRequest. */ + interface IDeleteWorkspaceRequest { + + /** DeleteWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkspaceRequest. */ + class DeleteWorkspaceRequest implements IDeleteWorkspaceRequest { + + /** + * Constructs a new DeleteWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest); + + /** DeleteWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @param message DeleteWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommitAuthor. */ + interface ICommitAuthor { + + /** CommitAuthor name */ + name?: (string|null); + + /** CommitAuthor emailAddress */ + emailAddress?: (string|null); + } + + /** Represents a CommitAuthor. */ + class CommitAuthor implements ICommitAuthor { + + /** + * Constructs a new CommitAuthor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICommitAuthor); + + /** CommitAuthor name. */ + public name: string; + + /** CommitAuthor emailAddress. */ + public emailAddress: string; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitAuthor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICommitAuthor): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Verifies a CommitAuthor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitAuthor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @param message CommitAuthor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CommitAuthor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitAuthor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PullGitCommitsRequest. */ + interface IPullGitCommitsRequest { + + /** PullGitCommitsRequest name */ + name?: (string|null); + + /** PullGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + + /** PullGitCommitsRequest author */ + author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + } + + /** Represents a PullGitCommitsRequest. */ + class PullGitCommitsRequest implements IPullGitCommitsRequest { + + /** + * Constructs a new PullGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IPullGitCommitsRequest); + + /** PullGitCommitsRequest name. */ + public name: string; + + /** PullGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** PullGitCommitsRequest author. */ + public author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PullGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IPullGitCommitsRequest): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Verifies a PullGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @param message PullGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.PullGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PushGitCommitsRequest. */ + interface IPushGitCommitsRequest { + + /** PushGitCommitsRequest name */ + name?: (string|null); + + /** PushGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a PushGitCommitsRequest. */ + class PushGitCommitsRequest implements IPushGitCommitsRequest { + + /** + * Constructs a new PushGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IPushGitCommitsRequest); + + /** PushGitCommitsRequest name. */ + public name: string; + + /** PushGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PushGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IPushGitCommitsRequest): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Verifies a PushGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @param message PushGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.PushGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileGitStatusesRequest. */ + interface IFetchFileGitStatusesRequest { + + /** FetchFileGitStatusesRequest name */ + name?: (string|null); + } + + /** Represents a FetchFileGitStatusesRequest. */ + class FetchFileGitStatusesRequest implements IFetchFileGitStatusesRequest { + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest); + + /** FetchFileGitStatusesRequest name. */ + public name: string; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileGitStatusesResponse. */ + interface IFetchFileGitStatusesResponse { + + /** FetchFileGitStatusesResponse uncommittedFileChanges */ + uncommittedFileChanges?: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange[]|null); + } + + /** Represents a FetchFileGitStatusesResponse. */ + class FetchFileGitStatusesResponse implements IFetchFileGitStatusesResponse { + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse); + + /** FetchFileGitStatusesResponse uncommittedFileChanges. */ + public uncommittedFileChanges: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange[]; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FetchFileGitStatusesResponse { + + /** Properties of an UncommittedFileChange. */ + interface IUncommittedFileChange { + + /** UncommittedFileChange path */ + path?: (string|null); + + /** UncommittedFileChange state */ + state?: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|null); + } + + /** Represents an UncommittedFileChange. */ + class UncommittedFileChange implements IUncommittedFileChange { + + /** + * Constructs a new UncommittedFileChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange); + + /** UncommittedFileChange path. */ + public path: string; + + /** UncommittedFileChange state. */ + public state: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State); + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @param [properties] Properties to set + * @returns UncommittedFileChange instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Verifies an UncommittedFileChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UncommittedFileChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @param message UncommittedFileChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UncommittedFileChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UncommittedFileChange { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ADDED = 1, + DELETED = 2, + MODIFIED = 3, + HAS_CONFLICTS = 4 + } + } + } + + /** Properties of a FetchGitAheadBehindRequest. */ + interface IFetchGitAheadBehindRequest { + + /** FetchGitAheadBehindRequest name */ + name?: (string|null); + + /** FetchGitAheadBehindRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a FetchGitAheadBehindRequest. */ + class FetchGitAheadBehindRequest implements IFetchGitAheadBehindRequest { + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest); + + /** FetchGitAheadBehindRequest name. */ + public name: string; + + /** FetchGitAheadBehindRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchGitAheadBehindResponse. */ + interface IFetchGitAheadBehindResponse { + + /** FetchGitAheadBehindResponse commitsAhead */ + commitsAhead?: (number|null); + + /** FetchGitAheadBehindResponse commitsBehind */ + commitsBehind?: (number|null); + } + + /** Represents a FetchGitAheadBehindResponse. */ + class FetchGitAheadBehindResponse implements IFetchGitAheadBehindResponse { + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse); + + /** FetchGitAheadBehindResponse commitsAhead. */ + public commitsAhead: number; + + /** FetchGitAheadBehindResponse commitsBehind. */ + public commitsBehind: number; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommitWorkspaceChangesRequest. */ + interface ICommitWorkspaceChangesRequest { + + /** CommitWorkspaceChangesRequest name */ + name?: (string|null); + + /** CommitWorkspaceChangesRequest author */ + author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage */ + commitMessage?: (string|null); + + /** CommitWorkspaceChangesRequest paths */ + paths?: (string[]|null); + } + + /** Represents a CommitWorkspaceChangesRequest. */ + class CommitWorkspaceChangesRequest implements ICommitWorkspaceChangesRequest { + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest); + + /** CommitWorkspaceChangesRequest name. */ + public name: string; + + /** CommitWorkspaceChangesRequest author. */ + public author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage. */ + public commitMessage: string; + + /** CommitWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message CommitWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResetWorkspaceChangesRequest. */ + interface IResetWorkspaceChangesRequest { + + /** ResetWorkspaceChangesRequest name */ + name?: (string|null); + + /** ResetWorkspaceChangesRequest paths */ + paths?: (string[]|null); + + /** ResetWorkspaceChangesRequest clean */ + clean?: (boolean|null); + } + + /** Represents a ResetWorkspaceChangesRequest. */ + class ResetWorkspaceChangesRequest implements IResetWorkspaceChangesRequest { + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest); + + /** ResetWorkspaceChangesRequest name. */ + public name: string; + + /** ResetWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** ResetWorkspaceChangesRequest clean. */ + public clean: boolean; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message ResetWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileDiffRequest. */ + interface IFetchFileDiffRequest { + + /** FetchFileDiffRequest workspace */ + workspace?: (string|null); + + /** FetchFileDiffRequest path */ + path?: (string|null); + } + + /** Represents a FetchFileDiffRequest. */ + class FetchFileDiffRequest implements IFetchFileDiffRequest { + + /** + * Constructs a new FetchFileDiffRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffRequest); + + /** FetchFileDiffRequest workspace. */ + public workspace: string; + + /** FetchFileDiffRequest path. */ + public path: string; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffRequest): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Verifies a FetchFileDiffRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @param message FetchFileDiffRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileDiffRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileDiffResponse. */ + interface IFetchFileDiffResponse { + + /** FetchFileDiffResponse formattedDiff */ + formattedDiff?: (string|null); + } + + /** Represents a FetchFileDiffResponse. */ + class FetchFileDiffResponse implements IFetchFileDiffResponse { + + /** + * Constructs a new FetchFileDiffResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffResponse); + + /** FetchFileDiffResponse formattedDiff. */ + public formattedDiff: string; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffResponse): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Verifies a FetchFileDiffResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @param message FetchFileDiffResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileDiffResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryDirectoryContentsRequest. */ + interface IQueryDirectoryContentsRequest { + + /** QueryDirectoryContentsRequest workspace */ + workspace?: (string|null); + + /** QueryDirectoryContentsRequest path */ + path?: (string|null); + + /** QueryDirectoryContentsRequest pageSize */ + pageSize?: (number|null); + + /** QueryDirectoryContentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsRequest. */ + class QueryDirectoryContentsRequest implements IQueryDirectoryContentsRequest { + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest); + + /** QueryDirectoryContentsRequest workspace. */ + public workspace: string; + + /** QueryDirectoryContentsRequest path. */ + public path: string; + + /** QueryDirectoryContentsRequest pageSize. */ + public pageSize: number; + + /** QueryDirectoryContentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryDirectoryContentsResponse. */ + interface IQueryDirectoryContentsResponse { + + /** QueryDirectoryContentsResponse directoryEntries */ + directoryEntries?: (google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[]|null); + + /** QueryDirectoryContentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsResponse. */ + class QueryDirectoryContentsResponse implements IQueryDirectoryContentsResponse { + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse); + + /** QueryDirectoryContentsResponse directoryEntries. */ + public directoryEntries: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[]; + + /** QueryDirectoryContentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace QueryDirectoryContentsResponse { + + /** Properties of a DirectoryEntry. */ + interface IDirectoryEntry { + + /** DirectoryEntry file */ + file?: (string|null); + + /** DirectoryEntry directory */ + directory?: (string|null); + } + + /** Represents a DirectoryEntry. */ + class DirectoryEntry implements IDirectoryEntry { + + /** + * Constructs a new DirectoryEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry); + + /** DirectoryEntry file. */ + public file?: (string|null); + + /** DirectoryEntry directory. */ + public directory?: (string|null); + + /** DirectoryEntry entry. */ + public entry?: ("file"|"directory"); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns DirectoryEntry instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Verifies a DirectoryEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DirectoryEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @param message DirectoryEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DirectoryEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a MakeDirectoryRequest. */ + interface IMakeDirectoryRequest { + + /** MakeDirectoryRequest workspace */ + workspace?: (string|null); + + /** MakeDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a MakeDirectoryRequest. */ + class MakeDirectoryRequest implements IMakeDirectoryRequest { + + /** + * Constructs a new MakeDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryRequest); + + /** MakeDirectoryRequest workspace. */ + public workspace: string; + + /** MakeDirectoryRequest path. */ + public path: string; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryRequest): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Verifies a MakeDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @param message MakeDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MakeDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MakeDirectoryResponse. */ + interface IMakeDirectoryResponse { + } + + /** Represents a MakeDirectoryResponse. */ + class MakeDirectoryResponse implements IMakeDirectoryResponse { + + /** + * Constructs a new MakeDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryResponse); + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryResponse): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Verifies a MakeDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @param message MakeDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MakeDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemoveDirectoryRequest. */ + interface IRemoveDirectoryRequest { + + /** RemoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** RemoveDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a RemoveDirectoryRequest. */ + class RemoveDirectoryRequest implements IRemoveDirectoryRequest { + + /** + * Constructs a new RemoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest); + + /** RemoveDirectoryRequest workspace. */ + public workspace: string; + + /** RemoveDirectoryRequest path. */ + public path: string; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Verifies a RemoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @param message RemoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RemoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveDirectoryRequest. */ + interface IMoveDirectoryRequest { + + /** MoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** MoveDirectoryRequest path */ + path?: (string|null); + + /** MoveDirectoryRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveDirectoryRequest. */ + class MoveDirectoryRequest implements IMoveDirectoryRequest { + + /** + * Constructs a new MoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryRequest); + + /** MoveDirectoryRequest workspace. */ + public workspace: string; + + /** MoveDirectoryRequest path. */ + public path: string; + + /** MoveDirectoryRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryRequest): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Verifies a MoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @param message MoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveDirectoryResponse. */ + interface IMoveDirectoryResponse { + } + + /** Represents a MoveDirectoryResponse. */ + class MoveDirectoryResponse implements IMoveDirectoryResponse { + + /** + * Constructs a new MoveDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryResponse); + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryResponse): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Verifies a MoveDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @param message MoveDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReadFileRequest. */ + interface IReadFileRequest { + + /** ReadFileRequest workspace */ + workspace?: (string|null); + + /** ReadFileRequest path */ + path?: (string|null); + } + + /** Represents a ReadFileRequest. */ + class ReadFileRequest implements IReadFileRequest { + + /** + * Constructs a new ReadFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IReadFileRequest); + + /** ReadFileRequest workspace. */ + public workspace: string; + + /** ReadFileRequest path. */ + public path: string; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IReadFileRequest): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Verifies a ReadFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @param message ReadFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ReadFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReadFileResponse. */ + interface IReadFileResponse { + + /** ReadFileResponse fileContents */ + fileContents?: (Uint8Array|string|null); + } + + /** Represents a ReadFileResponse. */ + class ReadFileResponse implements IReadFileResponse { + + /** + * Constructs a new ReadFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IReadFileResponse); + + /** ReadFileResponse fileContents. */ + public fileContents: (Uint8Array|string); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IReadFileResponse): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Verifies a ReadFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @param message ReadFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ReadFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemoveFileRequest. */ + interface IRemoveFileRequest { + + /** RemoveFileRequest workspace */ + workspace?: (string|null); + + /** RemoveFileRequest path */ + path?: (string|null); + } + + /** Represents a RemoveFileRequest. */ + class RemoveFileRequest implements IRemoveFileRequest { + + /** + * Constructs a new RemoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRemoveFileRequest); + + /** RemoveFileRequest workspace. */ + public workspace: string; + + /** RemoveFileRequest path. */ + public path: string; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRemoveFileRequest): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Verifies a RemoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @param message RemoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RemoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveFileRequest. */ + interface IMoveFileRequest { + + /** MoveFileRequest workspace */ + workspace?: (string|null); + + /** MoveFileRequest path */ + path?: (string|null); + + /** MoveFileRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveFileRequest. */ + class MoveFileRequest implements IMoveFileRequest { + + /** + * Constructs a new MoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveFileRequest); + + /** MoveFileRequest workspace. */ + public workspace: string; + + /** MoveFileRequest path. */ + public path: string; + + /** MoveFileRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveFileRequest): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Verifies a MoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @param message MoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveFileResponse. */ + interface IMoveFileResponse { + } + + /** Represents a MoveFileResponse. */ + class MoveFileResponse implements IMoveFileResponse { + + /** + * Constructs a new MoveFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveFileResponse); + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveFileResponse): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Verifies a MoveFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @param message MoveFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteFileRequest. */ + interface IWriteFileRequest { + + /** WriteFileRequest workspace */ + workspace?: (string|null); + + /** WriteFileRequest path */ + path?: (string|null); + + /** WriteFileRequest contents */ + contents?: (Uint8Array|string|null); + } + + /** Represents a WriteFileRequest. */ + class WriteFileRequest implements IWriteFileRequest { + + /** + * Constructs a new WriteFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWriteFileRequest); + + /** WriteFileRequest workspace. */ + public workspace: string; + + /** WriteFileRequest path. */ + public path: string; + + /** WriteFileRequest contents. */ + public contents: (Uint8Array|string); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWriteFileRequest): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Verifies a WriteFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @param message WriteFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WriteFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteFileResponse. */ + interface IWriteFileResponse { + } + + /** Represents a WriteFileResponse. */ + class WriteFileResponse implements IWriteFileResponse { + + /** + * Constructs a new WriteFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWriteFileResponse); + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWriteFileResponse): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Verifies a WriteFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @param message WriteFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WriteFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstallNpmPackagesRequest. */ + interface IInstallNpmPackagesRequest { + + /** InstallNpmPackagesRequest workspace */ + workspace?: (string|null); + } + + /** Represents an InstallNpmPackagesRequest. */ + class InstallNpmPackagesRequest implements IInstallNpmPackagesRequest { + + /** + * Constructs a new InstallNpmPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest); + + /** InstallNpmPackagesRequest workspace. */ + public workspace: string; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @param message InstallNpmPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.InstallNpmPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstallNpmPackagesResponse. */ + interface IInstallNpmPackagesResponse { + } + + /** Represents an InstallNpmPackagesResponse. */ + class InstallNpmPackagesResponse implements IInstallNpmPackagesResponse { + + /** + * Constructs a new InstallNpmPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse); + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @param message InstallNpmPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.InstallNpmPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CompilationResult. */ + interface ICompilationResult { + + /** CompilationResult name */ + name?: (string|null); + + /** CompilationResult gitCommitish */ + gitCommitish?: (string|null); + + /** CompilationResult workspace */ + workspace?: (string|null); + + /** CompilationResult codeCompilationConfig */ + codeCompilationConfig?: (google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion */ + dataformCoreVersion?: (string|null); + + /** CompilationResult compilationErrors */ + compilationErrors?: (google.cloud.dataform.v1beta1.CompilationResult.ICompilationError[]|null); + } + + /** Represents a CompilationResult. */ + class CompilationResult implements ICompilationResult { + + /** + * Constructs a new CompilationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICompilationResult); + + /** CompilationResult name. */ + public name: string; + + /** CompilationResult gitCommitish. */ + public gitCommitish?: (string|null); + + /** CompilationResult workspace. */ + public workspace?: (string|null); + + /** CompilationResult codeCompilationConfig. */ + public codeCompilationConfig?: (google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion. */ + public dataformCoreVersion: string; + + /** CompilationResult compilationErrors. */ + public compilationErrors: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError[]; + + /** CompilationResult source. */ + public source?: ("gitCommitish"|"workspace"); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResult instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICompilationResult): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Verifies a CompilationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @param message CompilationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompilationResult { + + /** Properties of a CodeCompilationConfig. */ + interface ICodeCompilationConfig { + + /** CodeCompilationConfig defaultDatabase */ + defaultDatabase?: (string|null); + + /** CodeCompilationConfig defaultSchema */ + defaultSchema?: (string|null); + + /** CodeCompilationConfig defaultLocation */ + defaultLocation?: (string|null); + + /** CodeCompilationConfig assertionSchema */ + assertionSchema?: (string|null); + + /** CodeCompilationConfig vars */ + vars?: ({ [k: string]: string }|null); + + /** CodeCompilationConfig databaseSuffix */ + databaseSuffix?: (string|null); + + /** CodeCompilationConfig schemaSuffix */ + schemaSuffix?: (string|null); + + /** CodeCompilationConfig tablePrefix */ + tablePrefix?: (string|null); + } + + /** Represents a CodeCompilationConfig. */ + class CodeCompilationConfig implements ICodeCompilationConfig { + + /** + * Constructs a new CodeCompilationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig); + + /** CodeCompilationConfig defaultDatabase. */ + public defaultDatabase: string; + + /** CodeCompilationConfig defaultSchema. */ + public defaultSchema: string; + + /** CodeCompilationConfig defaultLocation. */ + public defaultLocation: string; + + /** CodeCompilationConfig assertionSchema. */ + public assertionSchema: string; + + /** CodeCompilationConfig vars. */ + public vars: { [k: string]: string }; + + /** CodeCompilationConfig databaseSuffix. */ + public databaseSuffix: string; + + /** CodeCompilationConfig schemaSuffix. */ + public schemaSuffix: string; + + /** CodeCompilationConfig tablePrefix. */ + public tablePrefix: string; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CodeCompilationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Verifies a CodeCompilationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CodeCompilationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @param message CodeCompilationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CompilationError. */ + interface ICompilationError { + + /** CompilationError message */ + message?: (string|null); + + /** CompilationError stack */ + stack?: (string|null); + + /** CompilationError path */ + path?: (string|null); + + /** CompilationError actionTarget */ + actionTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + } + + /** Represents a CompilationError. */ + class CompilationError implements ICompilationError { + + /** + * Constructs a new CompilationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError); + + /** CompilationError message. */ + public message: string; + + /** CompilationError stack. */ + public stack: string; + + /** CompilationError path. */ + public path: string; + + /** CompilationError actionTarget. */ + public actionTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** + * Creates a new CompilationError instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationError instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Verifies a CompilationError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @param message CompilationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult.CompilationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ListCompilationResultsRequest. */ + interface IListCompilationResultsRequest { + + /** ListCompilationResultsRequest parent */ + parent?: (string|null); + + /** ListCompilationResultsRequest pageSize */ + pageSize?: (number|null); + + /** ListCompilationResultsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCompilationResultsRequest. */ + class ListCompilationResultsRequest implements IListCompilationResultsRequest { + + /** + * Constructs a new ListCompilationResultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsRequest); + + /** ListCompilationResultsRequest parent. */ + public parent: string; + + /** ListCompilationResultsRequest pageSize. */ + public pageSize: number; + + /** ListCompilationResultsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsRequest): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Verifies a ListCompilationResultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @param message ListCompilationResultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListCompilationResultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCompilationResultsResponse. */ + interface IListCompilationResultsResponse { + + /** ListCompilationResultsResponse compilationResults */ + compilationResults?: (google.cloud.dataform.v1beta1.ICompilationResult[]|null); + + /** ListCompilationResultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCompilationResultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCompilationResultsResponse. */ + class ListCompilationResultsResponse implements IListCompilationResultsResponse { + + /** + * Constructs a new ListCompilationResultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsResponse); + + /** ListCompilationResultsResponse compilationResults. */ + public compilationResults: google.cloud.dataform.v1beta1.ICompilationResult[]; + + /** ListCompilationResultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCompilationResultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsResponse): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Verifies a ListCompilationResultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @param message ListCompilationResultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListCompilationResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCompilationResultRequest. */ + interface IGetCompilationResultRequest { + + /** GetCompilationResultRequest name */ + name?: (string|null); + } + + /** Represents a GetCompilationResultRequest. */ + class GetCompilationResultRequest implements IGetCompilationResultRequest { + + /** + * Constructs a new GetCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetCompilationResultRequest); + + /** GetCompilationResultRequest name. */ + public name: string; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetCompilationResultRequest): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Verifies a GetCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @param message GetCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCompilationResultRequest. */ + interface ICreateCompilationResultRequest { + + /** CreateCompilationResultRequest parent */ + parent?: (string|null); + + /** CreateCompilationResultRequest compilationResult */ + compilationResult?: (google.cloud.dataform.v1beta1.ICompilationResult|null); + } + + /** Represents a CreateCompilationResultRequest. */ + class CreateCompilationResultRequest implements ICreateCompilationResultRequest { + + /** + * Constructs a new CreateCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest); + + /** CreateCompilationResultRequest parent. */ + public parent: string; + + /** CreateCompilationResultRequest compilationResult. */ + public compilationResult?: (google.cloud.dataform.v1beta1.ICompilationResult|null); + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Verifies a CreateCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @param message CreateCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Target. */ + interface ITarget { + + /** Target database */ + database?: (string|null); + + /** Target schema */ + schema?: (string|null); + + /** Target name */ + name?: (string|null); + } + + /** Represents a Target. */ + class Target implements ITarget { + + /** + * Constructs a new Target. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ITarget); + + /** Target database. */ + public database: string; + + /** Target schema. */ + public schema: string; + + /** Target name. */ + public name: string; + + /** + * Creates a new Target instance using the specified properties. + * @param [properties] Properties to set + * @returns Target instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ITarget): google.cloud.dataform.v1beta1.Target; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Target message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Target; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Target; + + /** + * Verifies a Target message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Target + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Target; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @param message Target + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Target to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RelationDescriptor. */ + interface IRelationDescriptor { + + /** RelationDescriptor description */ + description?: (string|null); + + /** RelationDescriptor columns */ + columns?: (google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor[]|null); + + /** RelationDescriptor bigqueryLabels */ + bigqueryLabels?: ({ [k: string]: string }|null); + } + + /** Represents a RelationDescriptor. */ + class RelationDescriptor implements IRelationDescriptor { + + /** + * Constructs a new RelationDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRelationDescriptor); + + /** RelationDescriptor description. */ + public description: string; + + /** RelationDescriptor columns. */ + public columns: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor[]; + + /** RelationDescriptor bigqueryLabels. */ + public bigqueryLabels: { [k: string]: string }; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns RelationDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRelationDescriptor): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Verifies a RelationDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RelationDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @param message RelationDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RelationDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RelationDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RelationDescriptor { + + /** Properties of a ColumnDescriptor. */ + interface IColumnDescriptor { + + /** ColumnDescriptor path */ + path?: (string[]|null); + + /** ColumnDescriptor description */ + description?: (string|null); + + /** ColumnDescriptor bigqueryPolicyTags */ + bigqueryPolicyTags?: (string[]|null); + } + + /** Represents a ColumnDescriptor. */ + class ColumnDescriptor implements IColumnDescriptor { + + /** + * Constructs a new ColumnDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor); + + /** ColumnDescriptor path. */ + public path: string[]; + + /** ColumnDescriptor description. */ + public description: string; + + /** ColumnDescriptor bigqueryPolicyTags. */ + public bigqueryPolicyTags: string[]; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Verifies a ColumnDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @param message ColumnDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a CompilationResultAction. */ + interface ICompilationResultAction { + + /** CompilationResultAction target */ + target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction filePath */ + filePath?: (string|null); + + /** CompilationResultAction relation */ + relation?: (google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations */ + operations?: (google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion */ + assertion?: (google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration */ + declaration?: (google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null); + } + + /** Represents a CompilationResultAction. */ + class CompilationResultAction implements ICompilationResultAction { + + /** + * Constructs a new CompilationResultAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICompilationResultAction); + + /** CompilationResultAction target. */ + public target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction filePath. */ + public filePath: string; + + /** CompilationResultAction relation. */ + public relation?: (google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations. */ + public operations?: (google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion. */ + public assertion?: (google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration. */ + public declaration?: (google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null); + + /** CompilationResultAction compiledObject. */ + public compiledObject?: ("relation"|"operations"|"assertion"|"declaration"); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResultAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICompilationResultAction): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Verifies a CompilationResultAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResultAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @param message CompilationResultAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResultAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompilationResultAction { + + /** Properties of a Relation. */ + interface IRelation { + + /** Relation dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Relation disabled */ + disabled?: (boolean|null); + + /** Relation tags */ + tags?: (string[]|null); + + /** Relation relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Relation relationType */ + relationType?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|null); + + /** Relation selectQuery */ + selectQuery?: (string|null); + + /** Relation preOperations */ + preOperations?: (string[]|null); + + /** Relation postOperations */ + postOperations?: (string[]|null); + + /** Relation incrementalTableConfig */ + incrementalTableConfig?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression */ + partitionExpression?: (string|null); + + /** Relation clusterExpressions */ + clusterExpressions?: (string[]|null); + + /** Relation partitionExpirationDays */ + partitionExpirationDays?: (number|null); + + /** Relation requirePartitionFilter */ + requirePartitionFilter?: (boolean|null); + + /** Relation additionalOptions */ + additionalOptions?: ({ [k: string]: string }|null); + } + + /** Represents a Relation. */ + class Relation implements IRelation { + + /** + * Constructs a new Relation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation); + + /** Relation dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Relation disabled. */ + public disabled: boolean; + + /** Relation tags. */ + public tags: string[]; + + /** Relation relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Relation relationType. */ + public relationType: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType); + + /** Relation selectQuery. */ + public selectQuery: string; + + /** Relation preOperations. */ + public preOperations: string[]; + + /** Relation postOperations. */ + public postOperations: string[]; + + /** Relation incrementalTableConfig. */ + public incrementalTableConfig?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression. */ + public partitionExpression: string; + + /** Relation clusterExpressions. */ + public clusterExpressions: string[]; + + /** Relation partitionExpirationDays. */ + public partitionExpirationDays: number; + + /** Relation requirePartitionFilter. */ + public requirePartitionFilter: boolean; + + /** Relation additionalOptions. */ + public additionalOptions: { [k: string]: string }; + + /** + * Creates a new Relation instance using the specified properties. + * @param [properties] Properties to set + * @returns Relation instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Verifies a Relation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Relation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @param message Relation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Relation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Relation { + + /** RelationType enum. */ + enum RelationType { + RELATION_TYPE_UNSPECIFIED = 0, + TABLE = 1, + VIEW = 2, + INCREMENTAL_TABLE = 3, + MATERIALIZED_VIEW = 4 + } + + /** Properties of an IncrementalTableConfig. */ + interface IIncrementalTableConfig { + + /** IncrementalTableConfig incrementalSelectQuery */ + incrementalSelectQuery?: (string|null); + + /** IncrementalTableConfig refreshDisabled */ + refreshDisabled?: (boolean|null); + + /** IncrementalTableConfig uniqueKeyParts */ + uniqueKeyParts?: (string[]|null); + + /** IncrementalTableConfig updatePartitionFilter */ + updatePartitionFilter?: (string|null); + + /** IncrementalTableConfig incrementalPreOperations */ + incrementalPreOperations?: (string[]|null); + + /** IncrementalTableConfig incrementalPostOperations */ + incrementalPostOperations?: (string[]|null); + } + + /** Represents an IncrementalTableConfig. */ + class IncrementalTableConfig implements IIncrementalTableConfig { + + /** + * Constructs a new IncrementalTableConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig); + + /** IncrementalTableConfig incrementalSelectQuery. */ + public incrementalSelectQuery: string; + + /** IncrementalTableConfig refreshDisabled. */ + public refreshDisabled: boolean; + + /** IncrementalTableConfig uniqueKeyParts. */ + public uniqueKeyParts: string[]; + + /** IncrementalTableConfig updatePartitionFilter. */ + public updatePartitionFilter: string; + + /** IncrementalTableConfig incrementalPreOperations. */ + public incrementalPreOperations: string[]; + + /** IncrementalTableConfig incrementalPostOperations. */ + public incrementalPostOperations: string[]; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalTableConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Verifies an IncrementalTableConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalTableConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @param message IncrementalTableConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Operations. */ + interface IOperations { + + /** Operations dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Operations disabled */ + disabled?: (boolean|null); + + /** Operations tags */ + tags?: (string[]|null); + + /** Operations relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Operations queries */ + queries?: (string[]|null); + + /** Operations hasOutput */ + hasOutput?: (boolean|null); + } + + /** Represents an Operations. */ + class Operations implements IOperations { + + /** + * Constructs a new Operations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations); + + /** Operations dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Operations disabled. */ + public disabled: boolean; + + /** Operations tags. */ + public tags: string[]; + + /** Operations relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Operations queries. */ + public queries: string[]; + + /** Operations hasOutput. */ + public hasOutput: boolean; + + /** + * Creates a new Operations instance using the specified properties. + * @param [properties] Properties to set + * @returns Operations instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Verifies an Operations message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @param message Operations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Operations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Assertion. */ + interface IAssertion { + + /** Assertion dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Assertion parentAction */ + parentAction?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** Assertion disabled */ + disabled?: (boolean|null); + + /** Assertion tags */ + tags?: (string[]|null); + + /** Assertion selectQuery */ + selectQuery?: (string|null); + + /** Assertion relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + } + + /** Represents an Assertion. */ + class Assertion implements IAssertion { + + /** + * Constructs a new Assertion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion); + + /** Assertion dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Assertion parentAction. */ + public parentAction?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** Assertion disabled. */ + public disabled: boolean; + + /** Assertion tags. */ + public tags: string[]; + + /** Assertion selectQuery. */ + public selectQuery: string; + + /** Assertion relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** + * Creates a new Assertion instance using the specified properties. + * @param [properties] Properties to set + * @returns Assertion instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Verifies an Assertion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Assertion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @param message Assertion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Assertion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Assertion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration); + + /** Declaration relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a QueryCompilationResultActionsRequest. */ + interface IQueryCompilationResultActionsRequest { + + /** QueryCompilationResultActionsRequest name */ + name?: (string|null); + + /** QueryCompilationResultActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryCompilationResultActionsRequest pageToken */ + pageToken?: (string|null); + + /** QueryCompilationResultActionsRequest filter */ + filter?: (string|null); + } + + /** Represents a QueryCompilationResultActionsRequest. */ + class QueryCompilationResultActionsRequest implements IQueryCompilationResultActionsRequest { + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest); + + /** QueryCompilationResultActionsRequest name. */ + public name: string; + + /** QueryCompilationResultActionsRequest pageSize. */ + public pageSize: number; + + /** QueryCompilationResultActionsRequest pageToken. */ + public pageToken: string; + + /** QueryCompilationResultActionsRequest filter. */ + public filter: string; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryCompilationResultActionsResponse. */ + interface IQueryCompilationResultActionsResponse { + + /** QueryCompilationResultActionsResponse compilationResultActions */ + compilationResultActions?: (google.cloud.dataform.v1beta1.ICompilationResultAction[]|null); + + /** QueryCompilationResultActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryCompilationResultActionsResponse. */ + class QueryCompilationResultActionsResponse implements IQueryCompilationResultActionsResponse { + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse); + + /** QueryCompilationResultActionsResponse compilationResultActions. */ + public compilationResultActions: google.cloud.dataform.v1beta1.ICompilationResultAction[]; + + /** QueryCompilationResultActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkflowInvocation. */ + interface IWorkflowInvocation { + + /** WorkflowInvocation name */ + name?: (string|null); + + /** WorkflowInvocation compilationResult */ + compilationResult?: (string|null); + + /** WorkflowInvocation invocationConfig */ + invocationConfig?: (google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state */ + state?: (google.cloud.dataform.v1beta1.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocation.State|null); + + /** WorkflowInvocation invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + } + + /** Represents a WorkflowInvocation. */ + class WorkflowInvocation implements IWorkflowInvocation { + + /** + * Constructs a new WorkflowInvocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocation); + + /** WorkflowInvocation name. */ + public name: string; + + /** WorkflowInvocation compilationResult. */ + public compilationResult: string; + + /** WorkflowInvocation invocationConfig. */ + public invocationConfig?: (google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state. */ + public state: (google.cloud.dataform.v1beta1.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocation.State); + + /** WorkflowInvocation invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocation instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocation): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Verifies a WorkflowInvocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @param message WorkflowInvocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkflowInvocation { + + /** Properties of an InvocationConfig. */ + interface IInvocationConfig { + + /** InvocationConfig includedTargets */ + includedTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** InvocationConfig includedTags */ + includedTags?: (string[]|null); + + /** InvocationConfig transitiveDependenciesIncluded */ + transitiveDependenciesIncluded?: (boolean|null); + + /** InvocationConfig transitiveDependentsIncluded */ + transitiveDependentsIncluded?: (boolean|null); + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled */ + fullyRefreshIncrementalTablesEnabled?: (boolean|null); + } + + /** Represents an InvocationConfig. */ + class InvocationConfig implements IInvocationConfig { + + /** + * Constructs a new InvocationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig); + + /** InvocationConfig includedTargets. */ + public includedTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** InvocationConfig includedTags. */ + public includedTags: string[]; + + /** InvocationConfig transitiveDependenciesIncluded. */ + public transitiveDependenciesIncluded: boolean; + + /** InvocationConfig transitiveDependentsIncluded. */ + public transitiveDependentsIncluded: boolean; + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled. */ + public fullyRefreshIncrementalTablesEnabled: boolean; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InvocationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Verifies an InvocationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvocationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @param message InvocationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvocationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + CANCELLED = 3, + FAILED = 4, + CANCELING = 5 + } + } + + /** Properties of a ListWorkflowInvocationsRequest. */ + interface IListWorkflowInvocationsRequest { + + /** ListWorkflowInvocationsRequest parent */ + parent?: (string|null); + + /** ListWorkflowInvocationsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkflowInvocationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListWorkflowInvocationsRequest. */ + class ListWorkflowInvocationsRequest implements IListWorkflowInvocationsRequest { + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest); + + /** ListWorkflowInvocationsRequest parent. */ + public parent: string; + + /** ListWorkflowInvocationsRequest pageSize. */ + public pageSize: number; + + /** ListWorkflowInvocationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkflowInvocationsResponse. */ + interface IListWorkflowInvocationsResponse { + + /** ListWorkflowInvocationsResponse workflowInvocations */ + workflowInvocations?: (google.cloud.dataform.v1beta1.IWorkflowInvocation[]|null); + + /** ListWorkflowInvocationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkflowInvocationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkflowInvocationsResponse. */ + class ListWorkflowInvocationsResponse implements IListWorkflowInvocationsResponse { + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse); + + /** ListWorkflowInvocationsResponse workflowInvocations. */ + public workflowInvocations: google.cloud.dataform.v1beta1.IWorkflowInvocation[]; + + /** ListWorkflowInvocationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkflowInvocationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetWorkflowInvocationRequest. */ + interface IGetWorkflowInvocationRequest { + + /** GetWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkflowInvocationRequest. */ + class GetWorkflowInvocationRequest implements IGetWorkflowInvocationRequest { + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest); + + /** GetWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message GetWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateWorkflowInvocationRequest. */ + interface ICreateWorkflowInvocationRequest { + + /** CreateWorkflowInvocationRequest parent */ + parent?: (string|null); + + /** CreateWorkflowInvocationRequest workflowInvocation */ + workflowInvocation?: (google.cloud.dataform.v1beta1.IWorkflowInvocation|null); + } + + /** Represents a CreateWorkflowInvocationRequest. */ + class CreateWorkflowInvocationRequest implements ICreateWorkflowInvocationRequest { + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest); + + /** CreateWorkflowInvocationRequest parent. */ + public parent: string; + + /** CreateWorkflowInvocationRequest workflowInvocation. */ + public workflowInvocation?: (google.cloud.dataform.v1beta1.IWorkflowInvocation|null); + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CreateWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkflowInvocationRequest. */ + interface IDeleteWorkflowInvocationRequest { + + /** DeleteWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkflowInvocationRequest. */ + class DeleteWorkflowInvocationRequest implements IDeleteWorkflowInvocationRequest { + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest); + + /** DeleteWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message DeleteWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelWorkflowInvocationRequest. */ + interface ICancelWorkflowInvocationRequest { + + /** CancelWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a CancelWorkflowInvocationRequest. */ + class CancelWorkflowInvocationRequest implements ICancelWorkflowInvocationRequest { + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest); + + /** CancelWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CancelWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkflowInvocationAction. */ + interface IWorkflowInvocationAction { + + /** WorkflowInvocationAction target */ + target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction state */ + state?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|null); + + /** WorkflowInvocationAction failureReason */ + failureReason?: (string|null); + + /** WorkflowInvocationAction invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction */ + bigqueryAction?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null); + } + + /** Represents a WorkflowInvocationAction. */ + class WorkflowInvocationAction implements IWorkflowInvocationAction { + + /** + * Constructs a new WorkflowInvocationAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocationAction); + + /** WorkflowInvocationAction target. */ + public target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction state. */ + public state: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocationAction.State); + + /** WorkflowInvocationAction failureReason. */ + public failureReason: string; + + /** WorkflowInvocationAction invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction. */ + public bigqueryAction?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null); + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocationAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocationAction): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Verifies a WorkflowInvocationAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocationAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @param message WorkflowInvocationAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkflowInvocationAction { + + /** State enum. */ + enum State { + PENDING = 0, + RUNNING = 1, + SKIPPED = 2, + DISABLED = 3, + SUCCEEDED = 4, + CANCELLED = 5, + FAILED = 6 + } + + /** Properties of a BigQueryAction. */ + interface IBigQueryAction { + + /** BigQueryAction sqlScript */ + sqlScript?: (string|null); + } + + /** Represents a BigQueryAction. */ + class BigQueryAction implements IBigQueryAction { + + /** + * Constructs a new BigQueryAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction); + + /** BigQueryAction sqlScript. */ + public sqlScript: string; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Verifies a BigQueryAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @param message BigQueryAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a QueryWorkflowInvocationActionsRequest. */ + interface IQueryWorkflowInvocationActionsRequest { + + /** QueryWorkflowInvocationActionsRequest name */ + name?: (string|null); + + /** QueryWorkflowInvocationActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryWorkflowInvocationActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsRequest. */ + class QueryWorkflowInvocationActionsRequest implements IQueryWorkflowInvocationActionsRequest { + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest); + + /** QueryWorkflowInvocationActionsRequest name. */ + public name: string; + + /** QueryWorkflowInvocationActionsRequest pageSize. */ + public pageSize: number; + + /** QueryWorkflowInvocationActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryWorkflowInvocationActionsResponse. */ + interface IQueryWorkflowInvocationActionsResponse { + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions */ + workflowInvocationActions?: (google.cloud.dataform.v1beta1.IWorkflowInvocationAction[]|null); + + /** QueryWorkflowInvocationActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsResponse. */ + class QueryWorkflowInvocationActionsResponse implements IQueryWorkflowInvocationActionsResponse { + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse); + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions. */ + public workflowInvocationActions: google.cloud.dataform.v1beta1.IWorkflowInvocationAction[]; + + /** QueryWorkflowInvocationActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } } diff --git a/protos/protos.js b/protos/protos.js index b74a4da..4ebc3ed 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -19451,6 +19451,19400 @@ return v1alpha2; })(); + dataform.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.dataform + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Dataform = (function() { + + /** + * Constructs a new Dataform service. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Dataform + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Dataform(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Dataform.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Dataform; + + /** + * Creates new Dataform service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataform.v1beta1.Dataform + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Dataform} RPC service. Useful where requests and/or responses are streamed. + */ + Dataform.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listRepositories}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest, $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.cloud.dataform.v1beta1.GetRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#updateRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchRemoteBranches}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchRemoteBranchesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} [response] FetchRemoteBranchesResponse + */ + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranchesCallback} callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchRemoteBranches = function fetchRemoteBranches(request, callback) { + return this.rpcCall(fetchRemoteBranches, $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest, $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse, request, callback); + }, "name", { value: "FetchRemoteBranches" }); + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkspaces}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListWorkspacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListWorkspacesResponse} [response] ListWorkspacesResponse + */ + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListWorkspacesCallback} callback Node-style callback called with the error, if any, and ListWorkspacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkspaces = function listWorkspaces(request, callback) { + return this.rpcCall(listWorkspaces, $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest, $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse, request, callback); + }, "name", { value: "ListWorkspaces" }); + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Workspace} [response] Workspace + */ + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkspace = function getWorkspace(request, callback) { + return this.rpcCall(getWorkspace, $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest, $root.google.cloud.dataform.v1beta1.Workspace, request, callback); + }, "name", { value: "GetWorkspace" }); + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Workspace} [response] Workspace + */ + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkspace = function createWorkspace(request, callback) { + return this.rpcCall(createWorkspace, $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest, $root.google.cloud.dataform.v1beta1.Workspace, request, callback); + }, "name", { value: "CreateWorkspace" }); + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteWorkspaceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkspace = function deleteWorkspace(request, callback) { + return this.rpcCall(deleteWorkspace, $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkspace" }); + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#installNpmPackages}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef InstallNpmPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} [response] InstallNpmPackagesResponse + */ + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.InstallNpmPackagesCallback} callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.installNpmPackages = function installNpmPackages(request, callback) { + return this.rpcCall(installNpmPackages, $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest, $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse, request, callback); + }, "name", { value: "InstallNpmPackages" }); + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pullGitCommits}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef PullGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.PullGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pullGitCommits = function pullGitCommits(request, callback) { + return this.rpcCall(pullGitCommits, $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PullGitCommits" }); + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pushGitCommits}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef PushGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.PushGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pushGitCommits = function pushGitCommits(request, callback) { + return this.rpcCall(pushGitCommits, $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PushGitCommits" }); + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileGitStatuses}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchFileGitStatusesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} [response] FetchFileGitStatusesResponse + */ + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatusesCallback} callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileGitStatuses = function fetchFileGitStatuses(request, callback) { + return this.rpcCall(fetchFileGitStatuses, $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest, $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse, request, callback); + }, "name", { value: "FetchFileGitStatuses" }); + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchGitAheadBehind}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchGitAheadBehindCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} [response] FetchGitAheadBehindResponse + */ + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehindCallback} callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchGitAheadBehind = function fetchGitAheadBehind(request, callback) { + return this.rpcCall(fetchGitAheadBehind, $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest, $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse, request, callback); + }, "name", { value: "FetchGitAheadBehind" }); + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#commitWorkspaceChanges}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CommitWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.commitWorkspaceChanges = function commitWorkspaceChanges(request, callback) { + return this.rpcCall(commitWorkspaceChanges, $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CommitWorkspaceChanges" }); + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#resetWorkspaceChanges}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ResetWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.resetWorkspaceChanges = function resetWorkspaceChanges(request, callback) { + return this.rpcCall(resetWorkspaceChanges, $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ResetWorkspaceChanges" }); + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileDiff}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchFileDiffCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchFileDiffResponse} [response] FetchFileDiffResponse + */ + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchFileDiffCallback} callback Node-style callback called with the error, if any, and FetchFileDiffResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileDiff = function fetchFileDiff(request, callback) { + return this.rpcCall(fetchFileDiff, $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest, $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse, request, callback); + }, "name", { value: "FetchFileDiff" }); + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryDirectoryContents}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryDirectoryContentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} [response] QueryDirectoryContentsResponse + */ + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContentsCallback} callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryDirectoryContents = function queryDirectoryContents(request, callback) { + return this.rpcCall(queryDirectoryContents, $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest, $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse, request, callback); + }, "name", { value: "QueryDirectoryContents" }); + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#makeDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MakeDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MakeDirectoryResponse} [response] MakeDirectoryResponse + */ + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MakeDirectoryCallback} callback Node-style callback called with the error, if any, and MakeDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.makeDirectory = function makeDirectory(request, callback) { + return this.rpcCall(makeDirectory, $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest, $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse, request, callback); + }, "name", { value: "MakeDirectory" }); + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef RemoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.RemoveDirectoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeDirectory = function removeDirectory(request, callback) { + return this.rpcCall(removeDirectory, $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveDirectory" }); + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MoveDirectoryResponse} [response] MoveDirectoryResponse + */ + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MoveDirectoryCallback} callback Node-style callback called with the error, if any, and MoveDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveDirectory = function moveDirectory(request, callback) { + return this.rpcCall(moveDirectory, $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest, $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse, request, callback); + }, "name", { value: "MoveDirectory" }); + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#readFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ReadFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ReadFileResponse} [response] ReadFileResponse + */ + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} request ReadFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ReadFileCallback} callback Node-style callback called with the error, if any, and ReadFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.readFile = function readFile(request, callback) { + return this.rpcCall(readFile, $root.google.cloud.dataform.v1beta1.ReadFileRequest, $root.google.cloud.dataform.v1beta1.ReadFileResponse, request, callback); + }, "name", { value: "ReadFile" }); + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} request ReadFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef RemoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.RemoveFileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeFile = function removeFile(request, callback) { + return this.rpcCall(removeFile, $root.google.cloud.dataform.v1beta1.RemoveFileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveFile" }); + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MoveFileResponse} [response] MoveFileResponse + */ + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} request MoveFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MoveFileCallback} callback Node-style callback called with the error, if any, and MoveFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveFile = function moveFile(request, callback) { + return this.rpcCall(moveFile, $root.google.cloud.dataform.v1beta1.MoveFileRequest, $root.google.cloud.dataform.v1beta1.MoveFileResponse, request, callback); + }, "name", { value: "MoveFile" }); + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} request MoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#writeFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef WriteFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WriteFileResponse} [response] WriteFileResponse + */ + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} request WriteFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.WriteFileCallback} callback Node-style callback called with the error, if any, and WriteFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.writeFile = function writeFile(request, callback) { + return this.rpcCall(writeFile, $root.google.cloud.dataform.v1beta1.WriteFileRequest, $root.google.cloud.dataform.v1beta1.WriteFileResponse, request, callback); + }, "name", { value: "WriteFile" }); + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} request WriteFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listCompilationResults}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListCompilationResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} [response] ListCompilationResultsResponse + */ + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListCompilationResultsCallback} callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listCompilationResults = function listCompilationResults(request, callback) { + return this.rpcCall(listCompilationResults, $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest, $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse, request, callback); + }, "name", { value: "ListCompilationResults" }); + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getCompilationResult}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.CompilationResult} [response] CompilationResult + */ + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getCompilationResult = function getCompilationResult(request, callback) { + return this.rpcCall(getCompilationResult, $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest, $root.google.cloud.dataform.v1beta1.CompilationResult, request, callback); + }, "name", { value: "GetCompilationResult" }); + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createCompilationResult}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.CompilationResult} [response] CompilationResult + */ + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createCompilationResult = function createCompilationResult(request, callback) { + return this.rpcCall(createCompilationResult, $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest, $root.google.cloud.dataform.v1beta1.CompilationResult, request, callback); + }, "name", { value: "CreateCompilationResult" }); + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryCompilationResultActions}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryCompilationResultActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} [response] QueryCompilationResultActionsResponse + */ + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActionsCallback} callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryCompilationResultActions = function queryCompilationResultActions(request, callback) { + return this.rpcCall(queryCompilationResultActions, $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest, $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse, request, callback); + }, "name", { value: "QueryCompilationResultActions" }); + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkflowInvocations}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListWorkflowInvocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} [response] ListWorkflowInvocationsResponse + */ + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocationsCallback} callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkflowInvocations = function listWorkflowInvocations(request, callback) { + return this.rpcCall(listWorkflowInvocations, $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest, $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse, request, callback); + }, "name", { value: "ListWorkflowInvocations" }); + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkflowInvocation = function getWorkflowInvocation(request, callback) { + return this.rpcCall(getWorkflowInvocation, $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest, $root.google.cloud.dataform.v1beta1.WorkflowInvocation, request, callback); + }, "name", { value: "GetWorkflowInvocation" }); + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkflowInvocation = function createWorkflowInvocation(request, callback) { + return this.rpcCall(createWorkflowInvocation, $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest, $root.google.cloud.dataform.v1beta1.WorkflowInvocation, request, callback); + }, "name", { value: "CreateWorkflowInvocation" }); + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkflowInvocation = function deleteWorkflowInvocation(request, callback) { + return this.rpcCall(deleteWorkflowInvocation, $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkflowInvocation" }); + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#cancelWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CancelWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.cancelWorkflowInvocation = function cancelWorkflowInvocation(request, callback) { + return this.rpcCall(cancelWorkflowInvocation, $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelWorkflowInvocation" }); + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryWorkflowInvocationActions}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryWorkflowInvocationActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} [response] QueryWorkflowInvocationActionsResponse + */ + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActionsCallback} callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryWorkflowInvocationActions = function queryWorkflowInvocationActions(request, callback) { + return this.rpcCall(queryWorkflowInvocationActions, $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest, $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse, request, callback); + }, "name", { value: "QueryWorkflowInvocationActions" }); + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Dataform; + })(); + + v1beta1.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRepository + * @property {string|null} [name] Repository name + * @property {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null} [gitRemoteSettings] Repository gitRemoteSettings + */ + + /** + * Constructs a new Repository. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.cloud.dataform.v1beta1.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository gitRemoteSettings. + * @member {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null|undefined} gitRemoteSettings + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + */ + Repository.prototype.gitRemoteSettings = null; + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gitRemoteSettings != null && Object.hasOwnProperty.call(message, "gitRemoteSettings")) + $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.encode(message.gitRemoteSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Repository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify(message.gitRemoteSettings); + if (error) + return "gitRemoteSettings." + error; + } + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Repository) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Repository(); + if (object.name != null) + message.name = String(object.name); + if (object.gitRemoteSettings != null) { + if (typeof object.gitRemoteSettings !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.Repository.gitRemoteSettings: object expected"); + message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.fromObject(object.gitRemoteSettings); + } + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.gitRemoteSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) + object.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.toObject(message.gitRemoteSettings, options); + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Repository.GitRemoteSettings = (function() { + + /** + * Properties of a GitRemoteSettings. + * @memberof google.cloud.dataform.v1beta1.Repository + * @interface IGitRemoteSettings + * @property {string|null} [url] GitRemoteSettings url + * @property {string|null} [defaultBranch] GitRemoteSettings defaultBranch + * @property {string|null} [authenticationTokenSecretVersion] GitRemoteSettings authenticationTokenSecretVersion + * @property {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|null} [tokenStatus] GitRemoteSettings tokenStatus + */ + + /** + * Constructs a new GitRemoteSettings. + * @memberof google.cloud.dataform.v1beta1.Repository + * @classdesc Represents a GitRemoteSettings. + * @implements IGitRemoteSettings + * @constructor + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings=} [properties] Properties to set + */ + function GitRemoteSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitRemoteSettings url. + * @member {string} url + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.url = ""; + + /** + * GitRemoteSettings defaultBranch. + * @member {string} defaultBranch + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.defaultBranch = ""; + + /** + * GitRemoteSettings authenticationTokenSecretVersion. + * @member {string} authenticationTokenSecretVersion + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.authenticationTokenSecretVersion = ""; + + /** + * GitRemoteSettings tokenStatus. + * @member {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus} tokenStatus + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.tokenStatus = 0; + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings instance + */ + GitRemoteSettings.create = function create(properties) { + return new GitRemoteSettings(properties); + }; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.defaultBranch != null && Object.hasOwnProperty.call(message, "defaultBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultBranch); + if (message.authenticationTokenSecretVersion != null && Object.hasOwnProperty.call(message, "authenticationTokenSecretVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.authenticationTokenSecretVersion); + if (message.tokenStatus != null && Object.hasOwnProperty.call(message, "tokenStatus")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.tokenStatus); + return writer; + }; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + case 2: + message.defaultBranch = reader.string(); + break; + case 3: + message.authenticationTokenSecretVersion = reader.string(); + break; + case 4: + message.tokenStatus = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitRemoteSettings message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitRemoteSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + if (!$util.isString(message.defaultBranch)) + return "defaultBranch: string expected"; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + if (!$util.isString(message.authenticationTokenSecretVersion)) + return "authenticationTokenSecretVersion: string expected"; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + switch (message.tokenStatus) { + default: + return "tokenStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + */ + GitRemoteSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings(); + if (object.url != null) + message.url = String(object.url); + if (object.defaultBranch != null) + message.defaultBranch = String(object.defaultBranch); + if (object.authenticationTokenSecretVersion != null) + message.authenticationTokenSecretVersion = String(object.authenticationTokenSecretVersion); + switch (object.tokenStatus) { + case "TOKEN_STATUS_UNSPECIFIED": + case 0: + message.tokenStatus = 0; + break; + case "NOT_FOUND": + case 1: + message.tokenStatus = 1; + break; + case "INVALID": + case 2: + message.tokenStatus = 2; + break; + case "VALID": + case 3: + message.tokenStatus = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} message GitRemoteSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitRemoteSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.defaultBranch = ""; + object.authenticationTokenSecretVersion = ""; + object.tokenStatus = options.enums === String ? "TOKEN_STATUS_UNSPECIFIED" : 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + object.defaultBranch = message.defaultBranch; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + object.authenticationTokenSecretVersion = message.authenticationTokenSecretVersion; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; + return object; + }; + + /** + * Converts this GitRemoteSettings to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + * @returns {Object.} JSON object + */ + GitRemoteSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * TokenStatus enum. + * @name google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus + * @enum {number} + * @property {number} TOKEN_STATUS_UNSPECIFIED=0 TOKEN_STATUS_UNSPECIFIED value + * @property {number} NOT_FOUND=1 NOT_FOUND value + * @property {number} INVALID=2 INVALID value + * @property {number} VALID=3 VALID value + */ + GitRemoteSettings.TokenStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TOKEN_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_FOUND"] = 1; + values[valuesById[2] = "INVALID"] = 2; + values[valuesById[3] = "VALID"] = 3; + return values; + })(); + + return GitRemoteSettings; + })(); + + return Repository; + })(); + + v1beta1.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @property {string|null} [orderBy] ListRepositoriesRequest orderBy + * @property {string|null} [filter] ListRepositoriesRequest filter + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * ListRepositoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.orderBy = ""; + + /** + * ListRepositoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesRequest; + })(); + + v1beta1.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + * @property {Array.|null} [unreachable] ListRepositoriesResponse unreachable + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * ListRepositoriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repositories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.repositories = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesResponse; + })(); + + v1beta1.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRepositoryRequest; + })(); + + v1beta1.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {google.cloud.dataform.v1beta1.IRepository|null} [repository] CreateRepositoryRequest repository + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.cloud.dataform.v1beta1.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.repositoryId); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + case 3: + message.repositoryId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repository); + } + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repository = null; + object.repositoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repository, options); + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateRepositoryRequest; + })(); + + v1beta1.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IUpdateRepositoryRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + * @property {google.cloud.dataform.v1beta1.IRepository|null} [repository] UpdateRepositoryRequest repository + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * UpdateRepositoryRequest repository. + * @member {google.cloud.dataform.v1beta1.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repository); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.repository = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateRepositoryRequest; + })(); + + v1beta1.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + * @property {boolean|null} [force] DeleteRepositoryRequest force + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * DeleteRepositoryRequest force. + * @member {boolean} force + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.force = false; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteRepositoryRequest; + })(); + + v1beta1.FetchRemoteBranchesRequest = (function() { + + /** + * Properties of a FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchRemoteBranchesRequest + * @property {string|null} [name] FetchRemoteBranchesRequest name + */ + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchRemoteBranchesRequest. + * @implements IFetchRemoteBranchesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest=} [properties] Properties to set + */ + function FetchRemoteBranchesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @instance + */ + FetchRemoteBranchesRequest.prototype.name = ""; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest instance + */ + FetchRemoteBranchesRequest.create = function create(properties) { + return new FetchRemoteBranchesRequest(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + */ + FetchRemoteBranchesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} message FetchRemoteBranchesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchRemoteBranchesRequest; + })(); + + v1beta1.FetchRemoteBranchesResponse = (function() { + + /** + * Properties of a FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchRemoteBranchesResponse + * @property {Array.|null} [branches] FetchRemoteBranchesResponse branches + */ + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchRemoteBranchesResponse. + * @implements IFetchRemoteBranchesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse=} [properties] Properties to set + */ + function FetchRemoteBranchesResponse(properties) { + this.branches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesResponse branches. + * @member {Array.} branches + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @instance + */ + FetchRemoteBranchesResponse.prototype.branches = $util.emptyArray; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse instance + */ + FetchRemoteBranchesResponse.create = function create(properties) { + return new FetchRemoteBranchesResponse(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.branches != null && message.branches.length) + for (var i = 0; i < message.branches.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.branches[i]); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.branches != null && message.hasOwnProperty("branches")) { + if (!Array.isArray(message.branches)) + return "branches: array expected"; + for (var i = 0; i < message.branches.length; ++i) + if (!$util.isString(message.branches[i])) + return "branches: string[] expected"; + } + return null; + }; + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + */ + FetchRemoteBranchesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse(); + if (object.branches) { + if (!Array.isArray(object.branches)) + throw TypeError(".google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.branches: array expected"); + message.branches = []; + for (var i = 0; i < object.branches.length; ++i) + message.branches[i] = String(object.branches[i]); + } + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} message FetchRemoteBranchesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.branches = []; + if (message.branches && message.branches.length) { + object.branches = []; + for (var j = 0; j < message.branches.length; ++j) + object.branches[j] = message.branches[j]; + } + return object; + }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchRemoteBranchesResponse; + })(); + + v1beta1.Workspace = (function() { + + /** + * Properties of a Workspace. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkspace + * @property {string|null} [name] Workspace name + */ + + /** + * Constructs a new Workspace. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Workspace. + * @implements IWorkspace + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkspace=} [properties] Properties to set + */ + function Workspace(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Workspace name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Workspace + * @instance + */ + Workspace.prototype.name = ""; + + /** + * Creates a new Workspace instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace instance + */ + Workspace.create = function create(properties) { + return new Workspace(properties); + }; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Workspace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Workspace message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Workspace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + */ + Workspace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Workspace) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Workspace(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.Workspace} message Workspace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Workspace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Workspace to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Workspace + * @instance + * @returns {Object.} JSON object + */ + Workspace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Workspace; + })(); + + v1beta1.ListWorkspacesRequest = (function() { + + /** + * Properties of a ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkspacesRequest + * @property {string|null} [parent] ListWorkspacesRequest parent + * @property {number|null} [pageSize] ListWorkspacesRequest pageSize + * @property {string|null} [pageToken] ListWorkspacesRequest pageToken + * @property {string|null} [orderBy] ListWorkspacesRequest orderBy + * @property {string|null} [filter] ListWorkspacesRequest filter + */ + + /** + * Constructs a new ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkspacesRequest. + * @implements IListWorkspacesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest=} [properties] Properties to set + */ + function ListWorkspacesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.parent = ""; + + /** + * ListWorkspacesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageSize = 0; + + /** + * ListWorkspacesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageToken = ""; + + /** + * ListWorkspacesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.orderBy = ""; + + /** + * ListWorkspacesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.filter = ""; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest instance + */ + ListWorkspacesRequest.create = function create(properties) { + return new ListWorkspacesRequest(properties); + }; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + */ + ListWorkspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkspacesRequest} message ListWorkspacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkspacesRequest; + })(); + + v1beta1.ListWorkspacesResponse = (function() { + + /** + * Properties of a ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkspacesResponse + * @property {Array.|null} [workspaces] ListWorkspacesResponse workspaces + * @property {string|null} [nextPageToken] ListWorkspacesResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkspacesResponse unreachable + */ + + /** + * Constructs a new ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkspacesResponse. + * @implements IListWorkspacesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse=} [properties] Properties to set + */ + function ListWorkspacesResponse(properties) { + this.workspaces = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesResponse workspaces. + * @member {Array.} workspaces + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.workspaces = $util.emptyArray; + + /** + * ListWorkspacesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.nextPageToken = ""; + + /** + * ListWorkspacesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse instance + */ + ListWorkspacesResponse.create = function create(properties) { + return new ListWorkspacesResponse(properties); + }; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspaces != null && message.workspaces.length) + for (var i = 0; i < message.workspaces.length; ++i) + $root.google.cloud.dataform.v1beta1.Workspace.encode(message.workspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workspaces && message.workspaces.length)) + message.workspaces = []; + message.workspaces.push($root.google.cloud.dataform.v1beta1.Workspace.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspaces != null && message.hasOwnProperty("workspaces")) { + if (!Array.isArray(message.workspaces)) + return "workspaces: array expected"; + for (var i = 0; i < message.workspaces.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Workspace.verify(message.workspaces[i]); + if (error) + return "workspaces." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + */ + ListWorkspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse(); + if (object.workspaces) { + if (!Array.isArray(object.workspaces)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.workspaces: array expected"); + message.workspaces = []; + for (var i = 0; i < object.workspaces.length; ++i) { + if (typeof object.workspaces[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.workspaces: object expected"); + message.workspaces[i] = $root.google.cloud.dataform.v1beta1.Workspace.fromObject(object.workspaces[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkspacesResponse} message ListWorkspacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workspaces = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workspaces && message.workspaces.length) { + object.workspaces = []; + for (var j = 0; j < message.workspaces.length; ++j) + object.workspaces[j] = $root.google.cloud.dataform.v1beta1.Workspace.toObject(message.workspaces[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkspacesResponse; + })(); + + v1beta1.GetWorkspaceRequest = (function() { + + /** + * Properties of a GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetWorkspaceRequest + * @property {string|null} [name] GetWorkspaceRequest name + */ + + /** + * Constructs a new GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetWorkspaceRequest. + * @implements IGetWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest=} [properties] Properties to set + */ + function GetWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @instance + */ + GetWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest instance + */ + GetWorkspaceRequest.create = function create(properties) { + return new GetWorkspaceRequest(properties); + }; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + */ + GetWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetWorkspaceRequest} message GetWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkspaceRequest; + })(); + + v1beta1.CreateWorkspaceRequest = (function() { + + /** + * Properties of a CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateWorkspaceRequest + * @property {string|null} [parent] CreateWorkspaceRequest parent + * @property {google.cloud.dataform.v1beta1.IWorkspace|null} [workspace] CreateWorkspaceRequest workspace + * @property {string|null} [workspaceId] CreateWorkspaceRequest workspaceId + */ + + /** + * Constructs a new CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateWorkspaceRequest. + * @implements ICreateWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest=} [properties] Properties to set + */ + function CreateWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkspaceRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.parent = ""; + + /** + * CreateWorkspaceRequest workspace. + * @member {google.cloud.dataform.v1beta1.IWorkspace|null|undefined} workspace + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspace = null; + + /** + * CreateWorkspaceRequest workspaceId. + * @member {string} workspaceId + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspaceId = ""; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest instance + */ + CreateWorkspaceRequest.create = function create(properties) { + return new CreateWorkspaceRequest(properties); + }; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + $root.google.cloud.dataform.v1beta1.Workspace.encode(message.workspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workspaceId != null && Object.hasOwnProperty.call(message, "workspaceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspaceId); + return writer; + }; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.decode(reader, reader.uint32()); + break; + case 3: + message.workspaceId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) { + var error = $root.google.cloud.dataform.v1beta1.Workspace.verify(message.workspace); + if (error) + return "workspace." + error; + } + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + if (!$util.isString(message.workspaceId)) + return "workspaceId: string expected"; + return null; + }; + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + */ + CreateWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workspace != null) { + if (typeof object.workspace !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateWorkspaceRequest.workspace: object expected"); + message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.fromObject(object.workspace); + } + if (object.workspaceId != null) + message.workspaceId = String(object.workspaceId); + return message; + }; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} message CreateWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workspace = null; + object.workspaceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = $root.google.cloud.dataform.v1beta1.Workspace.toObject(message.workspace, options); + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + object.workspaceId = message.workspaceId; + return object; + }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkspaceRequest; + })(); + + v1beta1.DeleteWorkspaceRequest = (function() { + + /** + * Properties of a DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteWorkspaceRequest + * @property {string|null} [name] DeleteWorkspaceRequest name + */ + + /** + * Constructs a new DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteWorkspaceRequest. + * @implements IDeleteWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest=} [properties] Properties to set + */ + function DeleteWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @instance + */ + DeleteWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest instance + */ + DeleteWorkspaceRequest.create = function create(properties) { + return new DeleteWorkspaceRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + */ + DeleteWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} message DeleteWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteWorkspaceRequest; + })(); + + v1beta1.CommitAuthor = (function() { + + /** + * Properties of a CommitAuthor. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICommitAuthor + * @property {string|null} [name] CommitAuthor name + * @property {string|null} [emailAddress] CommitAuthor emailAddress + */ + + /** + * Constructs a new CommitAuthor. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CommitAuthor. + * @implements ICommitAuthor + * @constructor + * @param {google.cloud.dataform.v1beta1.ICommitAuthor=} [properties] Properties to set + */ + function CommitAuthor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitAuthor name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + */ + CommitAuthor.prototype.name = ""; + + /** + * CommitAuthor emailAddress. + * @member {string} emailAddress + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + */ + CommitAuthor.prototype.emailAddress = ""; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor instance + */ + CommitAuthor.create = function create(properties) { + return new CommitAuthor(properties); + }; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + return writer; + }; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CommitAuthor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.emailAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitAuthor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitAuthor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + return null; + }; + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + */ + CommitAuthor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CommitAuthor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CommitAuthor(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + return message; + }; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.CommitAuthor} message CommitAuthor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitAuthor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + return object; + }; + + /** + * Converts this CommitAuthor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + * @returns {Object.} JSON object + */ + CommitAuthor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitAuthor; + })(); + + v1beta1.PullGitCommitsRequest = (function() { + + /** + * Properties of a PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IPullGitCommitsRequest + * @property {string|null} [name] PullGitCommitsRequest name + * @property {string|null} [remoteBranch] PullGitCommitsRequest remoteBranch + * @property {google.cloud.dataform.v1beta1.ICommitAuthor|null} [author] PullGitCommitsRequest author + */ + + /** + * Constructs a new PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a PullGitCommitsRequest. + * @implements IPullGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest=} [properties] Properties to set + */ + function PullGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PullGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.name = ""; + + /** + * PullGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * PullGitCommitsRequest author. + * @member {google.cloud.dataform.v1beta1.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.author = null; + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest instance + */ + PullGitCommitsRequest.create = function create(properties) { + return new PullGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1beta1.CommitAuthor.encode(message.author, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + case 3: + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PullGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullGitCommitsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1beta1.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + return null; + }; + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + */ + PullGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.PullGitCommitsRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.fromObject(object.author); + } + return message; + }; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.PullGitCommitsRequest} message PullGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PullGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PullGitCommitsRequest; + })(); + + v1beta1.PushGitCommitsRequest = (function() { + + /** + * Properties of a PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IPushGitCommitsRequest + * @property {string|null} [name] PushGitCommitsRequest name + * @property {string|null} [remoteBranch] PushGitCommitsRequest remoteBranch + */ + + /** + * Constructs a new PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a PushGitCommitsRequest. + * @implements IPushGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest=} [properties] Properties to set + */ + function PushGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PushGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.name = ""; + + /** + * PushGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest instance + */ + PushGitCommitsRequest.create = function create(properties) { + return new PushGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushGitCommitsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + */ + PushGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.PushGitCommitsRequest} message PushGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PushGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PushGitCommitsRequest; + })(); + + v1beta1.FetchFileGitStatusesRequest = (function() { + + /** + * Properties of a FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileGitStatusesRequest + * @property {string|null} [name] FetchFileGitStatusesRequest name + */ + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileGitStatusesRequest. + * @implements IFetchFileGitStatusesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest=} [properties] Properties to set + */ + function FetchFileGitStatusesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @instance + */ + FetchFileGitStatusesRequest.prototype.name = ""; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest instance + */ + FetchFileGitStatusesRequest.create = function create(properties) { + return new FetchFileGitStatusesRequest(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + */ + FetchFileGitStatusesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} message FetchFileGitStatusesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileGitStatusesRequest; + })(); + + v1beta1.FetchFileGitStatusesResponse = (function() { + + /** + * Properties of a FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileGitStatusesResponse + * @property {Array.|null} [uncommittedFileChanges] FetchFileGitStatusesResponse uncommittedFileChanges + */ + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileGitStatusesResponse. + * @implements IFetchFileGitStatusesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse=} [properties] Properties to set + */ + function FetchFileGitStatusesResponse(properties) { + this.uncommittedFileChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesResponse uncommittedFileChanges. + * @member {Array.} uncommittedFileChanges + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @instance + */ + FetchFileGitStatusesResponse.prototype.uncommittedFileChanges = $util.emptyArray; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse instance + */ + FetchFileGitStatusesResponse.create = function create(properties) { + return new FetchFileGitStatusesResponse(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uncommittedFileChanges != null && message.uncommittedFileChanges.length) + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) + $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.encode(message.uncommittedFileChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) + message.uncommittedFileChanges = []; + message.uncommittedFileChanges.push($root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uncommittedFileChanges != null && message.hasOwnProperty("uncommittedFileChanges")) { + if (!Array.isArray(message.uncommittedFileChanges)) + return "uncommittedFileChanges: array expected"; + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify(message.uncommittedFileChanges[i]); + if (error) + return "uncommittedFileChanges." + error; + } + } + return null; + }; + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + */ + FetchFileGitStatusesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse(); + if (object.uncommittedFileChanges) { + if (!Array.isArray(object.uncommittedFileChanges)) + throw TypeError(".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.uncommittedFileChanges: array expected"); + message.uncommittedFileChanges = []; + for (var i = 0; i < object.uncommittedFileChanges.length; ++i) { + if (typeof object.uncommittedFileChanges[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.uncommittedFileChanges: object expected"); + message.uncommittedFileChanges[i] = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.fromObject(object.uncommittedFileChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} message FetchFileGitStatusesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uncommittedFileChanges = []; + if (message.uncommittedFileChanges && message.uncommittedFileChanges.length) { + object.uncommittedFileChanges = []; + for (var j = 0; j < message.uncommittedFileChanges.length; ++j) + object.uncommittedFileChanges[j] = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.toObject(message.uncommittedFileChanges[j], options); + } + return object; + }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + FetchFileGitStatusesResponse.UncommittedFileChange = (function() { + + /** + * Properties of an UncommittedFileChange. + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @interface IUncommittedFileChange + * @property {string|null} [path] UncommittedFileChange path + * @property {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|null} [state] UncommittedFileChange state + */ + + /** + * Constructs a new UncommittedFileChange. + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @classdesc Represents an UncommittedFileChange. + * @implements IUncommittedFileChange + * @constructor + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + */ + function UncommittedFileChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UncommittedFileChange path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.path = ""; + + /** + * UncommittedFileChange state. + * @member {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State} state + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.state = 0; + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange instance + */ + UncommittedFileChange.create = function create(properties) { + return new UncommittedFileChange(properties); + }; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.path = reader.string(); + break; + case 2: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UncommittedFileChange message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UncommittedFileChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + */ + UncommittedFileChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange(); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ADDED": + case 1: + message.state = 1; + break; + case "DELETED": + case 2: + message.state = 2; + break; + case "MODIFIED": + case 3: + message.state = 3; + break; + case "HAS_CONFLICTS": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} message UncommittedFileChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UncommittedFileChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; + return object; + }; + + /** + * Converts this UncommittedFileChange to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + * @returns {Object.} JSON object + */ + UncommittedFileChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ADDED=1 ADDED value + * @property {number} DELETED=2 DELETED value + * @property {number} MODIFIED=3 MODIFIED value + * @property {number} HAS_CONFLICTS=4 HAS_CONFLICTS value + */ + UncommittedFileChange.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "DELETED"] = 2; + values[valuesById[3] = "MODIFIED"] = 3; + values[valuesById[4] = "HAS_CONFLICTS"] = 4; + return values; + })(); + + return UncommittedFileChange; + })(); + + return FetchFileGitStatusesResponse; + })(); + + v1beta1.FetchGitAheadBehindRequest = (function() { + + /** + * Properties of a FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchGitAheadBehindRequest + * @property {string|null} [name] FetchGitAheadBehindRequest name + * @property {string|null} [remoteBranch] FetchGitAheadBehindRequest remoteBranch + */ + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchGitAheadBehindRequest. + * @implements IFetchGitAheadBehindRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest=} [properties] Properties to set + */ + function FetchGitAheadBehindRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.name = ""; + + /** + * FetchGitAheadBehindRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.remoteBranch = ""; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest instance + */ + FetchGitAheadBehindRequest.create = function create(properties) { + return new FetchGitAheadBehindRequest(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + */ + FetchGitAheadBehindRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} message FetchGitAheadBehindRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchGitAheadBehindRequest; + })(); + + v1beta1.FetchGitAheadBehindResponse = (function() { + + /** + * Properties of a FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchGitAheadBehindResponse + * @property {number|null} [commitsAhead] FetchGitAheadBehindResponse commitsAhead + * @property {number|null} [commitsBehind] FetchGitAheadBehindResponse commitsBehind + */ + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchGitAheadBehindResponse. + * @implements IFetchGitAheadBehindResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse=} [properties] Properties to set + */ + function FetchGitAheadBehindResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindResponse commitsAhead. + * @member {number} commitsAhead + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsAhead = 0; + + /** + * FetchGitAheadBehindResponse commitsBehind. + * @member {number} commitsBehind + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsBehind = 0; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse instance + */ + FetchGitAheadBehindResponse.create = function create(properties) { + return new FetchGitAheadBehindResponse(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commitsAhead != null && Object.hasOwnProperty.call(message, "commitsAhead")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.commitsAhead); + if (message.commitsBehind != null && Object.hasOwnProperty.call(message, "commitsBehind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.commitsBehind); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commitsAhead = reader.int32(); + break; + case 2: + message.commitsBehind = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + if (!$util.isInteger(message.commitsAhead)) + return "commitsAhead: integer expected"; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + if (!$util.isInteger(message.commitsBehind)) + return "commitsBehind: integer expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + */ + FetchGitAheadBehindResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse(); + if (object.commitsAhead != null) + message.commitsAhead = object.commitsAhead | 0; + if (object.commitsBehind != null) + message.commitsBehind = object.commitsBehind | 0; + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} message FetchGitAheadBehindResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commitsAhead = 0; + object.commitsBehind = 0; + } + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + object.commitsAhead = message.commitsAhead; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + object.commitsBehind = message.commitsBehind; + return object; + }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchGitAheadBehindResponse; + })(); + + v1beta1.CommitWorkspaceChangesRequest = (function() { + + /** + * Properties of a CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICommitWorkspaceChangesRequest + * @property {string|null} [name] CommitWorkspaceChangesRequest name + * @property {google.cloud.dataform.v1beta1.ICommitAuthor|null} [author] CommitWorkspaceChangesRequest author + * @property {string|null} [commitMessage] CommitWorkspaceChangesRequest commitMessage + * @property {Array.|null} [paths] CommitWorkspaceChangesRequest paths + */ + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CommitWorkspaceChangesRequest. + * @implements ICommitWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest=} [properties] Properties to set + */ + function CommitWorkspaceChangesRequest(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.name = ""; + + /** + * CommitWorkspaceChangesRequest author. + * @member {google.cloud.dataform.v1beta1.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.author = null; + + /** + * CommitWorkspaceChangesRequest commitMessage. + * @member {string} commitMessage + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.commitMessage = ""; + + /** + * CommitWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest instance + */ + CommitWorkspaceChangesRequest.create = function create(properties) { + return new CommitWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.commitMessage != null && Object.hasOwnProperty.call(message, "commitMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitMessage); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.paths[i]); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1beta1.CommitAuthor.encode(message.author, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 4: + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + case 2: + message.commitMessage = reader.string(); + break; + case 3: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitWorkspaceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1beta1.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + if (!$util.isString(message.commitMessage)) + return "commitMessage: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + */ + CommitWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.fromObject(object.author); + } + if (object.commitMessage != null) + message.commitMessage = String(object.commitMessage); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.commitMessage = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + object.commitMessage = message.commitMessage; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + CommitWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitWorkspaceChangesRequest; + })(); + + v1beta1.ResetWorkspaceChangesRequest = (function() { + + /** + * Properties of a ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IResetWorkspaceChangesRequest + * @property {string|null} [name] ResetWorkspaceChangesRequest name + * @property {Array.|null} [paths] ResetWorkspaceChangesRequest paths + * @property {boolean|null} [clean] ResetWorkspaceChangesRequest clean + */ + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ResetWorkspaceChangesRequest. + * @implements IResetWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest=} [properties] Properties to set + */ + function ResetWorkspaceChangesRequest(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResetWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.name = ""; + + /** + * ResetWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * ResetWorkspaceChangesRequest clean. + * @member {boolean} clean + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.clean = false; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest instance + */ + ResetWorkspaceChangesRequest.create = function create(properties) { + return new ResetWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); + if (message.clean != null && Object.hasOwnProperty.call(message, "clean")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.clean); + return writer; + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + case 3: + message.clean = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetWorkspaceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + if (message.clean != null && message.hasOwnProperty("clean")) + if (typeof message.clean !== "boolean") + return "clean: boolean expected"; + return null; + }; + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + */ + ResetWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.clean != null) + message.clean = Boolean(object.clean); + return message; + }; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.clean = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.clean != null && message.hasOwnProperty("clean")) + object.clean = message.clean; + return object; + }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + ResetWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResetWorkspaceChangesRequest; + })(); + + v1beta1.FetchFileDiffRequest = (function() { + + /** + * Properties of a FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileDiffRequest + * @property {string|null} [workspace] FetchFileDiffRequest workspace + * @property {string|null} [path] FetchFileDiffRequest path + */ + + /** + * Constructs a new FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileDiffRequest. + * @implements IFetchFileDiffRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest=} [properties] Properties to set + */ + function FetchFileDiffRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.workspace = ""; + + /** + * FetchFileDiffRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.path = ""; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest instance + */ + FetchFileDiffRequest.create = function create(properties) { + return new FetchFileDiffRequest(properties); + }; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + */ + FetchFileDiffRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileDiffRequest} message FetchFileDiffRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileDiffRequest; + })(); + + v1beta1.FetchFileDiffResponse = (function() { + + /** + * Properties of a FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileDiffResponse + * @property {string|null} [formattedDiff] FetchFileDiffResponse formattedDiff + */ + + /** + * Constructs a new FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileDiffResponse. + * @implements IFetchFileDiffResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse=} [properties] Properties to set + */ + function FetchFileDiffResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffResponse formattedDiff. + * @member {string} formattedDiff + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @instance + */ + FetchFileDiffResponse.prototype.formattedDiff = ""; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse instance + */ + FetchFileDiffResponse.create = function create(properties) { + return new FetchFileDiffResponse(properties); + }; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.formattedDiff != null && Object.hasOwnProperty.call(message, "formattedDiff")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.formattedDiff); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.formattedDiff = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + if (!$util.isString(message.formattedDiff)) + return "formattedDiff: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + */ + FetchFileDiffResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse(); + if (object.formattedDiff != null) + message.formattedDiff = String(object.formattedDiff); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileDiffResponse} message FetchFileDiffResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.formattedDiff = ""; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + object.formattedDiff = message.formattedDiff; + return object; + }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileDiffResponse; + })(); + + v1beta1.QueryDirectoryContentsRequest = (function() { + + /** + * Properties of a QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryDirectoryContentsRequest + * @property {string|null} [workspace] QueryDirectoryContentsRequest workspace + * @property {string|null} [path] QueryDirectoryContentsRequest path + * @property {number|null} [pageSize] QueryDirectoryContentsRequest pageSize + * @property {string|null} [pageToken] QueryDirectoryContentsRequest pageToken + */ + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryDirectoryContentsRequest. + * @implements IQueryDirectoryContentsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest=} [properties] Properties to set + */ + function QueryDirectoryContentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.workspace = ""; + + /** + * QueryDirectoryContentsRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.path = ""; + + /** + * QueryDirectoryContentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageSize = 0; + + /** + * QueryDirectoryContentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest instance + */ + QueryDirectoryContentsRequest.create = function create(properties) { + return new QueryDirectoryContentsRequest(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + */ + QueryDirectoryContentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} message QueryDirectoryContentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDirectoryContentsRequest; + })(); + + v1beta1.QueryDirectoryContentsResponse = (function() { + + /** + * Properties of a QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryDirectoryContentsResponse + * @property {Array.|null} [directoryEntries] QueryDirectoryContentsResponse directoryEntries + * @property {string|null} [nextPageToken] QueryDirectoryContentsResponse nextPageToken + */ + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryDirectoryContentsResponse. + * @implements IQueryDirectoryContentsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse=} [properties] Properties to set + */ + function QueryDirectoryContentsResponse(properties) { + this.directoryEntries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsResponse directoryEntries. + * @member {Array.} directoryEntries + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.directoryEntries = $util.emptyArray; + + /** + * QueryDirectoryContentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse instance + */ + QueryDirectoryContentsResponse.create = function create(properties) { + return new QueryDirectoryContentsResponse(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directoryEntries != null && message.directoryEntries.length) + for (var i = 0; i < message.directoryEntries.length; ++i) + $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.encode(message.directoryEntries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.directoryEntries && message.directoryEntries.length)) + message.directoryEntries = []; + message.directoryEntries.push($root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directoryEntries != null && message.hasOwnProperty("directoryEntries")) { + if (!Array.isArray(message.directoryEntries)) + return "directoryEntries: array expected"; + for (var i = 0; i < message.directoryEntries.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify(message.directoryEntries[i]); + if (error) + return "directoryEntries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + */ + QueryDirectoryContentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse(); + if (object.directoryEntries) { + if (!Array.isArray(object.directoryEntries)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.directoryEntries: array expected"); + message.directoryEntries = []; + for (var i = 0; i < object.directoryEntries.length; ++i) { + if (typeof object.directoryEntries[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.directoryEntries: object expected"); + message.directoryEntries[i] = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.fromObject(object.directoryEntries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} message QueryDirectoryContentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directoryEntries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.directoryEntries && message.directoryEntries.length) { + object.directoryEntries = []; + for (var j = 0; j < message.directoryEntries.length; ++j) + object.directoryEntries[j] = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.toObject(message.directoryEntries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + QueryDirectoryContentsResponse.DirectoryEntry = (function() { + + /** + * Properties of a DirectoryEntry. + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @interface IDirectoryEntry + * @property {string|null} [file] DirectoryEntry file + * @property {string|null} [directory] DirectoryEntry directory + */ + + /** + * Constructs a new DirectoryEntry. + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @classdesc Represents a DirectoryEntry. + * @implements IDirectoryEntry + * @constructor + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + */ + function DirectoryEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DirectoryEntry file. + * @member {string|null|undefined} file + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.file = null; + + /** + * DirectoryEntry directory. + * @member {string|null|undefined} directory + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.directory = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DirectoryEntry entry. + * @member {"file"|"directory"|undefined} entry + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + Object.defineProperty(DirectoryEntry.prototype, "entry", { + get: $util.oneOfGetter($oneOfFields = ["file", "directory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry instance + */ + DirectoryEntry.create = function create(properties) { + return new DirectoryEntry(properties); + }; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.directory != null && Object.hasOwnProperty.call(message, "directory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); + return writer; + }; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = reader.string(); + break; + case 2: + message.directory = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DirectoryEntry message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DirectoryEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.entry = 1; + if (!$util.isString(message.file)) + return "file: string expected"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + if (properties.entry === 1) + return "entry: multiple values"; + properties.entry = 1; + if (!$util.isString(message.directory)) + return "directory: string expected"; + } + return null; + }; + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + */ + DirectoryEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry(); + if (object.file != null) + message.file = String(object.file); + if (object.directory != null) + message.directory = String(object.directory); + return message; + }; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} message DirectoryEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DirectoryEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.file != null && message.hasOwnProperty("file")) { + object.file = message.file; + if (options.oneofs) + object.entry = "file"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + object.directory = message.directory; + if (options.oneofs) + object.entry = "directory"; + } + return object; + }; + + /** + * Converts this DirectoryEntry to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + * @returns {Object.} JSON object + */ + DirectoryEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DirectoryEntry; + })(); + + return QueryDirectoryContentsResponse; + })(); + + v1beta1.MakeDirectoryRequest = (function() { + + /** + * Properties of a MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMakeDirectoryRequest + * @property {string|null} [workspace] MakeDirectoryRequest workspace + * @property {string|null} [path] MakeDirectoryRequest path + */ + + /** + * Constructs a new MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MakeDirectoryRequest. + * @implements IMakeDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest=} [properties] Properties to set + */ + function MakeDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MakeDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.workspace = ""; + + /** + * MakeDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.path = ""; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest instance + */ + MakeDirectoryRequest.create = function create(properties) { + return new MakeDirectoryRequest(properties); + }; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + */ + MakeDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.MakeDirectoryRequest} message MakeDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MakeDirectoryRequest; + })(); + + v1beta1.MakeDirectoryResponse = (function() { + + /** + * Properties of a MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMakeDirectoryResponse + */ + + /** + * Constructs a new MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MakeDirectoryResponse. + * @implements IMakeDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse=} [properties] Properties to set + */ + function MakeDirectoryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse instance + */ + MakeDirectoryResponse.create = function create(properties) { + return new MakeDirectoryResponse(properties); + }; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + */ + MakeDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse(); + }; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.MakeDirectoryResponse} message MakeDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MakeDirectoryResponse; + })(); + + v1beta1.RemoveDirectoryRequest = (function() { + + /** + * Properties of a RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRemoveDirectoryRequest + * @property {string|null} [workspace] RemoveDirectoryRequest workspace + * @property {string|null} [path] RemoveDirectoryRequest path + */ + + /** + * Constructs a new RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RemoveDirectoryRequest. + * @implements IRemoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest=} [properties] Properties to set + */ + function RemoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.workspace = ""; + + /** + * RemoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.path = ""; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest instance + */ + RemoveDirectoryRequest.create = function create(properties) { + return new RemoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + */ + RemoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} message RemoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemoveDirectoryRequest; + })(); + + v1beta1.MoveDirectoryRequest = (function() { + + /** + * Properties of a MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveDirectoryRequest + * @property {string|null} [workspace] MoveDirectoryRequest workspace + * @property {string|null} [path] MoveDirectoryRequest path + * @property {string|null} [newPath] MoveDirectoryRequest newPath + */ + + /** + * Constructs a new MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveDirectoryRequest. + * @implements IMoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest=} [properties] Properties to set + */ + function MoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.workspace = ""; + + /** + * MoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.path = ""; + + /** + * MoveDirectoryRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.newPath = ""; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest instance + */ + MoveDirectoryRequest.create = function create(properties) { + return new MoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.newPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + */ + MoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.MoveDirectoryRequest} message MoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveDirectoryRequest; + })(); + + v1beta1.MoveDirectoryResponse = (function() { + + /** + * Properties of a MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveDirectoryResponse + */ + + /** + * Constructs a new MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveDirectoryResponse. + * @implements IMoveDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse=} [properties] Properties to set + */ + function MoveDirectoryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse instance + */ + MoveDirectoryResponse.create = function create(properties) { + return new MoveDirectoryResponse(properties); + }; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + */ + MoveDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse(); + }; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.MoveDirectoryResponse} message MoveDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveDirectoryResponse; + })(); + + v1beta1.ReadFileRequest = (function() { + + /** + * Properties of a ReadFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IReadFileRequest + * @property {string|null} [workspace] ReadFileRequest workspace + * @property {string|null} [path] ReadFileRequest path + */ + + /** + * Constructs a new ReadFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ReadFileRequest. + * @implements IReadFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IReadFileRequest=} [properties] Properties to set + */ + function ReadFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.workspace = ""; + + /** + * ReadFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.path = ""; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest instance + */ + ReadFileRequest.create = function create(properties) { + return new ReadFileRequest(properties); + }; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ReadFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + */ + ReadFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ReadFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ReadFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.ReadFileRequest} message ReadFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this ReadFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + * @returns {Object.} JSON object + */ + ReadFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReadFileRequest; + })(); + + v1beta1.ReadFileResponse = (function() { + + /** + * Properties of a ReadFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IReadFileResponse + * @property {Uint8Array|null} [fileContents] ReadFileResponse fileContents + */ + + /** + * Constructs a new ReadFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ReadFileResponse. + * @implements IReadFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IReadFileResponse=} [properties] Properties to set + */ + function ReadFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileResponse fileContents. + * @member {Uint8Array} fileContents + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @instance + */ + ReadFileResponse.prototype.fileContents = $util.newBuffer([]); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse instance + */ + ReadFileResponse.create = function create(properties) { + return new ReadFileResponse(properties); + }; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileContents != null && Object.hasOwnProperty.call(message, "fileContents")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileContents); + return writer; + }; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ReadFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileContents = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + if (!(message.fileContents && typeof message.fileContents.length === "number" || $util.isString(message.fileContents))) + return "fileContents: buffer expected"; + return null; + }; + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + */ + ReadFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ReadFileResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ReadFileResponse(); + if (object.fileContents != null) + if (typeof object.fileContents === "string") + $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); + else if (object.fileContents.length) + message.fileContents = object.fileContents; + return message; + }; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.ReadFileResponse} message ReadFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.fileContents = ""; + else { + object.fileContents = []; + if (options.bytes !== Array) + object.fileContents = $util.newBuffer(object.fileContents); + } + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + object.fileContents = options.bytes === String ? $util.base64.encode(message.fileContents, 0, message.fileContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileContents) : message.fileContents; + return object; + }; + + /** + * Converts this ReadFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @instance + * @returns {Object.} JSON object + */ + ReadFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReadFileResponse; + })(); + + v1beta1.RemoveFileRequest = (function() { + + /** + * Properties of a RemoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRemoveFileRequest + * @property {string|null} [workspace] RemoveFileRequest workspace + * @property {string|null} [path] RemoveFileRequest path + */ + + /** + * Constructs a new RemoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RemoveFileRequest. + * @implements IRemoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest=} [properties] Properties to set + */ + function RemoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.workspace = ""; + + /** + * RemoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.path = ""; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest instance + */ + RemoveFileRequest.create = function create(properties) { + return new RemoveFileRequest(properties); + }; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RemoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + */ + RemoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RemoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RemoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.RemoveFileRequest} message RemoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemoveFileRequest; + })(); + + v1beta1.MoveFileRequest = (function() { + + /** + * Properties of a MoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveFileRequest + * @property {string|null} [workspace] MoveFileRequest workspace + * @property {string|null} [path] MoveFileRequest path + * @property {string|null} [newPath] MoveFileRequest newPath + */ + + /** + * Constructs a new MoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveFileRequest. + * @implements IMoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest=} [properties] Properties to set + */ + function MoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.workspace = ""; + + /** + * MoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.path = ""; + + /** + * MoveFileRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.newPath = ""; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest instance + */ + MoveFileRequest.create = function create(properties) { + return new MoveFileRequest(properties); + }; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.newPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + */ + MoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.MoveFileRequest} message MoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + MoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveFileRequest; + })(); + + v1beta1.MoveFileResponse = (function() { + + /** + * Properties of a MoveFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveFileResponse + */ + + /** + * Constructs a new MoveFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveFileResponse. + * @implements IMoveFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse=} [properties] Properties to set + */ + function MoveFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse instance + */ + MoveFileResponse.create = function create(properties) { + return new MoveFileResponse(properties); + }; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + */ + MoveFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveFileResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MoveFileResponse(); + }; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.MoveFileResponse} message MoveFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @instance + * @returns {Object.} JSON object + */ + MoveFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveFileResponse; + })(); + + v1beta1.WriteFileRequest = (function() { + + /** + * Properties of a WriteFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWriteFileRequest + * @property {string|null} [workspace] WriteFileRequest workspace + * @property {string|null} [path] WriteFileRequest path + * @property {Uint8Array|null} [contents] WriteFileRequest contents + */ + + /** + * Constructs a new WriteFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WriteFileRequest. + * @implements IWriteFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest=} [properties] Properties to set + */ + function WriteFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WriteFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.workspace = ""; + + /** + * WriteFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.path = ""; + + /** + * WriteFileRequest contents. + * @member {Uint8Array} contents + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.contents = $util.newBuffer([]); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest instance + */ + WriteFileRequest.create = function create(properties) { + return new WriteFileRequest(properties); + }; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.contents); + return writer; + }; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WriteFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.contents = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!(message.contents && typeof message.contents.length === "number" || $util.isString(message.contents))) + return "contents: buffer expected"; + return null; + }; + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + */ + WriteFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WriteFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WriteFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.contents != null) + if (typeof object.contents === "string") + $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); + else if (object.contents.length) + message.contents = object.contents; + return message; + }; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.WriteFileRequest} message WriteFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + if (options.bytes === String) + object.contents = ""; + else { + object.contents = []; + if (options.bytes !== Array) + object.contents = $util.newBuffer(object.contents); + } + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = options.bytes === String ? $util.base64.encode(message.contents, 0, message.contents.length) : options.bytes === Array ? Array.prototype.slice.call(message.contents) : message.contents; + return object; + }; + + /** + * Converts this WriteFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + * @returns {Object.} JSON object + */ + WriteFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteFileRequest; + })(); + + v1beta1.WriteFileResponse = (function() { + + /** + * Properties of a WriteFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWriteFileResponse + */ + + /** + * Constructs a new WriteFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WriteFileResponse. + * @implements IWriteFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse=} [properties] Properties to set + */ + function WriteFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse instance + */ + WriteFileResponse.create = function create(properties) { + return new WriteFileResponse(properties); + }; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WriteFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + */ + WriteFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WriteFileResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.WriteFileResponse(); + }; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.WriteFileResponse} message WriteFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this WriteFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @instance + * @returns {Object.} JSON object + */ + WriteFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteFileResponse; + })(); + + v1beta1.InstallNpmPackagesRequest = (function() { + + /** + * Properties of an InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IInstallNpmPackagesRequest + * @property {string|null} [workspace] InstallNpmPackagesRequest workspace + */ + + /** + * Constructs a new InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an InstallNpmPackagesRequest. + * @implements IInstallNpmPackagesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest=} [properties] Properties to set + */ + function InstallNpmPackagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstallNpmPackagesRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @instance + */ + InstallNpmPackagesRequest.prototype.workspace = ""; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest instance + */ + InstallNpmPackagesRequest.create = function create(properties) { + return new InstallNpmPackagesRequest(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + */ + InstallNpmPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + return message; + }; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} message InstallNpmPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.workspace = ""; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + return object; + }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstallNpmPackagesRequest; + })(); + + v1beta1.InstallNpmPackagesResponse = (function() { + + /** + * Properties of an InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IInstallNpmPackagesResponse + */ + + /** + * Constructs a new InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an InstallNpmPackagesResponse. + * @implements IInstallNpmPackagesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse=} [properties] Properties to set + */ + function InstallNpmPackagesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse instance + */ + InstallNpmPackagesResponse.create = function create(properties) { + return new InstallNpmPackagesResponse(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + */ + InstallNpmPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse(); + }; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} message InstallNpmPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstallNpmPackagesResponse; + })(); + + v1beta1.CompilationResult = (function() { + + /** + * Properties of a CompilationResult. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICompilationResult + * @property {string|null} [name] CompilationResult name + * @property {string|null} [gitCommitish] CompilationResult gitCommitish + * @property {string|null} [workspace] CompilationResult workspace + * @property {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null} [codeCompilationConfig] CompilationResult codeCompilationConfig + * @property {string|null} [dataformCoreVersion] CompilationResult dataformCoreVersion + * @property {Array.|null} [compilationErrors] CompilationResult compilationErrors + */ + + /** + * Constructs a new CompilationResult. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CompilationResult. + * @implements ICompilationResult + * @constructor + * @param {google.cloud.dataform.v1beta1.ICompilationResult=} [properties] Properties to set + */ + function CompilationResult(properties) { + this.compilationErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResult name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.name = ""; + + /** + * CompilationResult gitCommitish. + * @member {string|null|undefined} gitCommitish + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.gitCommitish = null; + + /** + * CompilationResult workspace. + * @member {string|null|undefined} workspace + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.workspace = null; + + /** + * CompilationResult codeCompilationConfig. + * @member {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null|undefined} codeCompilationConfig + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.codeCompilationConfig = null; + + /** + * CompilationResult dataformCoreVersion. + * @member {string} dataformCoreVersion + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.dataformCoreVersion = ""; + + /** + * CompilationResult compilationErrors. + * @member {Array.} compilationErrors + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.compilationErrors = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResult source. + * @member {"gitCommitish"|"workspace"|undefined} source + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + Object.defineProperty(CompilationResult.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gitCommitish", "workspace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult instance + */ + CompilationResult.create = function create(properties) { + return new CompilationResult(properties); + }; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gitCommitish != null && Object.hasOwnProperty.call(message, "gitCommitish")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gitCommitish); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspace); + if (message.codeCompilationConfig != null && Object.hasOwnProperty.call(message, "codeCompilationConfig")) + $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.encode(message.codeCompilationConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataformCoreVersion != null && Object.hasOwnProperty.call(message, "dataformCoreVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataformCoreVersion); + if (message.compilationErrors != null && message.compilationErrors.length) + for (var i = 0; i < message.compilationErrors.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.encode(message.compilationErrors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.gitCommitish = reader.string(); + break; + case 3: + message.workspace = reader.string(); + break; + case 4: + message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); + break; + case 5: + message.dataformCoreVersion = reader.string(); + break; + case 6: + if (!(message.compilationErrors && message.compilationErrors.length)) + message.compilationErrors = []; + message.compilationErrors.push($root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResult message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + properties.source = 1; + if (!$util.isString(message.gitCommitish)) + return "gitCommitish: string expected"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify(message.codeCompilationConfig); + if (error) + return "codeCompilationConfig." + error; + } + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + if (!$util.isString(message.dataformCoreVersion)) + return "dataformCoreVersion: string expected"; + if (message.compilationErrors != null && message.hasOwnProperty("compilationErrors")) { + if (!Array.isArray(message.compilationErrors)) + return "compilationErrors: array expected"; + for (var i = 0; i < message.compilationErrors.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify(message.compilationErrors[i]); + if (error) + return "compilationErrors." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + */ + CompilationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.gitCommitish != null) + message.gitCommitish = String(object.gitCommitish); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.codeCompilationConfig != null) { + if (typeof object.codeCompilationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.codeCompilationConfig: object expected"); + message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.fromObject(object.codeCompilationConfig); + } + if (object.dataformCoreVersion != null) + message.dataformCoreVersion = String(object.dataformCoreVersion); + if (object.compilationErrors) { + if (!Array.isArray(object.compilationErrors)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.compilationErrors: array expected"); + message.compilationErrors = []; + for (var i = 0; i < object.compilationErrors.length; ++i) { + if (typeof object.compilationErrors[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.compilationErrors: object expected"); + message.compilationErrors[i] = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.fromObject(object.compilationErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult} message CompilationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationErrors = []; + if (options.defaults) { + object.name = ""; + object.codeCompilationConfig = null; + object.dataformCoreVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + object.gitCommitish = message.gitCommitish; + if (options.oneofs) + object.source = "gitCommitish"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + object.workspace = message.workspace; + if (options.oneofs) + object.source = "workspace"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) + object.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.toObject(message.codeCompilationConfig, options); + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + object.dataformCoreVersion = message.dataformCoreVersion; + if (message.compilationErrors && message.compilationErrors.length) { + object.compilationErrors = []; + for (var j = 0; j < message.compilationErrors.length; ++j) + object.compilationErrors[j] = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.toObject(message.compilationErrors[j], options); + } + return object; + }; + + /** + * Converts this CompilationResult to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + * @returns {Object.} JSON object + */ + CompilationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompilationResult.CodeCompilationConfig = (function() { + + /** + * Properties of a CodeCompilationConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @interface ICodeCompilationConfig + * @property {string|null} [defaultDatabase] CodeCompilationConfig defaultDatabase + * @property {string|null} [defaultSchema] CodeCompilationConfig defaultSchema + * @property {string|null} [defaultLocation] CodeCompilationConfig defaultLocation + * @property {string|null} [assertionSchema] CodeCompilationConfig assertionSchema + * @property {Object.|null} [vars] CodeCompilationConfig vars + * @property {string|null} [databaseSuffix] CodeCompilationConfig databaseSuffix + * @property {string|null} [schemaSuffix] CodeCompilationConfig schemaSuffix + * @property {string|null} [tablePrefix] CodeCompilationConfig tablePrefix + */ + + /** + * Constructs a new CodeCompilationConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @classdesc Represents a CodeCompilationConfig. + * @implements ICodeCompilationConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + */ + function CodeCompilationConfig(properties) { + this.vars = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CodeCompilationConfig defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultDatabase = ""; + + /** + * CodeCompilationConfig defaultSchema. + * @member {string} defaultSchema + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultSchema = ""; + + /** + * CodeCompilationConfig defaultLocation. + * @member {string} defaultLocation + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultLocation = ""; + + /** + * CodeCompilationConfig assertionSchema. + * @member {string} assertionSchema + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.assertionSchema = ""; + + /** + * CodeCompilationConfig vars. + * @member {Object.} vars + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.vars = $util.emptyObject; + + /** + * CodeCompilationConfig databaseSuffix. + * @member {string} databaseSuffix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.databaseSuffix = ""; + + /** + * CodeCompilationConfig schemaSuffix. + * @member {string} schemaSuffix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.schemaSuffix = ""; + + /** + * CodeCompilationConfig tablePrefix. + * @member {string} tablePrefix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.tablePrefix = ""; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig instance + */ + CodeCompilationConfig.create = function create(properties) { + return new CodeCompilationConfig(properties); + }; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); + if (message.defaultSchema != null && Object.hasOwnProperty.call(message, "defaultSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultSchema); + if (message.assertionSchema != null && Object.hasOwnProperty.call(message, "assertionSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assertionSchema); + if (message.vars != null && Object.hasOwnProperty.call(message, "vars")) + for (var keys = Object.keys(message.vars), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.vars[keys[i]]).ldelim(); + if (message.databaseSuffix != null && Object.hasOwnProperty.call(message, "databaseSuffix")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.databaseSuffix); + if (message.schemaSuffix != null && Object.hasOwnProperty.call(message, "schemaSuffix")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.schemaSuffix); + if (message.tablePrefix != null && Object.hasOwnProperty.call(message, "tablePrefix")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablePrefix); + if (message.defaultLocation != null && Object.hasOwnProperty.call(message, "defaultLocation")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultLocation); + return writer; + }; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.defaultDatabase = reader.string(); + break; + case 2: + message.defaultSchema = reader.string(); + break; + case 8: + message.defaultLocation = reader.string(); + break; + case 3: + message.assertionSchema = reader.string(); + break; + case 4: + if (message.vars === $util.emptyObject) + message.vars = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.vars[key] = value; + break; + case 5: + message.databaseSuffix = reader.string(); + break; + case 6: + message.schemaSuffix = reader.string(); + break; + case 7: + message.tablePrefix = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CodeCompilationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CodeCompilationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + if (!$util.isString(message.defaultDatabase)) + return "defaultDatabase: string expected"; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + if (!$util.isString(message.defaultSchema)) + return "defaultSchema: string expected"; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + if (!$util.isString(message.defaultLocation)) + return "defaultLocation: string expected"; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + if (!$util.isString(message.assertionSchema)) + return "assertionSchema: string expected"; + if (message.vars != null && message.hasOwnProperty("vars")) { + if (!$util.isObject(message.vars)) + return "vars: object expected"; + var key = Object.keys(message.vars); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.vars[key[i]])) + return "vars: string{k:string} expected"; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + if (!$util.isString(message.databaseSuffix)) + return "databaseSuffix: string expected"; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + if (!$util.isString(message.schemaSuffix)) + return "schemaSuffix: string expected"; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + if (!$util.isString(message.tablePrefix)) + return "tablePrefix: string expected"; + return null; + }; + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + */ + CodeCompilationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.defaultSchema != null) + message.defaultSchema = String(object.defaultSchema); + if (object.defaultLocation != null) + message.defaultLocation = String(object.defaultLocation); + if (object.assertionSchema != null) + message.assertionSchema = String(object.assertionSchema); + if (object.vars) { + if (typeof object.vars !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.vars: object expected"); + message.vars = {}; + for (var keys = Object.keys(object.vars), i = 0; i < keys.length; ++i) + message.vars[keys[i]] = String(object.vars[keys[i]]); + } + if (object.databaseSuffix != null) + message.databaseSuffix = String(object.databaseSuffix); + if (object.schemaSuffix != null) + message.schemaSuffix = String(object.schemaSuffix); + if (object.tablePrefix != null) + message.tablePrefix = String(object.tablePrefix); + return message; + }; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} message CodeCompilationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CodeCompilationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.vars = {}; + if (options.defaults) { + object.defaultDatabase = ""; + object.defaultSchema = ""; + object.assertionSchema = ""; + object.databaseSuffix = ""; + object.schemaSuffix = ""; + object.tablePrefix = ""; + object.defaultLocation = ""; + } + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + object.defaultDatabase = message.defaultDatabase; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + object.defaultSchema = message.defaultSchema; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + object.assertionSchema = message.assertionSchema; + var keys2; + if (message.vars && (keys2 = Object.keys(message.vars)).length) { + object.vars = {}; + for (var j = 0; j < keys2.length; ++j) + object.vars[keys2[j]] = message.vars[keys2[j]]; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + object.databaseSuffix = message.databaseSuffix; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + object.schemaSuffix = message.schemaSuffix; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + object.tablePrefix = message.tablePrefix; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + object.defaultLocation = message.defaultLocation; + return object; + }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + * @returns {Object.} JSON object + */ + CodeCompilationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CodeCompilationConfig; + })(); + + CompilationResult.CompilationError = (function() { + + /** + * Properties of a CompilationError. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @interface ICompilationError + * @property {string|null} [message] CompilationError message + * @property {string|null} [stack] CompilationError stack + * @property {string|null} [path] CompilationError path + * @property {google.cloud.dataform.v1beta1.ITarget|null} [actionTarget] CompilationError actionTarget + */ + + /** + * Constructs a new CompilationError. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @classdesc Represents a CompilationError. + * @implements ICompilationError + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError=} [properties] Properties to set + */ + function CompilationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationError message. + * @member {string} message + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.message = ""; + + /** + * CompilationError stack. + * @member {string} stack + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.stack = ""; + + /** + * CompilationError path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.path = ""; + + /** + * CompilationError actionTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} actionTarget + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.actionTarget = null; + + /** + * Creates a new CompilationError instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError instance + */ + CompilationError.create = function create(properties) { + return new CompilationError(properties); + }; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.stack != null && Object.hasOwnProperty.call(message, "stack")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stack); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.actionTarget != null && Object.hasOwnProperty.call(message, "actionTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.actionTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.stack = reader.string(); + break; + case 3: + message.path = reader.string(); + break; + case 4: + message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationError message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.stack != null && message.hasOwnProperty("stack")) + if (!$util.isString(message.stack)) + return "stack: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.actionTarget); + if (error) + return "actionTarget." + error; + } + return null; + }; + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + */ + CompilationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError(); + if (object.message != null) + message.message = String(object.message); + if (object.stack != null) + message.stack = String(object.stack); + if (object.path != null) + message.path = String(object.path); + if (object.actionTarget != null) { + if (typeof object.actionTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.CompilationError.actionTarget: object expected"); + message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.actionTarget); + } + return message; + }; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} message CompilationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.stack = ""; + object.path = ""; + object.actionTarget = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.stack != null && message.hasOwnProperty("stack")) + object.stack = message.stack; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) + object.actionTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.actionTarget, options); + return object; + }; + + /** + * Converts this CompilationError to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + * @returns {Object.} JSON object + */ + CompilationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompilationError; + })(); + + return CompilationResult; + })(); + + v1beta1.ListCompilationResultsRequest = (function() { + + /** + * Properties of a ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListCompilationResultsRequest + * @property {string|null} [parent] ListCompilationResultsRequest parent + * @property {number|null} [pageSize] ListCompilationResultsRequest pageSize + * @property {string|null} [pageToken] ListCompilationResultsRequest pageToken + */ + + /** + * Constructs a new ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListCompilationResultsRequest. + * @implements IListCompilationResultsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest=} [properties] Properties to set + */ + function ListCompilationResultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.parent = ""; + + /** + * ListCompilationResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageSize = 0; + + /** + * ListCompilationResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest instance + */ + ListCompilationResultsRequest.create = function create(properties) { + return new ListCompilationResultsRequest(properties); + }; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + */ + ListCompilationResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} message ListCompilationResultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCompilationResultsRequest; + })(); + + v1beta1.ListCompilationResultsResponse = (function() { + + /** + * Properties of a ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListCompilationResultsResponse + * @property {Array.|null} [compilationResults] ListCompilationResultsResponse compilationResults + * @property {string|null} [nextPageToken] ListCompilationResultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCompilationResultsResponse unreachable + */ + + /** + * Constructs a new ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListCompilationResultsResponse. + * @implements IListCompilationResultsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse=} [properties] Properties to set + */ + function ListCompilationResultsResponse(properties) { + this.compilationResults = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsResponse compilationResults. + * @member {Array.} compilationResults + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.compilationResults = $util.emptyArray; + + /** + * ListCompilationResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.nextPageToken = ""; + + /** + * ListCompilationResultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse instance + */ + ListCompilationResultsResponse.create = function create(properties) { + return new ListCompilationResultsResponse(properties); + }; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResults != null && message.compilationResults.length) + for (var i = 0; i < message.compilationResults.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResult.encode(message.compilationResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compilationResults && message.compilationResults.length)) + message.compilationResults = []; + message.compilationResults.push($root.google.cloud.dataform.v1beta1.CompilationResult.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResults != null && message.hasOwnProperty("compilationResults")) { + if (!Array.isArray(message.compilationResults)) + return "compilationResults: array expected"; + for (var i = 0; i < message.compilationResults.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.verify(message.compilationResults[i]); + if (error) + return "compilationResults." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + */ + ListCompilationResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse(); + if (object.compilationResults) { + if (!Array.isArray(object.compilationResults)) + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.compilationResults: array expected"); + message.compilationResults = []; + for (var i = 0; i < object.compilationResults.length; ++i) { + if (typeof object.compilationResults[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.compilationResults: object expected"); + message.compilationResults[i] = $root.google.cloud.dataform.v1beta1.CompilationResult.fromObject(object.compilationResults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} message ListCompilationResultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.compilationResults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResults && message.compilationResults.length) { + object.compilationResults = []; + for (var j = 0; j < message.compilationResults.length; ++j) + object.compilationResults[j] = $root.google.cloud.dataform.v1beta1.CompilationResult.toObject(message.compilationResults[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCompilationResultsResponse; + })(); + + v1beta1.GetCompilationResultRequest = (function() { + + /** + * Properties of a GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetCompilationResultRequest + * @property {string|null} [name] GetCompilationResultRequest name + */ + + /** + * Constructs a new GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetCompilationResultRequest. + * @implements IGetCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest=} [properties] Properties to set + */ + function GetCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCompilationResultRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @instance + */ + GetCompilationResultRequest.prototype.name = ""; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest instance + */ + GetCompilationResultRequest.create = function create(properties) { + return new GetCompilationResultRequest(properties); + }; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCompilationResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + */ + GetCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetCompilationResultRequest} message GetCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + GetCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCompilationResultRequest; + })(); + + v1beta1.CreateCompilationResultRequest = (function() { + + /** + * Properties of a CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateCompilationResultRequest + * @property {string|null} [parent] CreateCompilationResultRequest parent + * @property {google.cloud.dataform.v1beta1.ICompilationResult|null} [compilationResult] CreateCompilationResultRequest compilationResult + */ + + /** + * Constructs a new CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateCompilationResultRequest. + * @implements ICreateCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest=} [properties] Properties to set + */ + function CreateCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCompilationResultRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.parent = ""; + + /** + * CreateCompilationResultRequest compilationResult. + * @member {google.cloud.dataform.v1beta1.ICompilationResult|null|undefined} compilationResult + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.compilationResult = null; + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest instance + */ + CreateCompilationResultRequest.create = function create(properties) { + return new CreateCompilationResultRequest(properties); + }; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + $root.google.cloud.dataform.v1beta1.CompilationResult.encode(message.compilationResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCompilationResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.verify(message.compilationResult); + if (error) + return "compilationResult." + error; + } + return null; + }; + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + */ + CreateCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.compilationResult != null) { + if (typeof object.compilationResult !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateCompilationResultRequest.compilationResult: object expected"); + message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.fromObject(object.compilationResult); + } + return message; + }; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} message CreateCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.compilationResult = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.toObject(message.compilationResult, options); + return object; + }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCompilationResultRequest; + })(); + + v1beta1.Target = (function() { + + /** + * Properties of a Target. + * @memberof google.cloud.dataform.v1beta1 + * @interface ITarget + * @property {string|null} [database] Target database + * @property {string|null} [schema] Target schema + * @property {string|null} [name] Target name + */ + + /** + * Constructs a new Target. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Target. + * @implements ITarget + * @constructor + * @param {google.cloud.dataform.v1beta1.ITarget=} [properties] Properties to set + */ + function Target(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Target database. + * @member {string} database + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.database = ""; + + /** + * Target schema. + * @member {string} schema + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.schema = ""; + + /** + * Target name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.name = ""; + + /** + * Creates a new Target instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Target} Target instance + */ + Target.create = function create(properties) { + return new Target(properties); + }; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Target message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Target(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.database = reader.string(); + break; + case 2: + message.schema = reader.string(); + break; + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Target message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Target.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Target} Target + */ + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Target) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Target(); + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.Target} message Target + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Target.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.database = ""; + object.schema = ""; + object.name = ""; + } + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Target to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + * @returns {Object.} JSON object + */ + Target.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Target; + })(); + + v1beta1.RelationDescriptor = (function() { + + /** + * Properties of a RelationDescriptor. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRelationDescriptor + * @property {string|null} [description] RelationDescriptor description + * @property {Array.|null} [columns] RelationDescriptor columns + * @property {Object.|null} [bigqueryLabels] RelationDescriptor bigqueryLabels + */ + + /** + * Constructs a new RelationDescriptor. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RelationDescriptor. + * @implements IRelationDescriptor + * @constructor + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor=} [properties] Properties to set + */ + function RelationDescriptor(properties) { + this.columns = []; + this.bigqueryLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RelationDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.description = ""; + + /** + * RelationDescriptor columns. + * @member {Array.} columns + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.columns = $util.emptyArray; + + /** + * RelationDescriptor bigqueryLabels. + * @member {Object.} bigqueryLabels + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.bigqueryLabels = $util.emptyObject; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor instance + */ + RelationDescriptor.create = function create(properties) { + return new RelationDescriptor(properties); + }; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigqueryLabels != null && Object.hasOwnProperty.call(message, "bigqueryLabels")) + for (var keys = Object.keys(message.bigqueryLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.bigqueryLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + case 2: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); + break; + case 3: + if (message.bigqueryLabels === $util.emptyObject) + message.bigqueryLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.bigqueryLabels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RelationDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RelationDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.bigqueryLabels != null && message.hasOwnProperty("bigqueryLabels")) { + if (!$util.isObject(message.bigqueryLabels)) + return "bigqueryLabels: object expected"; + var key = Object.keys(message.bigqueryLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.bigqueryLabels[key[i]])) + return "bigqueryLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + */ + RelationDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RelationDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor(); + if (object.description != null) + message.description = String(object.description); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.columns: object expected"); + message.columns[i] = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.fromObject(object.columns[i]); + } + } + if (object.bigqueryLabels) { + if (typeof object.bigqueryLabels !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.bigqueryLabels: object expected"); + message.bigqueryLabels = {}; + for (var keys = Object.keys(object.bigqueryLabels), i = 0; i < keys.length; ++i) + message.bigqueryLabels[keys[i]] = String(object.bigqueryLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor} message RelationDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RelationDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.objects || options.defaults) + object.bigqueryLabels = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.toObject(message.columns[j], options); + } + var keys2; + if (message.bigqueryLabels && (keys2 = Object.keys(message.bigqueryLabels)).length) { + object.bigqueryLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.bigqueryLabels[keys2[j]] = message.bigqueryLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this RelationDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + * @returns {Object.} JSON object + */ + RelationDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RelationDescriptor.ColumnDescriptor = (function() { + + /** + * Properties of a ColumnDescriptor. + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @interface IColumnDescriptor + * @property {Array.|null} [path] ColumnDescriptor path + * @property {string|null} [description] ColumnDescriptor description + * @property {Array.|null} [bigqueryPolicyTags] ColumnDescriptor bigqueryPolicyTags + */ + + /** + * Constructs a new ColumnDescriptor. + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @classdesc Represents a ColumnDescriptor. + * @implements IColumnDescriptor + * @constructor + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + */ + function ColumnDescriptor(properties) { + this.path = []; + this.bigqueryPolicyTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnDescriptor path. + * @member {Array.} path + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.path = $util.emptyArray; + + /** + * ColumnDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.description = ""; + + /** + * ColumnDescriptor bigqueryPolicyTags. + * @member {Array.} bigqueryPolicyTags + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.bigqueryPolicyTags = $util.emptyArray; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor instance + */ + ColumnDescriptor.create = function create(properties) { + return new ColumnDescriptor(properties); + }; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) + for (var i = 0; i < message.path.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path[i]); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.bigqueryPolicyTags != null && message.bigqueryPolicyTags.length) + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bigqueryPolicyTags[i]); + return writer; + }; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.string()); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) + message.bigqueryPolicyTags = []; + message.bigqueryPolicyTags.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isString(message.path[i])) + return "path: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.bigqueryPolicyTags != null && message.hasOwnProperty("bigqueryPolicyTags")) { + if (!Array.isArray(message.bigqueryPolicyTags)) + return "bigqueryPolicyTags: array expected"; + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + if (!$util.isString(message.bigqueryPolicyTags[i])) + return "bigqueryPolicyTags: string[] expected"; + } + return null; + }; + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + */ + ColumnDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = String(object.path[i]); + } + if (object.description != null) + message.description = String(object.description); + if (object.bigqueryPolicyTags) { + if (!Array.isArray(object.bigqueryPolicyTags)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.bigqueryPolicyTags: array expected"); + message.bigqueryPolicyTags = []; + for (var i = 0; i < object.bigqueryPolicyTags.length; ++i) + message.bigqueryPolicyTags[i] = String(object.bigqueryPolicyTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} message ColumnDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.bigqueryPolicyTags = []; + } + if (options.defaults) + object.description = ""; + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.bigqueryPolicyTags && message.bigqueryPolicyTags.length) { + object.bigqueryPolicyTags = []; + for (var j = 0; j < message.bigqueryPolicyTags.length; ++j) + object.bigqueryPolicyTags[j] = message.bigqueryPolicyTags[j]; + } + return object; + }; + + /** + * Converts this ColumnDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + * @returns {Object.} JSON object + */ + ColumnDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ColumnDescriptor; + })(); + + return RelationDescriptor; + })(); + + v1beta1.CompilationResultAction = (function() { + + /** + * Properties of a CompilationResultAction. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICompilationResultAction + * @property {google.cloud.dataform.v1beta1.ITarget|null} [target] CompilationResultAction target + * @property {google.cloud.dataform.v1beta1.ITarget|null} [canonicalTarget] CompilationResultAction canonicalTarget + * @property {string|null} [filePath] CompilationResultAction filePath + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null} [relation] CompilationResultAction relation + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null} [operations] CompilationResultAction operations + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null} [assertion] CompilationResultAction assertion + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null} [declaration] CompilationResultAction declaration + */ + + /** + * Constructs a new CompilationResultAction. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CompilationResultAction. + * @implements ICompilationResultAction + * @constructor + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction=} [properties] Properties to set + */ + function CompilationResultAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResultAction target. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.target = null; + + /** + * CompilationResultAction canonicalTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.canonicalTarget = null; + + /** + * CompilationResultAction filePath. + * @member {string} filePath + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.filePath = ""; + + /** + * CompilationResultAction relation. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null|undefined} relation + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.relation = null; + + /** + * CompilationResultAction operations. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null|undefined} operations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.operations = null; + + /** + * CompilationResultAction assertion. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null|undefined} assertion + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.assertion = null; + + /** + * CompilationResultAction declaration. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null|undefined} declaration + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.declaration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResultAction compiledObject. + * @member {"relation"|"operations"|"assertion"|"declaration"|undefined} compiledObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + Object.defineProperty(CompilationResultAction.prototype, "compiledObject", { + get: $util.oneOfGetter($oneOfFields = ["relation", "operations", "assertion", "declaration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction instance + */ + CompilationResultAction.create = function create(properties) { + return new CompilationResultAction(properties); + }; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filePath); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.encode(message.relation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.encode(message.operations, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.assertion != null && Object.hasOwnProperty.call(message, "assertion")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.encode(message.assertion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.encode(message.declaration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 2: + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 3: + message.filePath = reader.string(); + break; + case 4: + message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.decode(reader, reader.uint32()); + break; + case 5: + message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.decode(reader, reader.uint32()); + break; + case 6: + message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.decode(reader, reader.uint32()); + break; + case 7: + message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResultAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResultAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) { + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify(message.relation); + if (error) + return "relation." + error; + } + } + if (message.operations != null && message.hasOwnProperty("operations")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify(message.operations); + if (error) + return "operations." + error; + } + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify(message.assertion); + if (error) + return "assertion." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify(message.declaration); + if (error) + return "declaration." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + */ + CompilationResultAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.canonicalTarget); + } + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.relation != null) { + if (typeof object.relation !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.relation: object expected"); + message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.fromObject(object.relation); + } + if (object.operations != null) { + if (typeof object.operations !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.operations: object expected"); + message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.fromObject(object.operations); + } + if (object.assertion != null) { + if (typeof object.assertion !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.assertion: object expected"); + message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.fromObject(object.assertion); + } + if (object.declaration != null) { + if (typeof object.declaration !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.declaration: object expected"); + message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.fromObject(object.declaration); + } + return message; + }; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction} message CompilationResultAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResultAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.filePath = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1beta1.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.canonicalTarget, options); + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.relation != null && message.hasOwnProperty("relation")) { + object.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.toObject(message.relation, options); + if (options.oneofs) + object.compiledObject = "relation"; + } + if (message.operations != null && message.hasOwnProperty("operations")) { + object.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.toObject(message.operations, options); + if (options.oneofs) + object.compiledObject = "operations"; + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + object.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.toObject(message.assertion, options); + if (options.oneofs) + object.compiledObject = "assertion"; + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + object.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.toObject(message.declaration, options); + if (options.oneofs) + object.compiledObject = "declaration"; + } + return object; + }; + + /** + * Converts this CompilationResultAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + * @returns {Object.} JSON object + */ + CompilationResultAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompilationResultAction.Relation = (function() { + + /** + * Properties of a Relation. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IRelation + * @property {Array.|null} [dependencyTargets] Relation dependencyTargets + * @property {boolean|null} [disabled] Relation disabled + * @property {Array.|null} [tags] Relation tags + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Relation relationDescriptor + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|null} [relationType] Relation relationType + * @property {string|null} [selectQuery] Relation selectQuery + * @property {Array.|null} [preOperations] Relation preOperations + * @property {Array.|null} [postOperations] Relation postOperations + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null} [incrementalTableConfig] Relation incrementalTableConfig + * @property {string|null} [partitionExpression] Relation partitionExpression + * @property {Array.|null} [clusterExpressions] Relation clusterExpressions + * @property {number|null} [partitionExpirationDays] Relation partitionExpirationDays + * @property {boolean|null} [requirePartitionFilter] Relation requirePartitionFilter + * @property {Object.|null} [additionalOptions] Relation additionalOptions + */ + + /** + * Constructs a new Relation. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents a Relation. + * @implements IRelation + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation=} [properties] Properties to set + */ + function Relation(properties) { + this.dependencyTargets = []; + this.tags = []; + this.preOperations = []; + this.postOperations = []; + this.clusterExpressions = []; + this.additionalOptions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Relation dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.dependencyTargets = $util.emptyArray; + + /** + * Relation disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.disabled = false; + + /** + * Relation tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.tags = $util.emptyArray; + + /** + * Relation relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationDescriptor = null; + + /** + * Relation relationType. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType} relationType + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationType = 0; + + /** + * Relation selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.selectQuery = ""; + + /** + * Relation preOperations. + * @member {Array.} preOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.preOperations = $util.emptyArray; + + /** + * Relation postOperations. + * @member {Array.} postOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.postOperations = $util.emptyArray; + + /** + * Relation incrementalTableConfig. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null|undefined} incrementalTableConfig + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.incrementalTableConfig = null; + + /** + * Relation partitionExpression. + * @member {string} partitionExpression + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpression = ""; + + /** + * Relation clusterExpressions. + * @member {Array.} clusterExpressions + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.clusterExpressions = $util.emptyArray; + + /** + * Relation partitionExpirationDays. + * @member {number} partitionExpirationDays + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpirationDays = 0; + + /** + * Relation requirePartitionFilter. + * @member {boolean} requirePartitionFilter + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.requirePartitionFilter = false; + + /** + * Relation additionalOptions. + * @member {Object.} additionalOptions + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.additionalOptions = $util.emptyObject; + + /** + * Creates a new Relation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation instance + */ + Relation.create = function create(properties) { + return new Relation(properties); + }; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.relationType != null && Object.hasOwnProperty.call(message, "relationType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.relationType); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.selectQuery); + if (message.preOperations != null && message.preOperations.length) + for (var i = 0; i < message.preOperations.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.preOperations[i]); + if (message.postOperations != null && message.postOperations.length) + for (var i = 0; i < message.postOperations.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.postOperations[i]); + if (message.incrementalTableConfig != null && Object.hasOwnProperty.call(message, "incrementalTableConfig")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.encode(message.incrementalTableConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.partitionExpression != null && Object.hasOwnProperty.call(message, "partitionExpression")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.partitionExpression); + if (message.clusterExpressions != null && message.clusterExpressions.length) + for (var i = 0; i < message.clusterExpressions.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.clusterExpressions[i]); + if (message.partitionExpirationDays != null && Object.hasOwnProperty.call(message, "partitionExpirationDays")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.partitionExpirationDays); + if (message.requirePartitionFilter != null && Object.hasOwnProperty.call(message, "requirePartitionFilter")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requirePartitionFilter); + if (message.additionalOptions != null && Object.hasOwnProperty.call(message, "additionalOptions")) + for (var keys = Object.keys(message.additionalOptions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalOptions[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 4: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + case 5: + message.relationType = reader.int32(); + break; + case 6: + message.selectQuery = reader.string(); + break; + case 7: + if (!(message.preOperations && message.preOperations.length)) + message.preOperations = []; + message.preOperations.push(reader.string()); + break; + case 8: + if (!(message.postOperations && message.postOperations.length)) + message.postOperations = []; + message.postOperations.push(reader.string()); + break; + case 9: + message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); + break; + case 10: + message.partitionExpression = reader.string(); + break; + case 11: + if (!(message.clusterExpressions && message.clusterExpressions.length)) + message.clusterExpressions = []; + message.clusterExpressions.push(reader.string()); + break; + case 12: + message.partitionExpirationDays = reader.int32(); + break; + case 13: + message.requirePartitionFilter = reader.bool(); + break; + case 14: + if (message.additionalOptions === $util.emptyObject) + message.additionalOptions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.additionalOptions[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Relation message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Relation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.relationType != null && message.hasOwnProperty("relationType")) + switch (message.relationType) { + default: + return "relationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.preOperations != null && message.hasOwnProperty("preOperations")) { + if (!Array.isArray(message.preOperations)) + return "preOperations: array expected"; + for (var i = 0; i < message.preOperations.length; ++i) + if (!$util.isString(message.preOperations[i])) + return "preOperations: string[] expected"; + } + if (message.postOperations != null && message.hasOwnProperty("postOperations")) { + if (!Array.isArray(message.postOperations)) + return "postOperations: array expected"; + for (var i = 0; i < message.postOperations.length; ++i) + if (!$util.isString(message.postOperations[i])) + return "postOperations: string[] expected"; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify(message.incrementalTableConfig); + if (error) + return "incrementalTableConfig." + error; + } + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + if (!$util.isString(message.partitionExpression)) + return "partitionExpression: string expected"; + if (message.clusterExpressions != null && message.hasOwnProperty("clusterExpressions")) { + if (!Array.isArray(message.clusterExpressions)) + return "clusterExpressions: array expected"; + for (var i = 0; i < message.clusterExpressions.length; ++i) + if (!$util.isString(message.clusterExpressions[i])) + return "clusterExpressions: string[] expected"; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + if (!$util.isInteger(message.partitionExpirationDays)) + return "partitionExpirationDays: integer expected"; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + if (typeof message.requirePartitionFilter !== "boolean") + return "requirePartitionFilter: boolean expected"; + if (message.additionalOptions != null && message.hasOwnProperty("additionalOptions")) { + if (!$util.isObject(message.additionalOptions)) + return "additionalOptions: object expected"; + var key = Object.keys(message.additionalOptions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.additionalOptions[key[i]])) + return "additionalOptions: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + */ + Relation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + switch (object.relationType) { + case "RELATION_TYPE_UNSPECIFIED": + case 0: + message.relationType = 0; + break; + case "TABLE": + case 1: + message.relationType = 1; + break; + case "VIEW": + case 2: + message.relationType = 2; + break; + case "INCREMENTAL_TABLE": + case 3: + message.relationType = 3; + break; + case "MATERIALIZED_VIEW": + case 4: + message.relationType = 4; + break; + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.preOperations) { + if (!Array.isArray(object.preOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.preOperations: array expected"); + message.preOperations = []; + for (var i = 0; i < object.preOperations.length; ++i) + message.preOperations[i] = String(object.preOperations[i]); + } + if (object.postOperations) { + if (!Array.isArray(object.postOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.postOperations: array expected"); + message.postOperations = []; + for (var i = 0; i < object.postOperations.length; ++i) + message.postOperations[i] = String(object.postOperations[i]); + } + if (object.incrementalTableConfig != null) { + if (typeof object.incrementalTableConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.incrementalTableConfig: object expected"); + message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.fromObject(object.incrementalTableConfig); + } + if (object.partitionExpression != null) + message.partitionExpression = String(object.partitionExpression); + if (object.clusterExpressions) { + if (!Array.isArray(object.clusterExpressions)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.clusterExpressions: array expected"); + message.clusterExpressions = []; + for (var i = 0; i < object.clusterExpressions.length; ++i) + message.clusterExpressions[i] = String(object.clusterExpressions[i]); + } + if (object.partitionExpirationDays != null) + message.partitionExpirationDays = object.partitionExpirationDays | 0; + if (object.requirePartitionFilter != null) + message.requirePartitionFilter = Boolean(object.requirePartitionFilter); + if (object.additionalOptions) { + if (typeof object.additionalOptions !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.additionalOptions: object expected"); + message.additionalOptions = {}; + for (var keys = Object.keys(object.additionalOptions), i = 0; i < keys.length; ++i) + message.additionalOptions[keys[i]] = String(object.additionalOptions[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} message Relation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Relation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.preOperations = []; + object.postOperations = []; + object.clusterExpressions = []; + } + if (options.objects || options.defaults) + object.additionalOptions = {}; + if (options.defaults) { + object.disabled = false; + object.relationDescriptor = null; + object.relationType = options.enums === String ? "RELATION_TYPE_UNSPECIFIED" : 0; + object.selectQuery = ""; + object.incrementalTableConfig = null; + object.partitionExpression = ""; + object.partitionExpirationDays = 0; + object.requirePartitionFilter = false; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + if (message.relationType != null && message.hasOwnProperty("relationType")) + object.relationType = options.enums === String ? $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.preOperations && message.preOperations.length) { + object.preOperations = []; + for (var j = 0; j < message.preOperations.length; ++j) + object.preOperations[j] = message.preOperations[j]; + } + if (message.postOperations && message.postOperations.length) { + object.postOperations = []; + for (var j = 0; j < message.postOperations.length; ++j) + object.postOperations[j] = message.postOperations[j]; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) + object.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.toObject(message.incrementalTableConfig, options); + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + object.partitionExpression = message.partitionExpression; + if (message.clusterExpressions && message.clusterExpressions.length) { + object.clusterExpressions = []; + for (var j = 0; j < message.clusterExpressions.length; ++j) + object.clusterExpressions[j] = message.clusterExpressions[j]; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + object.partitionExpirationDays = message.partitionExpirationDays; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + object.requirePartitionFilter = message.requirePartitionFilter; + var keys2; + if (message.additionalOptions && (keys2 = Object.keys(message.additionalOptions)).length) { + object.additionalOptions = {}; + for (var j = 0; j < keys2.length; ++j) + object.additionalOptions[keys2[j]] = message.additionalOptions[keys2[j]]; + } + return object; + }; + + /** + * Converts this Relation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + * @returns {Object.} JSON object + */ + Relation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RelationType enum. + * @name google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType + * @enum {number} + * @property {number} RELATION_TYPE_UNSPECIFIED=0 RELATION_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} VIEW=2 VIEW value + * @property {number} INCREMENTAL_TABLE=3 INCREMENTAL_TABLE value + * @property {number} MATERIALIZED_VIEW=4 MATERIALIZED_VIEW value + */ + Relation.RelationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "VIEW"] = 2; + values[valuesById[3] = "INCREMENTAL_TABLE"] = 3; + values[valuesById[4] = "MATERIALIZED_VIEW"] = 4; + return values; + })(); + + Relation.IncrementalTableConfig = (function() { + + /** + * Properties of an IncrementalTableConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @interface IIncrementalTableConfig + * @property {string|null} [incrementalSelectQuery] IncrementalTableConfig incrementalSelectQuery + * @property {boolean|null} [refreshDisabled] IncrementalTableConfig refreshDisabled + * @property {Array.|null} [uniqueKeyParts] IncrementalTableConfig uniqueKeyParts + * @property {string|null} [updatePartitionFilter] IncrementalTableConfig updatePartitionFilter + * @property {Array.|null} [incrementalPreOperations] IncrementalTableConfig incrementalPreOperations + * @property {Array.|null} [incrementalPostOperations] IncrementalTableConfig incrementalPostOperations + */ + + /** + * Constructs a new IncrementalTableConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @classdesc Represents an IncrementalTableConfig. + * @implements IIncrementalTableConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + */ + function IncrementalTableConfig(properties) { + this.uniqueKeyParts = []; + this.incrementalPreOperations = []; + this.incrementalPostOperations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncrementalTableConfig incrementalSelectQuery. + * @member {string} incrementalSelectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalSelectQuery = ""; + + /** + * IncrementalTableConfig refreshDisabled. + * @member {boolean} refreshDisabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.refreshDisabled = false; + + /** + * IncrementalTableConfig uniqueKeyParts. + * @member {Array.} uniqueKeyParts + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.uniqueKeyParts = $util.emptyArray; + + /** + * IncrementalTableConfig updatePartitionFilter. + * @member {string} updatePartitionFilter + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.updatePartitionFilter = ""; + + /** + * IncrementalTableConfig incrementalPreOperations. + * @member {Array.} incrementalPreOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPreOperations = $util.emptyArray; + + /** + * IncrementalTableConfig incrementalPostOperations. + * @member {Array.} incrementalPostOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPostOperations = $util.emptyArray; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig instance + */ + IncrementalTableConfig.create = function create(properties) { + return new IncrementalTableConfig(properties); + }; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.incrementalSelectQuery != null && Object.hasOwnProperty.call(message, "incrementalSelectQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.incrementalSelectQuery); + if (message.refreshDisabled != null && Object.hasOwnProperty.call(message, "refreshDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.refreshDisabled); + if (message.uniqueKeyParts != null && message.uniqueKeyParts.length) + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uniqueKeyParts[i]); + if (message.updatePartitionFilter != null && Object.hasOwnProperty.call(message, "updatePartitionFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.updatePartitionFilter); + if (message.incrementalPreOperations != null && message.incrementalPreOperations.length) + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.incrementalPreOperations[i]); + if (message.incrementalPostOperations != null && message.incrementalPostOperations.length) + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.incrementalPostOperations[i]); + return writer; + }; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.incrementalSelectQuery = reader.string(); + break; + case 2: + message.refreshDisabled = reader.bool(); + break; + case 3: + if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) + message.uniqueKeyParts = []; + message.uniqueKeyParts.push(reader.string()); + break; + case 4: + message.updatePartitionFilter = reader.string(); + break; + case 5: + if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) + message.incrementalPreOperations = []; + message.incrementalPreOperations.push(reader.string()); + break; + case 6: + if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) + message.incrementalPostOperations = []; + message.incrementalPostOperations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalTableConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalTableConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + if (!$util.isString(message.incrementalSelectQuery)) + return "incrementalSelectQuery: string expected"; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + if (typeof message.refreshDisabled !== "boolean") + return "refreshDisabled: boolean expected"; + if (message.uniqueKeyParts != null && message.hasOwnProperty("uniqueKeyParts")) { + if (!Array.isArray(message.uniqueKeyParts)) + return "uniqueKeyParts: array expected"; + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + if (!$util.isString(message.uniqueKeyParts[i])) + return "uniqueKeyParts: string[] expected"; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + if (!$util.isString(message.updatePartitionFilter)) + return "updatePartitionFilter: string expected"; + if (message.incrementalPreOperations != null && message.hasOwnProperty("incrementalPreOperations")) { + if (!Array.isArray(message.incrementalPreOperations)) + return "incrementalPreOperations: array expected"; + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + if (!$util.isString(message.incrementalPreOperations[i])) + return "incrementalPreOperations: string[] expected"; + } + if (message.incrementalPostOperations != null && message.hasOwnProperty("incrementalPostOperations")) { + if (!Array.isArray(message.incrementalPostOperations)) + return "incrementalPostOperations: array expected"; + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + if (!$util.isString(message.incrementalPostOperations[i])) + return "incrementalPostOperations: string[] expected"; + } + return null; + }; + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + */ + IncrementalTableConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig(); + if (object.incrementalSelectQuery != null) + message.incrementalSelectQuery = String(object.incrementalSelectQuery); + if (object.refreshDisabled != null) + message.refreshDisabled = Boolean(object.refreshDisabled); + if (object.uniqueKeyParts) { + if (!Array.isArray(object.uniqueKeyParts)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.uniqueKeyParts: array expected"); + message.uniqueKeyParts = []; + for (var i = 0; i < object.uniqueKeyParts.length; ++i) + message.uniqueKeyParts[i] = String(object.uniqueKeyParts[i]); + } + if (object.updatePartitionFilter != null) + message.updatePartitionFilter = String(object.updatePartitionFilter); + if (object.incrementalPreOperations) { + if (!Array.isArray(object.incrementalPreOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPreOperations: array expected"); + message.incrementalPreOperations = []; + for (var i = 0; i < object.incrementalPreOperations.length; ++i) + message.incrementalPreOperations[i] = String(object.incrementalPreOperations[i]); + } + if (object.incrementalPostOperations) { + if (!Array.isArray(object.incrementalPostOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPostOperations: array expected"); + message.incrementalPostOperations = []; + for (var i = 0; i < object.incrementalPostOperations.length; ++i) + message.incrementalPostOperations[i] = String(object.incrementalPostOperations[i]); + } + return message; + }; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} message IncrementalTableConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalTableConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uniqueKeyParts = []; + object.incrementalPreOperations = []; + object.incrementalPostOperations = []; + } + if (options.defaults) { + object.incrementalSelectQuery = ""; + object.refreshDisabled = false; + object.updatePartitionFilter = ""; + } + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + object.incrementalSelectQuery = message.incrementalSelectQuery; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + object.refreshDisabled = message.refreshDisabled; + if (message.uniqueKeyParts && message.uniqueKeyParts.length) { + object.uniqueKeyParts = []; + for (var j = 0; j < message.uniqueKeyParts.length; ++j) + object.uniqueKeyParts[j] = message.uniqueKeyParts[j]; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + object.updatePartitionFilter = message.updatePartitionFilter; + if (message.incrementalPreOperations && message.incrementalPreOperations.length) { + object.incrementalPreOperations = []; + for (var j = 0; j < message.incrementalPreOperations.length; ++j) + object.incrementalPreOperations[j] = message.incrementalPreOperations[j]; + } + if (message.incrementalPostOperations && message.incrementalPostOperations.length) { + object.incrementalPostOperations = []; + for (var j = 0; j < message.incrementalPostOperations.length; ++j) + object.incrementalPostOperations[j] = message.incrementalPostOperations[j]; + } + return object; + }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + * @returns {Object.} JSON object + */ + IncrementalTableConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IncrementalTableConfig; + })(); + + return Relation; + })(); + + CompilationResultAction.Operations = (function() { + + /** + * Properties of an Operations. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IOperations + * @property {Array.|null} [dependencyTargets] Operations dependencyTargets + * @property {boolean|null} [disabled] Operations disabled + * @property {Array.|null} [tags] Operations tags + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Operations relationDescriptor + * @property {Array.|null} [queries] Operations queries + * @property {boolean|null} [hasOutput] Operations hasOutput + */ + + /** + * Constructs a new Operations. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents an Operations. + * @implements IOperations + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations=} [properties] Properties to set + */ + function Operations(properties) { + this.dependencyTargets = []; + this.tags = []; + this.queries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operations dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.dependencyTargets = $util.emptyArray; + + /** + * Operations disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.disabled = false; + + /** + * Operations tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.tags = $util.emptyArray; + + /** + * Operations relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.relationDescriptor = null; + + /** + * Operations queries. + * @member {Array.} queries + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.queries = $util.emptyArray; + + /** + * Operations hasOutput. + * @member {boolean} hasOutput + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.hasOutput = false; + + /** + * Creates a new Operations instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations instance + */ + Operations.create = function create(properties) { + return new Operations(properties); + }; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.queries != null && message.queries.length) + for (var i = 0; i < message.queries.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queries[i]); + if (message.hasOutput != null && Object.hasOwnProperty.call(message, "hasOutput")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasOutput); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 6: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push(reader.string()); + break; + case 5: + message.hasOutput = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operations message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.queries != null && message.hasOwnProperty("queries")) { + if (!Array.isArray(message.queries)) + return "queries: array expected"; + for (var i = 0; i < message.queries.length; ++i) + if (!$util.isString(message.queries[i])) + return "queries: string[] expected"; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + if (typeof message.hasOutput !== "boolean") + return "hasOutput: boolean expected"; + return null; + }; + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + */ + Operations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + if (object.queries) { + if (!Array.isArray(object.queries)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.queries: array expected"); + message.queries = []; + for (var i = 0; i < object.queries.length; ++i) + message.queries[i] = String(object.queries[i]); + } + if (object.hasOutput != null) + message.hasOutput = Boolean(object.hasOutput); + return message; + }; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} message Operations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.queries = []; + } + if (options.defaults) { + object.disabled = false; + object.hasOutput = false; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.queries && message.queries.length) { + object.queries = []; + for (var j = 0; j < message.queries.length; ++j) + object.queries[j] = message.queries[j]; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + object.hasOutput = message.hasOutput; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Operations to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + * @returns {Object.} JSON object + */ + Operations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operations; + })(); + + CompilationResultAction.Assertion = (function() { + + /** + * Properties of an Assertion. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IAssertion + * @property {Array.|null} [dependencyTargets] Assertion dependencyTargets + * @property {google.cloud.dataform.v1beta1.ITarget|null} [parentAction] Assertion parentAction + * @property {boolean|null} [disabled] Assertion disabled + * @property {Array.|null} [tags] Assertion tags + * @property {string|null} [selectQuery] Assertion selectQuery + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Assertion relationDescriptor + */ + + /** + * Constructs a new Assertion. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents an Assertion. + * @implements IAssertion + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion=} [properties] Properties to set + */ + function Assertion(properties) { + this.dependencyTargets = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Assertion dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.dependencyTargets = $util.emptyArray; + + /** + * Assertion parentAction. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} parentAction + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.parentAction = null; + + /** + * Assertion disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.disabled = false; + + /** + * Assertion tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.tags = $util.emptyArray; + + /** + * Assertion selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.selectQuery = ""; + + /** + * Assertion relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.relationDescriptor = null; + + /** + * Creates a new Assertion instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion instance + */ + Assertion.create = function create(properties) { + return new Assertion(properties); + }; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectQuery); + if (message.parentAction != null && Object.hasOwnProperty.call(message, "parentAction")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.parentAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 5: + message.parentAction = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 4: + message.selectQuery = reader.string(); + break; + case 6: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Assertion message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Assertion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.parentAction != null && message.hasOwnProperty("parentAction")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.parentAction); + if (error) + return "parentAction." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + */ + Assertion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.parentAction != null) { + if (typeof object.parentAction !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.parentAction: object expected"); + message.parentAction = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.parentAction); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} message Assertion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Assertion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + } + if (options.defaults) { + object.disabled = false; + object.selectQuery = ""; + object.parentAction = null; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.parentAction != null && message.hasOwnProperty("parentAction")) + object.parentAction = $root.google.cloud.dataform.v1beta1.Target.toObject(message.parentAction, options); + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Assertion to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + * @returns {Object.} JSON object + */ + Assertion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Assertion; + })(); + + CompilationResultAction.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IDeclaration + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Declaration relationDescriptor + */ + + /** + * Constructs a new Declaration. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @instance + */ + Declaration.prototype.relationDescriptor = null; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration(); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.relationDescriptor = null; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Declaration; + })(); + + return CompilationResultAction; + })(); + + v1beta1.QueryCompilationResultActionsRequest = (function() { + + /** + * Properties of a QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryCompilationResultActionsRequest + * @property {string|null} [name] QueryCompilationResultActionsRequest name + * @property {number|null} [pageSize] QueryCompilationResultActionsRequest pageSize + * @property {string|null} [pageToken] QueryCompilationResultActionsRequest pageToken + * @property {string|null} [filter] QueryCompilationResultActionsRequest filter + */ + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryCompilationResultActionsRequest. + * @implements IQueryCompilationResultActionsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest=} [properties] Properties to set + */ + function QueryCompilationResultActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.name = ""; + + /** + * QueryCompilationResultActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageSize = 0; + + /** + * QueryCompilationResultActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageToken = ""; + + /** + * QueryCompilationResultActionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.filter = ""; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest instance + */ + QueryCompilationResultActionsRequest.create = function create(properties) { + return new QueryCompilationResultActionsRequest(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + */ + QueryCompilationResultActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCompilationResultActionsRequest; + })(); + + v1beta1.QueryCompilationResultActionsResponse = (function() { + + /** + * Properties of a QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryCompilationResultActionsResponse + * @property {Array.|null} [compilationResultActions] QueryCompilationResultActionsResponse compilationResultActions + * @property {string|null} [nextPageToken] QueryCompilationResultActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryCompilationResultActionsResponse. + * @implements IQueryCompilationResultActionsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse=} [properties] Properties to set + */ + function QueryCompilationResultActionsResponse(properties) { + this.compilationResultActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsResponse compilationResultActions. + * @member {Array.} compilationResultActions + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.compilationResultActions = $util.emptyArray; + + /** + * QueryCompilationResultActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse instance + */ + QueryCompilationResultActionsResponse.create = function create(properties) { + return new QueryCompilationResultActionsResponse(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResultActions != null && message.compilationResultActions.length) + for (var i = 0; i < message.compilationResultActions.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.encode(message.compilationResultActions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compilationResultActions && message.compilationResultActions.length)) + message.compilationResultActions = []; + message.compilationResultActions.push($root.google.cloud.dataform.v1beta1.CompilationResultAction.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResultActions != null && message.hasOwnProperty("compilationResultActions")) { + if (!Array.isArray(message.compilationResultActions)) + return "compilationResultActions: array expected"; + for (var i = 0; i < message.compilationResultActions.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.verify(message.compilationResultActions[i]); + if (error) + return "compilationResultActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + */ + QueryCompilationResultActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse(); + if (object.compilationResultActions) { + if (!Array.isArray(object.compilationResultActions)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.compilationResultActions: array expected"); + message.compilationResultActions = []; + for (var i = 0; i < object.compilationResultActions.length; ++i) { + if (typeof object.compilationResultActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.compilationResultActions: object expected"); + message.compilationResultActions[i] = $root.google.cloud.dataform.v1beta1.CompilationResultAction.fromObject(object.compilationResultActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationResultActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResultActions && message.compilationResultActions.length) { + object.compilationResultActions = []; + for (var j = 0; j < message.compilationResultActions.length; ++j) + object.compilationResultActions[j] = $root.google.cloud.dataform.v1beta1.CompilationResultAction.toObject(message.compilationResultActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCompilationResultActionsResponse; + })(); + + v1beta1.WorkflowInvocation = (function() { + + /** + * Properties of a WorkflowInvocation. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkflowInvocation + * @property {string|null} [name] WorkflowInvocation name + * @property {string|null} [compilationResult] WorkflowInvocation compilationResult + * @property {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null} [invocationConfig] WorkflowInvocation invocationConfig + * @property {google.cloud.dataform.v1beta1.WorkflowInvocation.State|null} [state] WorkflowInvocation state + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocation invocationTiming + */ + + /** + * Constructs a new WorkflowInvocation. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WorkflowInvocation. + * @implements IWorkflowInvocation + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation=} [properties] Properties to set + */ + function WorkflowInvocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocation name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.name = ""; + + /** + * WorkflowInvocation compilationResult. + * @member {string} compilationResult + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.compilationResult = ""; + + /** + * WorkflowInvocation invocationConfig. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null|undefined} invocationConfig + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationConfig = null; + + /** + * WorkflowInvocation state. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocation.State} state + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.state = 0; + + /** + * WorkflowInvocation invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationTiming = null; + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation instance + */ + WorkflowInvocation.create = function create(properties) { + return new WorkflowInvocation(properties); + }; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compilationResult); + if (message.invocationConfig != null && Object.hasOwnProperty.call(message, "invocationConfig")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.encode(message.invocationConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.compilationResult = reader.string(); + break; + case 3: + message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocation message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + if (!$util.isString(message.compilationResult)) + return "compilationResult: string expected"; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify(message.invocationConfig); + if (error) + return "invocationConfig." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + */ + WorkflowInvocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocation) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation(); + if (object.name != null) + message.name = String(object.name); + if (object.compilationResult != null) + message.compilationResult = String(object.compilationResult); + if (object.invocationConfig != null) { + if (typeof object.invocationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.invocationConfig: object expected"); + message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.fromObject(object.invocationConfig); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "CANCELING": + case 5: + message.state = 5; + break; + } + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} message WorkflowInvocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.compilationResult = ""; + object.invocationConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.invocationTiming = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = message.compilationResult; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) + object.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.toObject(message.invocationConfig, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocation.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + return object; + }; + + /** + * Converts this WorkflowInvocation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WorkflowInvocation.InvocationConfig = (function() { + + /** + * Properties of an InvocationConfig. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @interface IInvocationConfig + * @property {Array.|null} [includedTargets] InvocationConfig includedTargets + * @property {Array.|null} [includedTags] InvocationConfig includedTags + * @property {boolean|null} [transitiveDependenciesIncluded] InvocationConfig transitiveDependenciesIncluded + * @property {boolean|null} [transitiveDependentsIncluded] InvocationConfig transitiveDependentsIncluded + * @property {boolean|null} [fullyRefreshIncrementalTablesEnabled] InvocationConfig fullyRefreshIncrementalTablesEnabled + */ + + /** + * Constructs a new InvocationConfig. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @classdesc Represents an InvocationConfig. + * @implements IInvocationConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + */ + function InvocationConfig(properties) { + this.includedTargets = []; + this.includedTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvocationConfig includedTargets. + * @member {Array.} includedTargets + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTargets = $util.emptyArray; + + /** + * InvocationConfig includedTags. + * @member {Array.} includedTags + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTags = $util.emptyArray; + + /** + * InvocationConfig transitiveDependenciesIncluded. + * @member {boolean} transitiveDependenciesIncluded + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependenciesIncluded = false; + + /** + * InvocationConfig transitiveDependentsIncluded. + * @member {boolean} transitiveDependentsIncluded + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependentsIncluded = false; + + /** + * InvocationConfig fullyRefreshIncrementalTablesEnabled. + * @member {boolean} fullyRefreshIncrementalTablesEnabled + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.fullyRefreshIncrementalTablesEnabled = false; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig instance + */ + InvocationConfig.create = function create(properties) { + return new InvocationConfig(properties); + }; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includedTargets != null && message.includedTargets.length) + for (var i = 0; i < message.includedTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.includedTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.includedTags != null && message.includedTags.length) + for (var i = 0; i < message.includedTags.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includedTags[i]); + if (message.transitiveDependenciesIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependenciesIncluded")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transitiveDependenciesIncluded); + if (message.transitiveDependentsIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependentsIncluded")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transitiveDependentsIncluded); + if (message.fullyRefreshIncrementalTablesEnabled != null && Object.hasOwnProperty.call(message, "fullyRefreshIncrementalTablesEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.fullyRefreshIncrementalTablesEnabled); + return writer; + }; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.includedTargets && message.includedTargets.length)) + message.includedTargets = []; + message.includedTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.includedTags && message.includedTags.length)) + message.includedTags = []; + message.includedTags.push(reader.string()); + break; + case 3: + message.transitiveDependenciesIncluded = reader.bool(); + break; + case 4: + message.transitiveDependentsIncluded = reader.bool(); + break; + case 5: + message.fullyRefreshIncrementalTablesEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvocationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvocationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includedTargets != null && message.hasOwnProperty("includedTargets")) { + if (!Array.isArray(message.includedTargets)) + return "includedTargets: array expected"; + for (var i = 0; i < message.includedTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.includedTargets[i]); + if (error) + return "includedTargets." + error; + } + } + if (message.includedTags != null && message.hasOwnProperty("includedTags")) { + if (!Array.isArray(message.includedTags)) + return "includedTags: array expected"; + for (var i = 0; i < message.includedTags.length; ++i) + if (!$util.isString(message.includedTags[i])) + return "includedTags: string[] expected"; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + if (typeof message.transitiveDependenciesIncluded !== "boolean") + return "transitiveDependenciesIncluded: boolean expected"; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + if (typeof message.transitiveDependentsIncluded !== "boolean") + return "transitiveDependentsIncluded: boolean expected"; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + if (typeof message.fullyRefreshIncrementalTablesEnabled !== "boolean") + return "fullyRefreshIncrementalTablesEnabled: boolean expected"; + return null; + }; + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + */ + InvocationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig(); + if (object.includedTargets) { + if (!Array.isArray(object.includedTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTargets: array expected"); + message.includedTargets = []; + for (var i = 0; i < object.includedTargets.length; ++i) { + if (typeof object.includedTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTargets: object expected"); + message.includedTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.includedTargets[i]); + } + } + if (object.includedTags) { + if (!Array.isArray(object.includedTags)) + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTags: array expected"); + message.includedTags = []; + for (var i = 0; i < object.includedTags.length; ++i) + message.includedTags[i] = String(object.includedTags[i]); + } + if (object.transitiveDependenciesIncluded != null) + message.transitiveDependenciesIncluded = Boolean(object.transitiveDependenciesIncluded); + if (object.transitiveDependentsIncluded != null) + message.transitiveDependentsIncluded = Boolean(object.transitiveDependentsIncluded); + if (object.fullyRefreshIncrementalTablesEnabled != null) + message.fullyRefreshIncrementalTablesEnabled = Boolean(object.fullyRefreshIncrementalTablesEnabled); + return message; + }; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} message InvocationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvocationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedTargets = []; + object.includedTags = []; + } + if (options.defaults) { + object.transitiveDependenciesIncluded = false; + object.transitiveDependentsIncluded = false; + object.fullyRefreshIncrementalTablesEnabled = false; + } + if (message.includedTargets && message.includedTargets.length) { + object.includedTargets = []; + for (var j = 0; j < message.includedTargets.length; ++j) + object.includedTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.includedTargets[j], options); + } + if (message.includedTags && message.includedTags.length) { + object.includedTags = []; + for (var j = 0; j < message.includedTags.length; ++j) + object.includedTags[j] = message.includedTags[j]; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + object.transitiveDependenciesIncluded = message.transitiveDependenciesIncluded; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + object.transitiveDependentsIncluded = message.transitiveDependentsIncluded; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + object.fullyRefreshIncrementalTablesEnabled = message.fullyRefreshIncrementalTablesEnabled; + return object; + }; + + /** + * Converts this InvocationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + * @returns {Object.} JSON object + */ + InvocationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvocationConfig; + })(); + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.WorkflowInvocation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} FAILED=4 FAILED value + * @property {number} CANCELING=5 CANCELING value + */ + WorkflowInvocation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "CANCELING"] = 5; + return values; + })(); + + return WorkflowInvocation; + })(); + + v1beta1.ListWorkflowInvocationsRequest = (function() { + + /** + * Properties of a ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkflowInvocationsRequest + * @property {string|null} [parent] ListWorkflowInvocationsRequest parent + * @property {number|null} [pageSize] ListWorkflowInvocationsRequest pageSize + * @property {string|null} [pageToken] ListWorkflowInvocationsRequest pageToken + */ + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkflowInvocationsRequest. + * @implements IListWorkflowInvocationsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest=} [properties] Properties to set + */ + function ListWorkflowInvocationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.parent = ""; + + /** + * ListWorkflowInvocationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageSize = 0; + + /** + * ListWorkflowInvocationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest instance + */ + ListWorkflowInvocationsRequest.create = function create(properties) { + return new ListWorkflowInvocationsRequest(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + */ + ListWorkflowInvocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkflowInvocationsRequest; + })(); + + v1beta1.ListWorkflowInvocationsResponse = (function() { + + /** + * Properties of a ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkflowInvocationsResponse + * @property {Array.|null} [workflowInvocations] ListWorkflowInvocationsResponse workflowInvocations + * @property {string|null} [nextPageToken] ListWorkflowInvocationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkflowInvocationsResponse unreachable + */ + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkflowInvocationsResponse. + * @implements IListWorkflowInvocationsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse=} [properties] Properties to set + */ + function ListWorkflowInvocationsResponse(properties) { + this.workflowInvocations = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsResponse workflowInvocations. + * @member {Array.} workflowInvocations + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.workflowInvocations = $util.emptyArray; + + /** + * ListWorkflowInvocationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.nextPageToken = ""; + + /** + * ListWorkflowInvocationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse instance + */ + ListWorkflowInvocationsResponse.create = function create(properties) { + return new ListWorkflowInvocationsResponse(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocations != null && message.workflowInvocations.length) + for (var i = 0; i < message.workflowInvocations.length; ++i) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.encode(message.workflowInvocations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workflowInvocations && message.workflowInvocations.length)) + message.workflowInvocations = []; + message.workflowInvocations.push($root.google.cloud.dataform.v1beta1.WorkflowInvocation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocations != null && message.hasOwnProperty("workflowInvocations")) { + if (!Array.isArray(message.workflowInvocations)) + return "workflowInvocations: array expected"; + for (var i = 0; i < message.workflowInvocations.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.verify(message.workflowInvocations[i]); + if (error) + return "workflowInvocations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + */ + ListWorkflowInvocationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse(); + if (object.workflowInvocations) { + if (!Array.isArray(object.workflowInvocations)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.workflowInvocations: array expected"); + message.workflowInvocations = []; + for (var i = 0; i < object.workflowInvocations.length; ++i) { + if (typeof object.workflowInvocations[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.workflowInvocations: object expected"); + message.workflowInvocations[i] = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.fromObject(object.workflowInvocations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workflowInvocations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocations && message.workflowInvocations.length) { + object.workflowInvocations = []; + for (var j = 0; j < message.workflowInvocations.length; ++j) + object.workflowInvocations[j] = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.toObject(message.workflowInvocations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkflowInvocationsResponse; + })(); + + v1beta1.GetWorkflowInvocationRequest = (function() { + + /** + * Properties of a GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetWorkflowInvocationRequest + * @property {string|null} [name] GetWorkflowInvocationRequest name + */ + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetWorkflowInvocationRequest. + * @implements IGetWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest=} [properties] Properties to set + */ + function GetWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @instance + */ + GetWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest instance + */ + GetWorkflowInvocationRequest.create = function create(properties) { + return new GetWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + */ + GetWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} message GetWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkflowInvocationRequest; + })(); + + v1beta1.CreateWorkflowInvocationRequest = (function() { + + /** + * Properties of a CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateWorkflowInvocationRequest + * @property {string|null} [parent] CreateWorkflowInvocationRequest parent + * @property {google.cloud.dataform.v1beta1.IWorkflowInvocation|null} [workflowInvocation] CreateWorkflowInvocationRequest workflowInvocation + */ + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateWorkflowInvocationRequest. + * @implements ICreateWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest=} [properties] Properties to set + */ + function CreateWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkflowInvocationRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.parent = ""; + + /** + * CreateWorkflowInvocationRequest workflowInvocation. + * @member {google.cloud.dataform.v1beta1.IWorkflowInvocation|null|undefined} workflowInvocation + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.workflowInvocation = null; + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest instance + */ + CreateWorkflowInvocationRequest.create = function create(properties) { + return new CreateWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.workflowInvocation != null && Object.hasOwnProperty.call(message, "workflowInvocation")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.encode(message.workflowInvocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.verify(message.workflowInvocation); + if (error) + return "workflowInvocation." + error; + } + return null; + }; + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + */ + CreateWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workflowInvocation != null) { + if (typeof object.workflowInvocation !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.workflowInvocation: object expected"); + message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.fromObject(object.workflowInvocation); + } + return message; + }; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workflowInvocation = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) + object.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.toObject(message.workflowInvocation, options); + return object; + }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkflowInvocationRequest; + })(); + + v1beta1.DeleteWorkflowInvocationRequest = (function() { + + /** + * Properties of a DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteWorkflowInvocationRequest + * @property {string|null} [name] DeleteWorkflowInvocationRequest name + */ + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteWorkflowInvocationRequest. + * @implements IDeleteWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + */ + function DeleteWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @instance + */ + DeleteWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest instance + */ + DeleteWorkflowInvocationRequest.create = function create(properties) { + return new DeleteWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + */ + DeleteWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteWorkflowInvocationRequest; + })(); + + v1beta1.CancelWorkflowInvocationRequest = (function() { + + /** + * Properties of a CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICancelWorkflowInvocationRequest + * @property {string|null} [name] CancelWorkflowInvocationRequest name + */ + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CancelWorkflowInvocationRequest. + * @implements ICancelWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest=} [properties] Properties to set + */ + function CancelWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @instance + */ + CancelWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest instance + */ + CancelWorkflowInvocationRequest.create = function create(properties) { + return new CancelWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelWorkflowInvocationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + */ + CancelWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelWorkflowInvocationRequest; + })(); + + v1beta1.WorkflowInvocationAction = (function() { + + /** + * Properties of a WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkflowInvocationAction + * @property {google.cloud.dataform.v1beta1.ITarget|null} [target] WorkflowInvocationAction target + * @property {google.cloud.dataform.v1beta1.ITarget|null} [canonicalTarget] WorkflowInvocationAction canonicalTarget + * @property {google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|null} [state] WorkflowInvocationAction state + * @property {string|null} [failureReason] WorkflowInvocationAction failureReason + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocationAction invocationTiming + * @property {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null} [bigqueryAction] WorkflowInvocationAction bigqueryAction + */ + + /** + * Constructs a new WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WorkflowInvocationAction. + * @implements IWorkflowInvocationAction + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction=} [properties] Properties to set + */ + function WorkflowInvocationAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocationAction target. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.target = null; + + /** + * WorkflowInvocationAction canonicalTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.canonicalTarget = null; + + /** + * WorkflowInvocationAction state. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocationAction.State} state + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.state = 0; + + /** + * WorkflowInvocationAction failureReason. + * @member {string} failureReason + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.failureReason = ""; + + /** + * WorkflowInvocationAction invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.invocationTiming = null; + + /** + * WorkflowInvocationAction bigqueryAction. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null|undefined} bigqueryAction + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.bigqueryAction = null; + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction instance + */ + WorkflowInvocationAction.create = function create(properties) { + return new WorkflowInvocationAction(properties); + }; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.bigqueryAction != null && Object.hasOwnProperty.call(message, "bigqueryAction")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.encode(message.bigqueryAction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.failureReason); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 2: + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 7: + message.failureReason = reader.string(); + break; + case 5: + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + case 6: + message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocationAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocationAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify(message.bigqueryAction); + if (error) + return "bigqueryAction." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + */ + WorkflowInvocationAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.canonicalTarget); + } + switch (object.state) { + case "PENDING": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SKIPPED": + case 2: + message.state = 2; + break; + case "DISABLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "CANCELLED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + if (object.bigqueryAction != null) { + if (typeof object.bigqueryAction !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.bigqueryAction: object expected"); + message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.fromObject(object.bigqueryAction); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction} message WorkflowInvocationAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocationAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.state = options.enums === String ? "PENDING" : 0; + object.invocationTiming = null; + object.bigqueryAction = null; + object.failureReason = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1beta1.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.canonicalTarget, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) + object.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.toObject(message.bigqueryAction, options); + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + return object; + }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.WorkflowInvocationAction.State + * @enum {number} + * @property {number} PENDING=0 PENDING value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SKIPPED=2 SKIPPED value + * @property {number} DISABLED=3 DISABLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} CANCELLED=5 CANCELLED value + * @property {number} FAILED=6 FAILED value + */ + WorkflowInvocationAction.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PENDING"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SKIPPED"] = 2; + values[valuesById[3] = "DISABLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "CANCELLED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + WorkflowInvocationAction.BigQueryAction = (function() { + + /** + * Properties of a BigQueryAction. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @interface IBigQueryAction + * @property {string|null} [sqlScript] BigQueryAction sqlScript + */ + + /** + * Constructs a new BigQueryAction. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @classdesc Represents a BigQueryAction. + * @implements IBigQueryAction + * @constructor + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + */ + function BigQueryAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryAction sqlScript. + * @member {string} sqlScript + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @instance + */ + BigQueryAction.prototype.sqlScript = ""; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction instance + */ + BigQueryAction.create = function create(properties) { + return new BigQueryAction(properties); + }; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sqlScript = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + return null; + }; + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + */ + BigQueryAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction(); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + return message; + }; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} message BigQueryAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlScript = ""; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + object.sqlScript = message.sqlScript; + return object; + }; + + /** + * Converts this BigQueryAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @instance + * @returns {Object.} JSON object + */ + BigQueryAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryAction; + })(); + + return WorkflowInvocationAction; + })(); + + v1beta1.QueryWorkflowInvocationActionsRequest = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryWorkflowInvocationActionsRequest + * @property {string|null} [name] QueryWorkflowInvocationActionsRequest name + * @property {number|null} [pageSize] QueryWorkflowInvocationActionsRequest pageSize + * @property {string|null} [pageToken] QueryWorkflowInvocationActionsRequest pageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryWorkflowInvocationActionsRequest. + * @implements IQueryWorkflowInvocationActionsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.name = ""; + + /** + * QueryWorkflowInvocationActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageSize = 0; + + /** + * QueryWorkflowInvocationActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest instance + */ + QueryWorkflowInvocationActionsRequest.create = function create(properties) { + return new QueryWorkflowInvocationActionsRequest(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + */ + QueryWorkflowInvocationActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryWorkflowInvocationActionsRequest; + })(); + + v1beta1.QueryWorkflowInvocationActionsResponse = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryWorkflowInvocationActionsResponse + * @property {Array.|null} [workflowInvocationActions] QueryWorkflowInvocationActionsResponse workflowInvocationActions + * @property {string|null} [nextPageToken] QueryWorkflowInvocationActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryWorkflowInvocationActionsResponse. + * @implements IQueryWorkflowInvocationActionsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsResponse(properties) { + this.workflowInvocationActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsResponse workflowInvocationActions. + * @member {Array.} workflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.workflowInvocationActions = $util.emptyArray; + + /** + * QueryWorkflowInvocationActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse instance + */ + QueryWorkflowInvocationActionsResponse.create = function create(properties) { + return new QueryWorkflowInvocationActionsResponse(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocationActions != null && message.workflowInvocationActions.length) + for (var i = 0; i < message.workflowInvocationActions.length; ++i) + $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.encode(message.workflowInvocationActions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) + message.workflowInvocationActions = []; + message.workflowInvocationActions.push($root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocationActions != null && message.hasOwnProperty("workflowInvocationActions")) { + if (!Array.isArray(message.workflowInvocationActions)) + return "workflowInvocationActions: array expected"; + for (var i = 0; i < message.workflowInvocationActions.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify(message.workflowInvocationActions[i]); + if (error) + return "workflowInvocationActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + */ + QueryWorkflowInvocationActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse(); + if (object.workflowInvocationActions) { + if (!Array.isArray(object.workflowInvocationActions)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: array expected"); + message.workflowInvocationActions = []; + for (var i = 0; i < object.workflowInvocationActions.length; ++i) { + if (typeof object.workflowInvocationActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: object expected"); + message.workflowInvocationActions[i] = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.fromObject(object.workflowInvocationActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workflowInvocationActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocationActions && message.workflowInvocationActions.length) { + object.workflowInvocationActions = []; + for (var j = 0; j < message.workflowInvocationActions.length; ++j) + object.workflowInvocationActions[j] = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.toObject(message.workflowInvocationActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryWorkflowInvocationActionsResponse; + })(); + + return v1beta1; + })(); + return dataform; })(); diff --git a/protos/protos.json b/protos/protos.json index 56a1b96..d89a861 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -2312,6 +2312,2313 @@ } } } + }, + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Dataform.V1Beta1", + "go_package": "google.golang.org/genproto/googleapis/cloud/dataform/v1beta1;dataform", + "java_multiple_files": true, + "java_outer_classname": "DataformProto", + "java_package": "com.google.cloud.dataform.v1beta1", + "php_namespace": "Google\\Cloud\\Dataform\\V1beta1", + "ruby_package": "Google::Cloud::Dataform::V1beta1", + "(google.api.resource_definition).type": "secretmanager.googleapis.com/SecretVersion", + "(google.api.resource_definition).pattern": "projects/{project}/secrets/{secret}/versions/{version}" + }, + "nested": { + "Dataform": { + "options": { + "(google.api.default_host)": "dataform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "FetchRemoteBranches": { + "requestType": "FetchRemoteBranchesRequest", + "responseType": "FetchRemoteBranchesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + } + } + ] + }, + "ListWorkspaces": { + "requestType": "ListWorkspacesRequest", + "responseType": "ListWorkspacesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkspace": { + "requestType": "GetWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkspace": { + "requestType": "CreateWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.http).body": "workspace", + "(google.api.method_signature)": "parent,workspace,workspace_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "body": "workspace" + } + }, + { + "(google.api.method_signature)": "parent,workspace,workspace_id" + } + ] + }, + "DeleteWorkspace": { + "requestType": "DeleteWorkspaceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "InstallNpmPackages": { + "requestType": "InstallNpmPackagesRequest", + "responseType": "InstallNpmPackagesResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "body": "*" + } + } + ] + }, + "PullGitCommits": { + "requestType": "PullGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "body": "*" + } + } + ] + }, + "PushGitCommits": { + "requestType": "PushGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "body": "*" + } + } + ] + }, + "FetchFileGitStatuses": { + "requestType": "FetchFileGitStatusesRequest", + "responseType": "FetchFileGitStatusesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + } + } + ] + }, + "FetchGitAheadBehind": { + "requestType": "FetchGitAheadBehindRequest", + "responseType": "FetchGitAheadBehindResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + } + } + ] + }, + "CommitWorkspaceChanges": { + "requestType": "CommitWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "body": "*" + } + } + ] + }, + "ResetWorkspaceChanges": { + "requestType": "ResetWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "body": "*" + } + } + ] + }, + "FetchFileDiff": { + "requestType": "FetchFileDiffRequest", + "responseType": "FetchFileDiffResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + } + } + ] + }, + "QueryDirectoryContents": { + "requestType": "QueryDirectoryContentsRequest", + "responseType": "QueryDirectoryContentsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + } + } + ] + }, + "MakeDirectory": { + "requestType": "MakeDirectoryRequest", + "responseType": "MakeDirectoryResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "body": "*" + } + } + ] + }, + "RemoveDirectory": { + "requestType": "RemoveDirectoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "body": "*" + } + } + ] + }, + "MoveDirectory": { + "requestType": "MoveDirectoryRequest", + "responseType": "MoveDirectoryResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "body": "*" + } + } + ] + }, + "ReadFile": { + "requestType": "ReadFileRequest", + "responseType": "ReadFileResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + } + } + ] + }, + "RemoveFile": { + "requestType": "RemoveFileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "body": "*" + } + } + ] + }, + "MoveFile": { + "requestType": "MoveFileRequest", + "responseType": "MoveFileResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "body": "*" + } + } + ] + }, + "WriteFile": { + "requestType": "WriteFileRequest", + "responseType": "WriteFileResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "body": "*" + } + } + ] + }, + "ListCompilationResults": { + "requestType": "ListCompilationResultsRequest", + "responseType": "ListCompilationResultsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCompilationResult": { + "requestType": "GetCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCompilationResult": { + "requestType": "CreateCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.http).body": "compilation_result", + "(google.api.method_signature)": "parent,compilation_result" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "body": "compilation_result" + } + }, + { + "(google.api.method_signature)": "parent,compilation_result" + } + ] + }, + "QueryCompilationResultActions": { + "requestType": "QueryCompilationResultActionsRequest", + "responseType": "QueryCompilationResultActionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + } + } + ] + }, + "ListWorkflowInvocations": { + "requestType": "ListWorkflowInvocationsRequest", + "responseType": "ListWorkflowInvocationsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkflowInvocation": { + "requestType": "GetWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkflowInvocation": { + "requestType": "CreateWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.http).body": "workflow_invocation", + "(google.api.method_signature)": "parent,workflow_invocation" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "body": "workflow_invocation" + } + }, + { + "(google.api.method_signature)": "parent,workflow_invocation" + } + ] + }, + "DeleteWorkflowInvocation": { + "requestType": "DeleteWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelWorkflowInvocation": { + "requestType": "CancelWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "body": "*" + } + } + ] + }, + "QueryWorkflowInvocationActions": { + "requestType": "QueryWorkflowInvocationActionsRequest", + "responseType": "QueryWorkflowInvocationActionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + } + } + ] + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitRemoteSettings": { + "type": "GitRemoteSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GitRemoteSettings": { + "fields": { + "url": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authenticationTokenSecretVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "tokenStatus": { + "type": "TokenStatus", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TokenStatus": { + "values": { + "TOKEN_STATUS_UNSPECIFIED": 0, + "NOT_FOUND": 1, + "INVALID": 2, + "VALID": 3 + } + } + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repositoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "FetchRemoteBranchesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "FetchRemoteBranchesResponse": { + "fields": { + "branches": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Workspace": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Workspace", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListWorkspacesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkspacesResponse": { + "fields": { + "workspaces": { + "rule": "repeated", + "type": "Workspace", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CreateWorkspaceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workspace": { + "type": "Workspace", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "workspaceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CommitAuthor": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "emailAddress": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PullGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "author": { + "type": "CommitAuthor", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PushGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileGitStatusesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "FetchFileGitStatusesResponse": { + "fields": { + "uncommittedFileChanges": { + "rule": "repeated", + "type": "UncommittedFileChange", + "id": 1 + } + }, + "nested": { + "UncommittedFileChange": { + "fields": { + "path": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ADDED": 1, + "DELETED": 2, + "MODIFIED": 3, + "HAS_CONFLICTS": 4 + } + } + } + } + } + }, + "FetchGitAheadBehindRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchGitAheadBehindResponse": { + "fields": { + "commitsAhead": { + "type": "int32", + "id": 1 + }, + "commitsBehind": { + "type": "int32", + "id": 2 + } + } + }, + "CommitWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "author": { + "type": "CommitAuthor", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "commitMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResetWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clean": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileDiffRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchFileDiffResponse": { + "fields": { + "formattedDiff": { + "type": "string", + "id": 1 + } + } + }, + "QueryDirectoryContentsRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryDirectoryContentsResponse": { + "fields": { + "directoryEntries": { + "rule": "repeated", + "type": "DirectoryEntry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + }, + "nested": { + "DirectoryEntry": { + "oneofs": { + "entry": { + "oneof": [ + "file", + "directory" + ] + } + }, + "fields": { + "file": { + "type": "string", + "id": 1 + }, + "directory": { + "type": "string", + "id": 2 + } + } + } + } + }, + "MakeDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MakeDirectoryResponse": { + "fields": {} + }, + "RemoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryResponse": { + "fields": {} + }, + "ReadFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReadFileResponse": { + "fields": { + "fileContents": { + "type": "bytes", + "id": 1 + } + } + }, + "RemoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileResponse": { + "fields": {} + }, + "WriteFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "contents": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WriteFileResponse": { + "fields": {} + }, + "InstallNpmPackagesRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "InstallNpmPackagesResponse": { + "fields": {} + }, + "CompilationResult": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/CompilationResult", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }, + "oneofs": { + "source": { + "oneof": [ + "gitCommitish", + "workspace" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitCommitish": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "workspace": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "codeCompilationConfig": { + "type": "CodeCompilationConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataformCoreVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationErrors": { + "rule": "repeated", + "type": "CompilationError", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CodeCompilationConfig": { + "fields": { + "defaultDatabase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultSchema": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultLocation": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assertionSchema": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "vars": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseSuffix": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaSuffix": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tablePrefix": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CompilationError": { + "fields": { + "message": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stack": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actionTarget": { + "type": "Target", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "ListCompilationResultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCompilationResultsResponse": { + "fields": { + "compilationResults": { + "rule": "repeated", + "type": "CompilationResult", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetCompilationResultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + } + } + }, + "CreateCompilationResultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "compilationResult": { + "type": "CompilationResult", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Target": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "schema": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "RelationDescriptor": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "ColumnDescriptor", + "id": 2 + }, + "bigqueryLabels": { + "keyType": "string", + "type": "string", + "id": 3 + } + }, + "nested": { + "ColumnDescriptor": { + "fields": { + "path": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "bigqueryPolicyTags": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, + "CompilationResultAction": { + "oneofs": { + "compiledObject": { + "oneof": [ + "relation", + "operations", + "assertion", + "declaration" + ] + } + }, + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "canonicalTarget": { + "type": "Target", + "id": 2 + }, + "filePath": { + "type": "string", + "id": 3 + }, + "relation": { + "type": "Relation", + "id": 4 + }, + "operations": { + "type": "Operations", + "id": 5 + }, + "assertion": { + "type": "Assertion", + "id": 6 + }, + "declaration": { + "type": "Declaration", + "id": 7 + } + }, + "nested": { + "Relation": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 4 + }, + "relationType": { + "type": "RelationType", + "id": 5 + }, + "selectQuery": { + "type": "string", + "id": 6 + }, + "preOperations": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "postOperations": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "incrementalTableConfig": { + "type": "IncrementalTableConfig", + "id": 9 + }, + "partitionExpression": { + "type": "string", + "id": 10 + }, + "clusterExpressions": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "partitionExpirationDays": { + "type": "int32", + "id": 12 + }, + "requirePartitionFilter": { + "type": "bool", + "id": 13 + }, + "additionalOptions": { + "keyType": "string", + "type": "string", + "id": 14 + } + }, + "nested": { + "RelationType": { + "values": { + "RELATION_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "VIEW": 2, + "INCREMENTAL_TABLE": 3, + "MATERIALIZED_VIEW": 4 + } + }, + "IncrementalTableConfig": { + "fields": { + "incrementalSelectQuery": { + "type": "string", + "id": 1 + }, + "refreshDisabled": { + "type": "bool", + "id": 2 + }, + "uniqueKeyParts": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "updatePartitionFilter": { + "type": "string", + "id": 4 + }, + "incrementalPreOperations": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "incrementalPostOperations": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "Operations": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + }, + "queries": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "hasOutput": { + "type": "bool", + "id": 5 + } + } + }, + "Assertion": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "parentAction": { + "type": "Target", + "id": 5 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "selectQuery": { + "type": "string", + "id": 4 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + } + } + }, + "Declaration": { + "fields": { + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 1 + } + } + } + } + }, + "QueryCompilationResultActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryCompilationResultActionsResponse": { + "fields": { + "compilationResultActions": { + "rule": "repeated", + "type": "CompilationResultAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "WorkflowInvocation": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/WorkflowInvocation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationResult": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "invocationConfig": { + "type": "InvocationConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InvocationConfig": { + "fields": { + "includedTargets": { + "rule": "repeated", + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "includedTags": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependenciesIncluded": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependentsIncluded": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "fullyRefreshIncrementalTablesEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "CANCELLED": 3, + "FAILED": 4, + "CANCELING": 5 + } + } + } + }, + "ListWorkflowInvocationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkflowInvocationsResponse": { + "fields": { + "workflowInvocations": { + "rule": "repeated", + "type": "WorkflowInvocation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CreateWorkflowInvocationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workflowInvocation": { + "type": "WorkflowInvocation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CancelWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "WorkflowInvocationAction": { + "fields": { + "target": { + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "canonicalTarget": { + "type": "Target", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureReason": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigqueryAction": { + "type": "BigQueryAction", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "PENDING": 0, + "RUNNING": 1, + "SKIPPED": 2, + "DISABLED": 3, + "SUCCEEDED": 4, + "CANCELLED": 5, + "FAILED": 6 + } + }, + "BigQueryAction": { + "fields": { + "sqlScript": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "QueryWorkflowInvocationActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryWorkflowInvocationActionsResponse": { + "fields": { + "workflowInvocationActions": { + "rule": "repeated", + "type": "WorkflowInvocationAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + } + } } } } diff --git a/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js b/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js new file mode 100644 index 0000000..24d1ecc --- /dev/null +++ b/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCancelWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.cancelWorkflowInvocation(request); + console.log(response); + } + + callCancelWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.commit_workspace_changes.js b/samples/generated/v1beta1/dataform.commit_workspace_changes.js new file mode 100644 index 0000000..09bfef8 --- /dev/null +++ b/samples/generated/v1beta1/dataform.commit_workspace_changes.js @@ -0,0 +1,72 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Required. The commit's author. + */ + // const author = {} + /** + * Optional. The commit's message. + */ + // const commitMessage = 'abc123' + /** + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + */ + // const paths = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCommitWorkspaceChanges() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.commitWorkspaceChanges(request); + console.log(response); + } + + callCommitWorkspaceChanges(); + // [END dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.create_compilation_result.js b/samples/generated/v1beta1/dataform.create_compilation_result.js new file mode 100644 index 0000000..98e7d25 --- /dev/null +++ b/samples/generated/v1beta1/dataform.create_compilation_result.js @@ -0,0 +1,64 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, compilationResult) { + // [START dataform_v1beta1_generated_Dataform_CreateCompilationResult_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The compilation result to create. + */ + // const compilationResult = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateCompilationResult() { + // Construct request + const request = { + parent, + compilationResult, + }; + + // Run request + const response = await dataformClient.createCompilationResult(request); + console.log(response); + } + + callCreateCompilationResult(); + // [END dataform_v1beta1_generated_Dataform_CreateCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.create_repository.js b/samples/generated/v1beta1/dataform.create_repository.js new file mode 100644 index 0000000..e1ef1fd --- /dev/null +++ b/samples/generated/v1beta1/dataform.create_repository.js @@ -0,0 +1,70 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, repository, repositoryId) { + // [START dataform_v1beta1_generated_Dataform_CreateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The repository to create. + */ + // const repository = {} + /** + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + */ + // const repositoryId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + repository, + repositoryId, + }; + + // Run request + const response = await dataformClient.createRepository(request); + console.log(response); + } + + callCreateRepository(); + // [END dataform_v1beta1_generated_Dataform_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.create_workflow_invocation.js b/samples/generated/v1beta1/dataform.create_workflow_invocation.js new file mode 100644 index 0000000..179dfbb --- /dev/null +++ b/samples/generated/v1beta1/dataform.create_workflow_invocation.js @@ -0,0 +1,64 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workflowInvocation) { + // [START dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workflow invocation. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workflow invocation resource to create. + */ + // const workflowInvocation = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkflowInvocation() { + // Construct request + const request = { + parent, + workflowInvocation, + }; + + // Run request + const response = await dataformClient.createWorkflowInvocation(request); + console.log(response); + } + + callCreateWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.create_workspace.js b/samples/generated/v1beta1/dataform.create_workspace.js new file mode 100644 index 0000000..a99a33a --- /dev/null +++ b/samples/generated/v1beta1/dataform.create_workspace.js @@ -0,0 +1,70 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workspace, workspaceId) { + // [START dataform_v1beta1_generated_Dataform_CreateWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workspace to create. + */ + // const workspace = {} + /** + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + */ + // const workspaceId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkspace() { + // Construct request + const request = { + parent, + workspace, + workspaceId, + }; + + // Run request + const response = await dataformClient.createWorkspace(request); + console.log(response); + } + + callCreateWorkspace(); + // [END dataform_v1beta1_generated_Dataform_CreateWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.delete_repository.js b/samples/generated/v1beta1/dataform.delete_repository.js new file mode 100644 index 0000000..172f3a1 --- /dev/null +++ b/samples/generated/v1beta1/dataform.delete_repository.js @@ -0,0 +1,64 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + /** + * 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.) + */ + // const force = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteRepository(request); + console.log(response); + } + + callDeleteRepository(); + // [END dataform_v1beta1_generated_Dataform_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.delete_workflow_invocation.js b/samples/generated/v1beta1/dataform.delete_workflow_invocation.js new file mode 100644 index 0000000..697d2e3 --- /dev/null +++ b/samples/generated/v1beta1/dataform.delete_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkflowInvocation(request); + console.log(response); + } + + callDeleteWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.delete_workspace.js b/samples/generated/v1beta1/dataform.delete_workspace.js new file mode 100644 index 0000000..c6e8ae2 --- /dev/null +++ b/samples/generated/v1beta1/dataform.delete_workspace.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkspace(request); + console.log(response); + } + + callDeleteWorkspace(); + // [END dataform_v1beta1_generated_Dataform_DeleteWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.fetch_file_diff.js b/samples/generated/v1beta1/dataform.fetch_file_diff.js new file mode 100644 index 0000000..362137f --- /dev/null +++ b/samples/generated/v1beta1/dataform.fetch_file_diff.js @@ -0,0 +1,63 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_FetchFileDiff_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileDiff() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.fetchFileDiff(request); + console.log(response); + } + + callFetchFileDiff(); + // [END dataform_v1beta1_generated_Dataform_FetchFileDiff_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js b/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js new file mode 100644 index 0000000..53302d6 --- /dev/null +++ b/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileGitStatuses() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchFileGitStatuses(request); + console.log(response); + } + + callFetchFileGitStatuses(); + // [END dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js b/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js new file mode 100644 index 0000000..e8b3db2 --- /dev/null +++ b/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js @@ -0,0 +1,64 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchGitAheadBehind() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchGitAheadBehind(request); + console.log(response); + } + + callFetchGitAheadBehind(); + // [END dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.fetch_remote_branches.js b/samples/generated/v1beta1/dataform.fetch_remote_branches.js new file mode 100644 index 0000000..1c998ab --- /dev/null +++ b/samples/generated/v1beta1/dataform.fetch_remote_branches.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchRemoteBranches() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchRemoteBranches(request); + console.log(response); + } + + callFetchRemoteBranches(); + // [END dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.get_compilation_result.js b/samples/generated/v1beta1/dataform.get_compilation_result.js new file mode 100644 index 0000000..19ed3d1 --- /dev/null +++ b/samples/generated/v1beta1/dataform.get_compilation_result.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetCompilationResult_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetCompilationResult() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getCompilationResult(request); + console.log(response); + } + + callGetCompilationResult(); + // [END dataform_v1beta1_generated_Dataform_GetCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.get_repository.js b/samples/generated/v1beta1/dataform.get_repository.js new file mode 100644 index 0000000..2533229 --- /dev/null +++ b/samples/generated/v1beta1/dataform.get_repository.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END dataform_v1beta1_generated_Dataform_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.get_workflow_invocation.js b/samples/generated/v1beta1/dataform.get_workflow_invocation.js new file mode 100644 index 0000000..3fa01e1 --- /dev/null +++ b/samples/generated/v1beta1/dataform.get_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkflowInvocation(request); + console.log(response); + } + + callGetWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.get_workspace.js b/samples/generated/v1beta1/dataform.get_workspace.js new file mode 100644 index 0000000..a49c652 --- /dev/null +++ b/samples/generated/v1beta1/dataform.get_workspace.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkspace(request); + console.log(response); + } + + callGetWorkspace(); + // [END dataform_v1beta1_generated_Dataform_GetWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.install_npm_packages.js b/samples/generated/v1beta1/dataform.install_npm_packages.js new file mode 100644 index 0000000..0d06ee6 --- /dev/null +++ b/samples/generated/v1beta1/dataform.install_npm_packages.js @@ -0,0 +1,58 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1beta1_generated_Dataform_InstallNpmPackages_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callInstallNpmPackages() { + // Construct request + const request = { + workspace, + }; + + // Run request + const response = await dataformClient.installNpmPackages(request); + console.log(response); + } + + callInstallNpmPackages(); + // [END dataform_v1beta1_generated_Dataform_InstallNpmPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.list_compilation_results.js b/samples/generated/v1beta1/dataform.list_compilation_results.js new file mode 100644 index 0000000..1ae1ad4 --- /dev/null +++ b/samples/generated/v1beta1/dataform.list_compilation_results.js @@ -0,0 +1,74 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListCompilationResults_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListCompilationResults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listCompilationResultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCompilationResults(); + // [END dataform_v1beta1_generated_Dataform_ListCompilationResults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.list_repositories.js b/samples/generated/v1beta1/dataform.list_repositories.js new file mode 100644 index 0000000..787e921 --- /dev/null +++ b/samples/generated/v1beta1/dataform.list_repositories.js @@ -0,0 +1,84 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListRepositories_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END dataform_v1beta1_generated_Dataform_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.list_workflow_invocations.js b/samples/generated/v1beta1/dataform.list_workflow_invocations.js new file mode 100644 index 0000000..2d599f0 --- /dev/null +++ b/samples/generated/v1beta1/dataform.list_workflow_invocations.js @@ -0,0 +1,74 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkflowInvocations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkflowInvocationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkflowInvocations(); + // [END dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.list_workspaces.js b/samples/generated/v1beta1/dataform.list_workspaces.js new file mode 100644 index 0000000..708c9d0 --- /dev/null +++ b/samples/generated/v1beta1/dataform.list_workspaces.js @@ -0,0 +1,84 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListWorkspaces_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkspaces() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkspacesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkspaces(); + // [END dataform_v1beta1_generated_Dataform_ListWorkspaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.make_directory.js b/samples/generated/v1beta1/dataform.make_directory.js new file mode 100644 index 0000000..fe239f6 --- /dev/null +++ b/samples/generated/v1beta1/dataform.make_directory.js @@ -0,0 +1,64 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_MakeDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMakeDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.makeDirectory(request); + console.log(response); + } + + callMakeDirectory(); + // [END dataform_v1beta1_generated_Dataform_MakeDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.move_directory.js b/samples/generated/v1beta1/dataform.move_directory.js new file mode 100644 index 0000000..2d43a94 --- /dev/null +++ b/samples/generated/v1beta1/dataform.move_directory.js @@ -0,0 +1,70 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1beta1_generated_Dataform_MoveDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + /** + * Required. The new path for the directory including directory name, rooted at + * workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveDirectory() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveDirectory(request); + console.log(response); + } + + callMoveDirectory(); + // [END dataform_v1beta1_generated_Dataform_MoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.move_file.js b/samples/generated/v1beta1/dataform.move_file.js new file mode 100644 index 0000000..64efc20 --- /dev/null +++ b/samples/generated/v1beta1/dataform.move_file.js @@ -0,0 +1,68 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1beta1_generated_Dataform_MoveFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + /** + * Required. The file's new path including filename, relative to the workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveFile() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveFile(request); + console.log(response); + } + + callMoveFile(); + // [END dataform_v1beta1_generated_Dataform_MoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.pull_git_commits.js b/samples/generated/v1beta1/dataform.pull_git_commits.js new file mode 100644 index 0000000..d3590eb --- /dev/null +++ b/samples/generated/v1beta1/dataform.pull_git_commits.js @@ -0,0 +1,69 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1beta1_generated_Dataform_PullGitCommits_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + /** + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + */ + // const author = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPullGitCommits() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.pullGitCommits(request); + console.log(response); + } + + callPullGitCommits(); + // [END dataform_v1beta1_generated_Dataform_PullGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.push_git_commits.js b/samples/generated/v1beta1/dataform.push_git_commits.js new file mode 100644 index 0000000..a905849 --- /dev/null +++ b/samples/generated/v1beta1/dataform.push_git_commits.js @@ -0,0 +1,63 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_PushGitCommits_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPushGitCommits() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.pushGitCommits(request); + console.log(response); + } + + callPushGitCommits(); + // [END dataform_v1beta1_generated_Dataform_PushGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.query_compilation_result_actions.js b/samples/generated/v1beta1/dataform.query_compilation_result_actions.js new file mode 100644 index 0000000..9d59881 --- /dev/null +++ b/samples/generated/v1beta1/dataform.query_compilation_result_actions.js @@ -0,0 +1,79 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryCompilationResultActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryCompilationResultActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryCompilationResultActions(); + // [END dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.query_directory_contents.js b/samples/generated/v1beta1/dataform.query_directory_contents.js new file mode 100644 index 0000000..a086f74 --- /dev/null +++ b/samples/generated/v1beta1/dataform.query_directory_contents.js @@ -0,0 +1,79 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + */ + // const path = 'abc123' + /** + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryDirectoryContents() { + // Construct request + const request = { + workspace, + }; + + // Run request + const iterable = await dataformClient.queryDirectoryContentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryDirectoryContents(); + // [END dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js b/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js new file mode 100644 index 0000000..7a276ef --- /dev/null +++ b/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js @@ -0,0 +1,74 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryWorkflowInvocationActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryWorkflowInvocationActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryWorkflowInvocationActions(); + // [END dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.read_file.js b/samples/generated/v1beta1/dataform.read_file.js new file mode 100644 index 0000000..2893ceb --- /dev/null +++ b/samples/generated/v1beta1/dataform.read_file.js @@ -0,0 +1,63 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_ReadFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callReadFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.readFile(request); + console.log(response); + } + + callReadFile(); + // [END dataform_v1beta1_generated_Dataform_ReadFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.remove_directory.js b/samples/generated/v1beta1/dataform.remove_directory.js new file mode 100644 index 0000000..9f94153 --- /dev/null +++ b/samples/generated/v1beta1/dataform.remove_directory.js @@ -0,0 +1,64 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_RemoveDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeDirectory(request); + console.log(response); + } + + callRemoveDirectory(); + // [END dataform_v1beta1_generated_Dataform_RemoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.remove_file.js b/samples/generated/v1beta1/dataform.remove_file.js new file mode 100644 index 0000000..e7ef6a1 --- /dev/null +++ b/samples/generated/v1beta1/dataform.remove_file.js @@ -0,0 +1,63 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_RemoveFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeFile(request); + console.log(response); + } + + callRemoveFile(); + // [END dataform_v1beta1_generated_Dataform_RemoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.reset_workspace_changes.js b/samples/generated/v1beta1/dataform.reset_workspace_changes.js new file mode 100644 index 0000000..b3c26c2 --- /dev/null +++ b/samples/generated/v1beta1/dataform.reset_workspace_changes.js @@ -0,0 +1,67 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + */ + // const paths = 'abc123' + /** + * Optional. If set to true, untracked files will be deleted. + */ + // const clean = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callResetWorkspaceChanges() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.resetWorkspaceChanges(request); + console.log(response); + } + + callResetWorkspaceChanges(); + // [END dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.update_repository.js b/samples/generated/v1beta1/dataform.update_repository.js new file mode 100644 index 0000000..d8975ad --- /dev/null +++ b/samples/generated/v1beta1/dataform.update_repository.js @@ -0,0 +1,63 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(repository) { + // [START dataform_v1beta1_generated_Dataform_UpdateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + */ + // const updateMask = {} + /** + * Required. The repository to update. + */ + // const repository = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + repository, + }; + + // Run request + const response = await dataformClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END dataform_v1beta1_generated_Dataform_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/dataform.write_file.js b/samples/generated/v1beta1/dataform.write_file.js new file mode 100644 index 0000000..9d60584 --- /dev/null +++ b/samples/generated/v1beta1/dataform.write_file.js @@ -0,0 +1,68 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, contents) { + // [START dataform_v1beta1_generated_Dataform_WriteFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file. + */ + // const path = 'abc123' + /** + * Required. The file's contents. + */ + // const contents = 'Buffer.from('string')' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callWriteFile() { + // Construct request + const request = { + workspace, + path, + contents, + }; + + // Run request + const response = await dataformClient.writeFile(request); + console.log(response); + } + + callWriteFile(); + // [END dataform_v1beta1_generated_Dataform_WriteFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json new file mode 100644 index 0000000..036ac39 --- /dev/null +++ b/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -0,0 +1,1647 @@ +{ + "clientLibrary": { + "name": "nodejs-dataform", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataform.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListRepositories_async", + "title": "Dataform listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists Repositories in a given project and location.", + "canonical": true, + "file": "dataform.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListRepositories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListRepositoriesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListRepositories", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetRepository_async", + "title": "Dataform getRepository Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Repository.", + "canonical": true, + "file": "dataform.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateRepository_async", + "title": "Dataform createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Repository in a given project and location.", + "canonical": true, + "file": "dataform.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1beta1.Repository" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_UpdateRepository_async", + "title": "Dataform updateRepository Sample", + "origin": "API_DEFINITION", + "description": " Updates a single Repository.", + "canonical": true, + "file": "dataform.update_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1beta1.Repository" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.UpdateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteRepository_async", + "title": "Dataform deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Repository.", + "canonical": true, + "file": "dataform.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async", + "title": "Dataform fetchRemoteBranches Sample", + "origin": "API_DEFINITION", + "description": " Fetches a Repository's remote branches.", + "canonical": true, + "file": "dataform.fetch_remote_branches.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranches", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranches", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListWorkspaces_async", + "title": "Dataform listWorkspaces Sample", + "origin": "API_DEFINITION", + "description": " Lists Workspaces in a given Repository.", + "canonical": true, + "file": "dataform.list_workspaces.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkspaces", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListWorkspacesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkspaces", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetWorkspace_async", + "title": "Dataform getWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Workspace.", + "canonical": true, + "file": "dataform.get_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateWorkspace_async", + "title": "Dataform createWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Workspace in a given Repository.", + "canonical": true, + "file": "dataform.create_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkspace", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workspace", + "type": ".google.cloud.dataform.v1beta1.Workspace" + }, + { + "name": "workspace_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteWorkspace_async", + "title": "Dataform deleteWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Workspace.", + "canonical": true, + "file": "dataform.delete_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_InstallNpmPackages_async", + "title": "Dataform installNpmPackages Sample", + "origin": "API_DEFINITION", + "description": " Installs dependency NPM packages (inside a Workspace).", + "canonical": true, + "file": "dataform.install_npm_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1beta1.Dataform.InstallNpmPackages", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.InstallNpmPackagesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1beta1.Dataform.InstallNpmPackages", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_PullGitCommits_async", + "title": "Dataform pullGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pulls Git commits from the Repository's remote into a Workspace.", + "canonical": true, + "file": "dataform.pull_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PullGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1beta1.CommitAuthor" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PullGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_PushGitCommits_async", + "title": "Dataform pushGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pushes Git commits from a Workspace to the Repository's remote.", + "canonical": true, + "file": "dataform.push_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PushGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PushGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async", + "title": "Dataform fetchFileGitStatuses Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git statuses for the files in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_git_statuses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatuses", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatuses", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async", + "title": "Dataform fetchGitAheadBehind Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git ahead/behind against a remote branch.", + "canonical": true, + "file": "dataform.fetch_git_ahead_behind.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehind", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehind", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async", + "title": "Dataform commitWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Applies a Git commit for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.commit_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1beta1.CommitAuthor" + }, + { + "name": "commit_message", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async", + "title": "Dataform resetWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Performs a Git reset for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.reset_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + }, + { + "name": "clean", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchFileDiff_async", + "title": "Dataform fetchFileDiff Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git diff for an uncommitted file in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_diff.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileDiff", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchFileDiffResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileDiff", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async", + "title": "Dataform queryDirectoryContents Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a given Workspace directory.", + "canonical": true, + "file": "dataform.query_directory_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContents", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContents", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MakeDirectory_async", + "title": "Dataform makeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Creates a directory inside a Workspace.", + "canonical": true, + "file": "dataform.make_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MakeDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MakeDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MakeDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_RemoveDirectory_async", + "title": "Dataform removeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Deletes a directory (inside a Workspace) and all of its contents.", + "canonical": true, + "file": "dataform.remove_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MoveDirectory_async", + "title": "Dataform moveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Moves a directory (inside a Workspace), and all of its contents, to a new location.", + "canonical": true, + "file": "dataform.move_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MoveDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ReadFile_async", + "title": "Dataform readFile Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a file (inside a Workspace).", + "canonical": true, + "file": "dataform.read_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ReadFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ReadFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ReadFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_RemoveFile_async", + "title": "Dataform removeFile Sample", + "origin": "API_DEFINITION", + "description": " Deletes a file (inside a Workspace).", + "canonical": true, + "file": "dataform.remove_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MoveFile_async", + "title": "Dataform moveFile Sample", + "origin": "API_DEFINITION", + "description": " Moves a file (inside a Workspace) to a new location.", + "canonical": true, + "file": "dataform.move_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MoveFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_WriteFile_async", + "title": "Dataform writeFile Sample", + "origin": "API_DEFINITION", + "description": " Writes to a file (inside a Workspace).", + "canonical": true, + "file": "dataform.write_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.WriteFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "contents", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WriteFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.WriteFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListCompilationResults_async", + "title": "Dataform listCompilationResults Sample", + "origin": "API_DEFINITION", + "description": " Lists CompilationResults in a given Repository.", + "canonical": true, + "file": "dataform.list_compilation_results.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListCompilationResults", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListCompilationResultsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListCompilationResults", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetCompilationResult_async", + "title": "Dataform getCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single CompilationResult.", + "canonical": true, + "file": "dataform.get_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetCompilationResult", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateCompilationResult_async", + "title": "Dataform createCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Creates a new CompilationResult in a given project and location.", + "canonical": true, + "file": "dataform.create_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateCompilationResult", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "compilation_result", + "type": ".google.cloud.dataform.v1beta1.CompilationResult" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async", + "title": "Dataform queryCompilationResultActions Sample", + "origin": "API_DEFINITION", + "description": " Returns CompilationResultActions in a given CompilationResult.", + "canonical": true, + "file": "dataform.query_compilation_result_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async", + "title": "Dataform listWorkflowInvocations Sample", + "origin": "API_DEFINITION", + "description": " Lists WorkflowInvocations in a given Repository.", + "canonical": true, + "file": "dataform.list_workflow_invocations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocations", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async", + "title": "Dataform getWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.get_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async", + "title": "Dataform createWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new WorkflowInvocation in a given Repository.", + "canonical": true, + "file": "dataform.create_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workflow_invocation", + "type": ".google.cloud.dataform.v1beta1.WorkflowInvocation" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async", + "title": "Dataform deleteWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.delete_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async", + "title": "Dataform cancelWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Requests cancellation of a running WorkflowInvocation.", + "canonical": true, + "file": "dataform.cancel_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async", + "title": "Dataform queryWorkflowInvocationActions Sample", + "origin": "API_DEFINITION", + "description": " Returns WorkflowInvocationActions in a given WorkflowInvocation.", + "canonical": true, + "file": "dataform.query_workflow_invocation_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + } + ] +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index da34226..5a59890 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,11 +17,12 @@ // ** All changes to this file may be overwritten. ** import * as v1alpha2 from './v1alpha2'; +import * as v1beta1 from './v1beta1'; const DataformClient = v1alpha2.DataformClient; type DataformClient = v1alpha2.DataformClient; -export {v1alpha2, DataformClient}; -export default {v1alpha2, DataformClient}; +export {v1alpha2, v1beta1, DataformClient}; +export default {v1alpha2, v1beta1, DataformClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/src/v1beta1/dataform_client.ts b/src/v1beta1/dataform_client.ts new file mode 100644 index 0000000..318b582 --- /dev/null +++ b/src/v1beta1/dataform_client.ts @@ -0,0 +1,5293 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/dataform_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataform_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Dataform is a service to develop, create, document, test, and update curated + * tables in BigQuery. + * @class + * @memberof v1beta1 + */ +export class DataformClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataformStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataformClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataformClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new IamClient(this._gaxGrpc, opts); + + this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + compilationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + repositoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}' + ), + workflowInvocationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}' + ), + workspacePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listRepositories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'repositories' + ), + listWorkspaces: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workspaces' + ), + queryDirectoryContents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'directoryEntries' + ), + listCompilationResults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResults' + ), + queryCompilationResultActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResultActions' + ), + listWorkflowInvocations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocations' + ), + queryWorkflowInvocationActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocationActions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataform.v1beta1.Dataform', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataformStub) { + return this.dataformStub; + } + + // Put together the "service stub" for + // google.cloud.dataform.v1beta1.Dataform. + this.dataformStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataform.v1beta1.Dataform' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataform.v1beta1.Dataform, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataformStubMethods = [ + 'listRepositories', + 'getRepository', + 'createRepository', + 'updateRepository', + 'deleteRepository', + 'fetchRemoteBranches', + 'listWorkspaces', + 'getWorkspace', + 'createWorkspace', + 'deleteWorkspace', + 'installNpmPackages', + 'pullGitCommits', + 'pushGitCommits', + 'fetchFileGitStatuses', + 'fetchGitAheadBehind', + 'commitWorkspaceChanges', + 'resetWorkspaceChanges', + 'fetchFileDiff', + 'queryDirectoryContents', + 'makeDirectory', + 'removeDirectory', + 'moveDirectory', + 'readFile', + 'removeFile', + 'moveFile', + 'writeFile', + 'listCompilationResults', + 'getCompilationResult', + 'createCompilationResult', + 'queryCompilationResultActions', + 'listWorkflowInvocations', + 'getWorkflowInvocation', + 'createWorkflowInvocation', + 'deleteWorkflowInvocation', + 'cancelWorkflowInvocation', + 'queryWorkflowInvocationActions', + ]; + for (const methodName of dataformStubMethods) { + const callPromise = this.dataformStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataformStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataform.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Fetches a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_GetRepository_async + */ + getRepository( + request?: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest | undefined, + {} | undefined + ] + >; + getRepository( + request: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request?: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getRepository(request, options, callback); + } + /** + * Creates a new Repository in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + * @param {google.cloud.dataform.v1beta1.Repository} request.repository + * Required. The repository to create. + * @param {string} request.repositoryId + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateRepository_async + */ + createRepository( + request?: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest | undefined, + {} | undefined + ] + >; + createRepository( + request: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request?: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createRepository(request, options, callback); + } + /** + * Updates a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + * @param {google.cloud.dataform.v1beta1.Repository} request.repository + * Required. The repository to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.update_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_UpdateRepository_async + */ + updateRepository( + request?: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest | undefined, + {} | undefined + ] + >; + updateRepository( + request: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request?: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'repository.name': request.repository!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateRepository(request, options, callback); + } + /** + * Deletes a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {boolean} request.force + * 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.) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest | undefined, + {} | undefined + ] + >; + deleteRepository( + request: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request?: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteRepository(request, options, callback); + } + /** + * Fetches a Repository's remote branches. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [FetchRemoteBranchesResponse]{@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_remote_branches.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async + */ + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + >; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchRemoteBranches(request, options, callback); + } + /** + * Fetches a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_GetWorkspace_async + */ + getWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest | undefined, + {} | undefined + ] + >; + getWorkspace( + request: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getWorkspace(request, options, callback); + } + /** + * Creates a new Workspace in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.Workspace} request.workspace + * Required. The workspace to create. + * @param {string} request.workspaceId + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateWorkspace_async + */ + createWorkspace( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + >; + createWorkspace( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createWorkspace(request, options, callback); + } + /** + * Deletes a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteWorkspace_async + */ + deleteWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + >; + deleteWorkspace( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkspace(request, options, callback); + } + /** + * Installs dependency NPM packages (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [InstallNpmPackagesResponse]{@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.install_npm_packages.js + * region_tag:dataform_v1beta1_generated_Dataform_InstallNpmPackages_async + */ + installNpmPackages( + request?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + >; + installNpmPackages( + request: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.installNpmPackages(request, options, callback); + } + /** + * Pulls Git commits from the Repository's remote into a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + * @param {google.cloud.dataform.v1beta1.CommitAuthor} request.author + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.pull_git_commits.js + * region_tag:dataform_v1beta1_generated_Dataform_PullGitCommits_async + */ + pullGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest | undefined, + {} | undefined + ] + >; + pullGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.pullGitCommits(request, options, callback); + } + /** + * Pushes Git commits from a Workspace to the Repository's remote. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.push_git_commits.js + * region_tag:dataform_v1beta1_generated_Dataform_PushGitCommits_async + */ + pushGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest | undefined, + {} | undefined + ] + >; + pushGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.pushGitCommits(request, options, callback); + } + /** + * Fetches Git statuses for the files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [FetchFileGitStatusesResponse]{@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_file_git_statuses.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async + */ + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + >; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileGitStatuses(request, options, callback); + } + /** + * Fetches Git ahead/behind against a remote branch. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [FetchGitAheadBehindResponse]{@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async + */ + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + >; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchGitAheadBehind(request, options, callback); + } + /** + * Applies a Git commit for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {google.cloud.dataform.v1beta1.CommitAuthor} request.author + * Required. The commit's author. + * @param {string} [request.commitMessage] + * Optional. The commit's message. + * @param {string[]} [request.paths] + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.commit_workspace_changes.js + * region_tag:dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async + */ + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.commitWorkspaceChanges( + request, + options, + callback + ); + } + /** + * Performs a Git reset for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string[]} [request.paths] + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + * @param {boolean} [request.clean] + * Optional. If set to true, untracked files will be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.reset_workspace_changes.js + * region_tag:dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async + */ + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.resetWorkspaceChanges(request, options, callback); + } + /** + * Fetches Git diff for an uncommitted file in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [FetchFileDiffResponse]{@link google.cloud.dataform.v1beta1.FetchFileDiffResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_file_diff.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchFileDiff_async + */ + fetchFileDiff( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest | undefined, + {} | undefined + ] + >; + fetchFileDiff( + request: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileDiff(request, options, callback); + } + /** + * Creates a directory inside a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [MakeDirectoryResponse]{@link google.cloud.dataform.v1beta1.MakeDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.make_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_MakeDirectory_async + */ + makeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest | undefined, + {} | undefined + ] + >; + makeDirectory( + request: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.makeDirectory(request, options, callback); + } + /** + * Deletes a directory (inside a Workspace) and all of its contents. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.remove_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_RemoveDirectory_async + */ + removeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + >; + removeDirectory( + request: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.removeDirectory(request, options, callback); + } + /** + * Moves a directory (inside a Workspace), and all of its contents, to a new + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {string} request.newPath + * Required. The new path for the directory including directory name, rooted at + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [MoveDirectoryResponse]{@link google.cloud.dataform.v1beta1.MoveDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.move_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_MoveDirectory_async + */ + moveDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest | undefined, + {} | undefined + ] + >; + moveDirectory( + request: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.moveDirectory(request, options, callback); + } + /** + * Returns the contents of a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ReadFileResponse]{@link google.cloud.dataform.v1beta1.ReadFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.read_file.js + * region_tag:dataform_v1beta1_generated_Dataform_ReadFile_async + */ + readFile( + request?: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | undefined, + {} | undefined + ] + >; + readFile( + request: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request?: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + | protos.google.cloud.dataform.v1beta1.IReadFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.readFile(request, options, callback); + } + /** + * Deletes a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.remove_file.js + * region_tag:dataform_v1beta1_generated_Dataform_RemoveFile_async + */ + removeFile( + request?: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveFileRequest | undefined, + {} | undefined + ] + >; + removeFile( + request: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request?: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.removeFile(request, options, callback); + } + /** + * Moves a file (inside a Workspace) to a new location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {string} request.newPath + * Required. The file's new path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [MoveFileResponse]{@link google.cloud.dataform.v1beta1.MoveFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.move_file.js + * region_tag:dataform_v1beta1_generated_Dataform_MoveFile_async + */ + moveFile( + request?: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | undefined, + {} | undefined + ] + >; + moveFile( + request: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request?: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + | protos.google.cloud.dataform.v1beta1.IMoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.moveFile(request, options, callback); + } + /** + * Writes to a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file. + * @param {Buffer} request.contents + * Required. The file's contents. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WriteFileResponse]{@link google.cloud.dataform.v1beta1.WriteFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.write_file.js + * region_tag:dataform_v1beta1_generated_Dataform_WriteFile_async + */ + writeFile( + request?: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | undefined, + {} | undefined + ] + >; + writeFile( + request: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): void; + writeFile( + request: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): void; + writeFile( + request?: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + | protos.google.cloud.dataform.v1beta1.IWriteFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.writeFile(request, options, callback); + } + /** + * Fetches a single CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_compilation_result.js + * region_tag:dataform_v1beta1_generated_Dataform_GetCompilationResult_async + */ + getCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + getCompilationResult( + request: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getCompilationResult(request, options, callback); + } + /** + * Creates a new CompilationResult in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.CompilationResult} request.compilationResult + * Required. The compilation result to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_compilation_result.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateCompilationResult_async + */ + createCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + createCompilationResult( + request: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createCompilationResult( + request, + options, + callback + ); + } + /** + * Fetches a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async + */ + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getWorkflowInvocation(request, options, callback); + } + /** + * Creates a new WorkflowInvocation in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workflow invocation. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} request.workflowInvocation + * Required. The workflow invocation resource to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async + */ + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Deletes a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async + */ + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Requests cancellation of a running WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.cancel_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async + */ + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.cancelWorkflowInvocation( + request, + options, + callback + ); + } + + /** + * Lists Repositories in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositories( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository[], + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + ] + >; + listRepositories( + request: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): void; + listRepositories( + request: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): void; + listRepositories( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository[], + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listRepositories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Repository]{@link google.cloud.dataform.v1beta1.Repository} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRepositories`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Repository]{@link google.cloud.dataform.v1beta1.Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_repositories.js + * region_tag:dataform_v1beta1_generated_Dataform_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists Workspaces in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspaces( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace[], + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + ] + >; + listWorkspaces( + request: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): void; + listWorkspaces( + request: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): void; + listWorkspaces( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace[], + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkspaces(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Workspace]{@link google.cloud.dataform.v1beta1.Workspace} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspacesStream( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.createStream( + this.innerApiCalls.listWorkspaces as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkspaces`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_workspaces.js + * region_tag:dataform_v1beta1_generated_Dataform_ListWorkspaces_async + */ + listWorkspacesAsync( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.asyncIterate( + this.innerApiCalls['listWorkspaces'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns the contents of a given Workspace directory. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * 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 {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + ] + >; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.queryDirectoryContents( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * 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 {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContentsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.createStream( + this.innerApiCalls.queryDirectoryContents as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryDirectoryContents`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * 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 {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_directory_contents.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async + */ + queryDirectoryContentsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.asyncIterate( + this.innerApiCalls['queryDirectoryContents'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists CompilationResults in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResults( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult[], + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + ] + >; + listCompilationResults( + request: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): void; + listCompilationResults( + request: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): void; + listCompilationResults( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult[], + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listCompilationResults( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResultsStream( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.createStream( + this.innerApiCalls.listCompilationResults as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCompilationResults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_compilation_results.js + * region_tag:dataform_v1beta1_generated_Dataform_ListCompilationResults_async + */ + listCompilationResultsAsync( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.asyncIterate( + this.innerApiCalls['listCompilationResults'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns CompilationResultActions in a given CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResultAction[], + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + ] + >; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResultAction[], + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.queryCompilationResultActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActionsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.createStream( + this.innerApiCalls.queryCompilationResultActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryCompilationResultActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_compilation_result_actions.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async + */ + queryCompilationResultActionsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.asyncIterate( + this.innerApiCalls['queryCompilationResultActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists WorkflowInvocations in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[], + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + ] + >; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[], + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkflowInvocations( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocationsStream( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.createStream( + this.innerApiCalls.listWorkflowInvocations as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkflowInvocations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_workflow_invocations.js + * region_tag:dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async + */ + listWorkflowInvocationsAsync( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.asyncIterate( + this.innerApiCalls['listWorkflowInvocations'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns WorkflowInvocationActions in a given WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + ] + >; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.queryWorkflowInvocationActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActionsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.createStream( + this.innerApiCalls.queryWorkflowInvocationActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryWorkflowInvocationActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async + */ + queryWorkflowInvocationActionsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( + this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * 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. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * 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). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * 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. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * 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). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified compilationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} compilation_result + * @returns {string} Resource name string. + */ + compilationResultPath( + project: string, + location: string, + repository: string, + compilationResult: string + ) { + return this.pathTemplates.compilationResultPathTemplate.render({ + project: project, + location: location, + repository: repository, + compilation_result: compilationResult, + }); + } + + /** + * Parse the project from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).project; + } + + /** + * Parse the location from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).location; + } + + /** + * Parse the repository from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).repository; + } + + /** + * Parse the compilation_result from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the compilation_result. + */ + matchCompilationResultFromCompilationResultName( + compilationResultName: string + ) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).compilation_result; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath(project: string, location: string, repository: string) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .location; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .repository; + } + + /** + * Return a fully-qualified workflowInvocation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workflow_invocation + * @returns {string} Resource name string. + */ + workflowInvocationPath( + project: string, + location: string, + repository: string, + workflowInvocation: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.render({ + project: project, + location: location, + repository: repository, + workflow_invocation: workflowInvocation, + }); + } + + /** + * Parse the project from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).project; + } + + /** + * Parse the location from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).location; + } + + /** + * Parse the repository from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).repository; + } + + /** + * Parse the workflow_invocation from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the workflow_invocation. + */ + matchWorkflowInvocationFromWorkflowInvocationName( + workflowInvocationName: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).workflow_invocation; + } + + /** + * Return a fully-qualified workspace resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workspace + * @returns {string} Resource name string. + */ + workspacePath( + project: string, + location: string, + repository: string, + workspace: string + ) { + return this.pathTemplates.workspacePathTemplate.render({ + project: project, + location: location, + repository: repository, + workspace: workspace, + }); + } + + /** + * Parse the project from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .project; + } + + /** + * Parse the location from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .location; + } + + /** + * Parse the repository from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .repository; + } + + /** + * Parse the workspace from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the workspace. + */ + matchWorkspaceFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .workspace; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataformStub && !this._terminated) { + return this.dataformStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/src/v1beta1/dataform_client_config.json b/src/v1beta1/dataform_client_config.json new file mode 100644 index 0000000..6e61613 --- /dev/null +++ b/src/v1beta1/dataform_client_config.json @@ -0,0 +1,170 @@ +{ + "interfaces": { + "google.cloud.dataform.v1beta1.Dataform": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListRepositories": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchRemoteBranches": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkspaces": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InstallNpmPackages": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PullGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PushGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileGitStatuses": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchGitAheadBehind": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CommitWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResetWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileDiff": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryDirectoryContents": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MakeDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "WriteFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCompilationResults": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryCompilationResultActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkflowInvocations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryWorkflowInvocationActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/v1beta1/dataform_proto_list.json b/src/v1beta1/dataform_proto_list.json new file mode 100644 index 0000000..8e9b5e1 --- /dev/null +++ b/src/v1beta1/dataform_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/dataform/v1beta1/dataform.proto" +] diff --git a/src/v1beta1/gapic_metadata.json b/src/v1beta1/gapic_metadata.json new file mode 100644 index 0000000..72fc33e --- /dev/null +++ b/src/v1beta1/gapic_metadata.json @@ -0,0 +1,411 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataform.v1beta1", + "libraryPackage": "@google-cloud/dataform", + "services": { + "Dataform": { + "clients": { + "grpc": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + } + } + } + } +} diff --git a/src/v1beta1/index.ts b/src/v1beta1/index.ts new file mode 100644 index 0000000..a1e4487 --- /dev/null +++ b/src/v1beta1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {DataformClient} from './dataform_client'; diff --git a/test/gapic_dataform_v1beta1.ts b/test/gapic_dataform_v1beta1.ts new file mode 100644 index 0000000..f559ab8 --- /dev/null +++ b/test/gapic_dataform_v1beta1.ts @@ -0,0 +1,7084 @@ +// Copyright 2022 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataformModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, IamProtos, LocationProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.DataformClient', () => { + it('has servicePath', () => { + const servicePath = dataformModule.v1beta1.DataformClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = dataformModule.v1beta1.DataformClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dataformModule.v1beta1.DataformClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataformModule.v1beta1.DataformClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataformModule.v1beta1.DataformClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + await client.initialize(); + assert(client.dataformStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataformStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.getRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRepository(request), expectedError); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.createRepository = stubSimpleCall(expectedResponse); + const [response] = await client.createRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.createRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createRepository(request), expectedError); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createRepository(request), expectedError); + }); + }); + + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.updateRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateRepository(request), expectedError); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = stubSimpleCall(expectedResponse); + const [response] = await client.deleteRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteRepository(request), expectedError); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteRepository(request), expectedError); + }); + }); + + describe('fetchRemoteBranches', () => { + it('invokes fetchRemoteBranches without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchRemoteBranches(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchRemoteBranches without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchRemoteBranches( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchRemoteBranches with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchRemoteBranches = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchRemoteBranches with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + }); + }); + + describe('getWorkspace', () => { + it('invokes getWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.getWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.getWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getWorkspace(request), expectedError); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getWorkspace(request), expectedError); + }); + }); + + describe('createWorkspace', () => { + it('invokes createWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.createWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.createWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.createWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createWorkspace(request), expectedError); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createWorkspace(request), expectedError); + }); + }); + + describe('deleteWorkspace', () => { + it('invokes deleteWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteWorkspace(request), expectedError); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteWorkspace(request), expectedError); + }); + }); + + describe('installNpmPackages', () => { + it('invokes installNpmPackages without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCall(expectedResponse); + const [response] = await client.installNpmPackages(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes installNpmPackages without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.installNpmPackages( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes installNpmPackages with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.installNpmPackages = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.installNpmPackages(request), expectedError); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes installNpmPackages with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.installNpmPackages(request), expectedError); + }); + }); + + describe('pullGitCommits', () => { + it('invokes pullGitCommits without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pullGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pullGitCommits without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pullGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pullGitCommits with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pullGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pullGitCommits(request), expectedError); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pullGitCommits with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pullGitCommits(request), expectedError); + }); + }); + + describe('pushGitCommits', () => { + it('invokes pushGitCommits without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pushGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pushGitCommits without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pushGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pushGitCommits with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pushGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pushGitCommits(request), expectedError); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pushGitCommits with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pushGitCommits(request), expectedError); + }); + }); + + describe('fetchFileGitStatuses', () => { + it('invokes fetchFileGitStatuses without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileGitStatuses(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileGitStatuses without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileGitStatuses( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchFileGitStatuses with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileGitStatuses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileGitStatuses with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + }); + }); + + describe('fetchGitAheadBehind', () => { + it('invokes fetchGitAheadBehind without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchGitAheadBehind(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchGitAheadBehind without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchGitAheadBehind( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchGitAheadBehind with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchGitAheadBehind = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchGitAheadBehind with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + }); + }); + + describe('commitWorkspaceChanges', () => { + it('invokes commitWorkspaceChanges without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.commitWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes commitWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.commitWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes commitWorkspaceChanges with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.commitWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes commitWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('resetWorkspaceChanges', () => { + it('invokes resetWorkspaceChanges without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.resetWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes resetWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resetWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes resetWorkspaceChanges with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.resetWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes resetWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('fetchFileDiff', () => { + it('invokes fetchFileDiff without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileDiff(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileDiff without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileDiff( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchFileDiff with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileDiff = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileDiff(request), expectedError); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileDiff with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileDiff(request), expectedError); + }); + }); + + describe('makeDirectory', () => { + it('invokes makeDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.makeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes makeDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.makeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes makeDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.makeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.makeDirectory(request), expectedError); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes makeDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.makeDirectory(request), expectedError); + }); + }); + + describe('removeDirectory', () => { + it('invokes removeDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.removeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removeDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeDirectory(request), expectedError); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeDirectory(request), expectedError); + }); + }); + + describe('moveDirectory', () => { + it('invokes moveDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.moveDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes moveDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.moveDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.moveDirectory(request), expectedError); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveDirectory(request), expectedError); + }); + }); + + describe('readFile', () => { + it('invokes readFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileResponse() + ); + client.innerApiCalls.readFile = stubSimpleCall(expectedResponse); + const [response] = await client.readFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes readFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileResponse() + ); + client.innerApiCalls.readFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IReadFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes readFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.readFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.readFile(request), expectedError); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes readFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readFile(request), expectedError); + }); + }); + + describe('removeFile', () => { + it('invokes removeFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = stubSimpleCall(expectedResponse); + const [response] = await client.removeFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeFile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removeFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removeFile = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeFile(request), expectedError); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeFile(request), expectedError); + }); + }); + + describe('moveFile', () => { + it('invokes moveFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileResponse() + ); + client.innerApiCalls.moveFile = stubSimpleCall(expectedResponse); + const [response] = await client.moveFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileResponse() + ); + client.innerApiCalls.moveFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMoveFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes moveFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.moveFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.moveFile(request), expectedError); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveFile(request), expectedError); + }); + }); + + describe('writeFile', () => { + it('invokes writeFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileResponse() + ); + client.innerApiCalls.writeFile = stubSimpleCall(expectedResponse); + const [response] = await client.writeFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes writeFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileResponse() + ); + client.innerApiCalls.writeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.writeFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWriteFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes writeFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.writeFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.writeFile(request), expectedError); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes writeFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.writeFile(request), expectedError); + }); + }); + + describe('getCompilationResult', () => { + it('invokes getCompilationResult without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.getCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCompilationResult without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCompilationResult with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCompilationResult(request), expectedError); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCompilationResult with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCompilationResult(request), expectedError); + }); + }); + + describe('createCompilationResult', () => { + it('invokes createCompilationResult without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.createCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCompilationResult without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCompilationResult with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCompilationResult with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + }); + }); + + describe('getWorkflowInvocation', () => { + it('invokes getWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.getWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('createWorkflowInvocation', () => { + it('invokes createWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.createWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('deleteWorkflowInvocation', () => { + it('invokes deleteWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('cancelWorkflowInvocation', () => { + it('invokes cancelWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.cancelWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listRepositories with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRepositories(request), expectedError); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Repository[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Repository[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listWorkspaces', () => { + it('invokes listWorkspaces without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkspaces(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkspaces without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkspaces( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkspaces with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkspaces = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listWorkspaces(request), expectedError); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkspacesStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listWorkspacesStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkspaces without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkspace[] = []; + const iterable = client.listWorkspacesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkspaces with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkspacesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkspace[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryDirectoryContents', () => { + it('invokes queryDirectoryContents without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCall(expectedResponse); + const [response] = await client.queryDirectoryContents(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryDirectoryContents without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryDirectoryContents( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryDirectoryContents with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryDirectoryContents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryDirectoryContents(request), + expectedError + ); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryDirectoryContentsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryDirectoryContentsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryDirectoryContents without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + const iterable = client.queryDirectoryContentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryDirectoryContents with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryDirectoryContentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCompilationResults', () => { + it('invokes listCompilationResults without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCall(expectedResponse); + const [response] = await client.listCompilationResults(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCompilationResults without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCompilationResults( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.ICompilationResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCompilationResults with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCompilationResults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCompilationResults(request), + expectedError + ); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCompilationResultsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listCompilationResultsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCompilationResults without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResult[] = + []; + const iterable = client.listCompilationResultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCompilationResults with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCompilationResultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryCompilationResultActions', () => { + it('invokes queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryCompilationResultActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryCompilationResultActions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryCompilationResultActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryCompilationResultActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryCompilationResultActions(request), + expectedError + ); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryCompilationResultActionsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryCompilationResultActionsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] = + []; + const iterable = client.queryCompilationResultActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryCompilationResultActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listWorkflowInvocations', () => { + it('invokes listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCall(expectedResponse); + const [response] = await client.listWorkflowInvocations(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflowInvocations without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkflowInvocations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkflowInvocations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listWorkflowInvocations(request), + expectedError + ); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflowInvocationsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listWorkflowInvocationsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] = + []; + const iterable = client.listWorkflowInvocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkflowInvocationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryWorkflowInvocationActions', () => { + it('invokes queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryWorkflowInvocationActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryWorkflowInvocationActions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryWorkflowInvocationActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryWorkflowInvocationActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryWorkflowInvocationActions(request), + expectedError + ); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryWorkflowInvocationActionsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryWorkflowInvocationActionsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] = + []; + const iterable = client.queryWorkflowInvocationActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryWorkflowInvocationActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('compilationResult', () => { + const fakePath = '/rendered/path/compilationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + compilation_result: 'compilationResultValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.compilationResultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.compilationResultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('compilationResultPath', () => { + const result = client.compilationResultPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'compilationResultValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCompilationResultName', () => { + const result = client.matchProjectFromCompilationResultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCompilationResultName', () => { + const result = client.matchLocationFromCompilationResultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromCompilationResultName', () => { + const result = + client.matchRepositoryFromCompilationResultName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCompilationResultFromCompilationResultName', () => { + const result = + client.matchCompilationResultFromCompilationResultName(fakePath); + assert.strictEqual(result, 'compilationResultValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('repository', () => { + const fakePath = '/rendered/path/repository'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath( + 'projectValue', + 'locationValue', + 'repositoryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workflowInvocation', () => { + const fakePath = '/rendered/path/workflowInvocation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workflow_invocation: 'workflowInvocationValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workflowInvocationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workflowInvocationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workflowInvocationPath', () => { + const result = client.workflowInvocationPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workflowInvocationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkflowInvocationName', () => { + const result = client.matchProjectFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkflowInvocationName', () => { + const result = client.matchLocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkflowInvocationName', () => { + const result = + client.matchRepositoryFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkflowInvocationFromWorkflowInvocationName', () => { + const result = + client.matchWorkflowInvocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'workflowInvocationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workspace', () => { + const fakePath = '/rendered/path/workspace'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workspace: 'workspaceValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workspacePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workspacePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workspacePath', () => { + const result = client.workspacePath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workspaceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workspacePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkspaceName', () => { + const result = client.matchProjectFromWorkspaceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkspaceName', () => { + const result = client.matchLocationFromWorkspaceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkspaceName', () => { + const result = client.matchRepositoryFromWorkspaceName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkspaceFromWorkspaceName', () => { + const result = client.matchWorkspaceFromWorkspaceName(fakePath); + assert.strictEqual(result, 'workspaceValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +});