@googleapis/dataform 17.0.0 → 17.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1beta1.ts CHANGED
@@ -247,6 +247,19 @@ export namespace dataform_v1beta1 {
247
247
  */
248
248
  role?: string | null;
249
249
  }
250
+ /**
251
+ * Contains metadata about a branch.
252
+ */
253
+ export interface Schema$BranchMetadata {
254
+ /**
255
+ * The branch name.
256
+ */
257
+ branchName?: string | null;
258
+ /**
259
+ * The last commit on the branch.
260
+ */
261
+ lastCommit?: Schema$CommitLogEntry;
262
+ }
250
263
  /**
251
264
  * The request message for Operations.CancelOperation.
252
265
  */
@@ -259,6 +272,23 @@ export namespace dataform_v1beta1 {
259
272
  * `CancelWorkflowInvocation` response message.
260
273
  */
261
274
  export interface Schema$CancelWorkflowInvocationResponse {}
275
+ /**
276
+ * `CheckoutWorkspaceBranch` request message.
277
+ */
278
+ export interface Schema$CheckoutWorkspaceBranchRequest {
279
+ /**
280
+ * Required. The name of the branch in the Git repository to which the workspace should be checked out.
281
+ */
282
+ branch?: string | null;
283
+ /**
284
+ * Optional. If set to true and the branch does not exist, it will be created. Otherwise, an error will be thrown.
285
+ */
286
+ createIfNotExists?: boolean | null;
287
+ /**
288
+ * Optional. The name of the branch in the Git repository from which the new branch should be created. If left unset, the workspace's current branch name will be used. Accepts only branch names from FetchWorkspaceBranches response, and can only be set if `create_if_not_exists` is true. Oherwise, an error will be thrown.
289
+ */
290
+ sourceBranch?: string | null;
291
+ }
262
292
  /**
263
293
  * Configures various aspects of Dataform code compilation.
264
294
  */
@@ -291,6 +321,10 @@ export namespace dataform_v1beta1 {
291
321
  * Optional. The default schema (BigQuery dataset ID).
292
322
  */
293
323
  defaultSchema?: string | null;
324
+ /**
325
+ * Optional. The pipeline options which defines the pipeline type and path within the Git repository.
326
+ */
327
+ pipelineConfig?: Schema$PipelineConfig;
294
328
  /**
295
329
  * Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.
296
330
  */
@@ -460,6 +494,10 @@ export namespace dataform_v1beta1 {
460
494
  * Output only. The version of `@dataform/core` that was used for compilation.
461
495
  */
462
496
  dataformCoreVersion?: string | null;
497
+ /**
498
+ * Output only. Metadata about the repository snapshot used by scheduled notebooks.
499
+ */
500
+ gcsRepositorySnapshotMetadata?: Schema$GcsRepositorySnapshotMetadata;
463
501
  /**
464
502
  * 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`
465
503
  */
@@ -624,6 +662,23 @@ export namespace dataform_v1beta1 {
624
662
  */
625
663
  relationDescriptor?: Schema$RelationDescriptor;
626
664
  }
665
+ /**
666
+ * `DeleteBranch` request message.
667
+ */
668
+ export interface Schema$DeleteBranchRequest {
669
+ /**
670
+ * Required. The name of the branch in the Git repository to delete.
671
+ */
672
+ branch?: string | null;
673
+ /**
674
+ * Optional. If set to true, any non-pushed commits on the branch will be deleted. Upstream branch name will be the same as the branch to delete.
675
+ */
676
+ force?: boolean | null;
677
+ }
678
+ /**
679
+ * `DeleteBranch` response message.
680
+ */
681
+ export interface Schema$DeleteBranchResponse {}
627
682
  /**
628
683
  * Represents the delete file operation.
629
684
  */
@@ -719,6 +774,15 @@ export namespace dataform_v1beta1 {
719
774
  */
720
775
  title?: string | null;
721
776
  }
777
+ /**
778
+ * Response message for `FetchCurrentWorkspaceBranch` method.
779
+ */
780
+ export interface Schema$FetchCurrentWorkspaceBranchResponse {
781
+ /**
782
+ * The name of the current branch for the workspace.
783
+ */
784
+ branchName?: string | null;
785
+ }
722
786
  /**
723
787
  * `FetchFileDiff` response message.
724
788
  */
@@ -772,6 +836,19 @@ export namespace dataform_v1beta1 {
772
836
  */
773
837
  nextPageToken?: string | null;
774
838
  }
839
+ /**
840
+ * Response message for `FetchWorkspaceBranches` method.
841
+ */
842
+ export interface Schema$FetchWorkspaceBranchesResponse {
843
+ /**
844
+ * The branches in the workspace.
845
+ */
846
+ branches?: Schema$BranchMetadata[];
847
+ /**
848
+ * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
849
+ */
850
+ nextPageToken?: string | null;
851
+ }
775
852
  /**
776
853
  * Represents a single file operation to the repository.
777
854
  */
@@ -857,6 +934,32 @@ export namespace dataform_v1beta1 {
857
934
  */
858
935
  repository?: Schema$Repository;
859
936
  }
937
+ /**
938
+ * Configures the destination for a repository snapshot.
939
+ */
940
+ export interface Schema$GcsRepositorySnapshotDestination {
941
+ /**
942
+ * Optional. The Google Cloud Storage destination to upload the repository snapshot to. Format: `gs://bucket-name/path/`.
943
+ */
944
+ repositorySnapshotUri?: string | null;
945
+ }
946
+ /**
947
+ * Metadata about a repository snapshot stored in Google Cloud Storage.
948
+ */
949
+ export interface Schema$GcsRepositorySnapshotMetadata {
950
+ /**
951
+ * Output only. The crc32c checksum of the repository snapshot, big-endian base64 encoded.
952
+ */
953
+ crc32cChecksum?: string | null;
954
+ /**
955
+ * Output only. The generation number of the Cloud Storage object. See https://cloud.google.com/storage/docs/metadata#generation-number.
956
+ */
957
+ generation?: string | null;
958
+ /**
959
+ * Output only. The Google Cloud Storage URI of the repository snapshot.
960
+ */
961
+ repositorySnapshotUri?: string | null;
962
+ }
860
963
  /**
861
964
  * Controls Git remote configuration for a repository.
862
965
  */
@@ -944,7 +1047,12 @@ export namespace dataform_v1beta1 {
944
1047
  /**
945
1048
  * `InstallNpmPackages` request message.
946
1049
  */
947
- export interface Schema$InstallNpmPackagesRequest {}
1050
+ export interface Schema$InstallNpmPackagesRequest {
1051
+ /**
1052
+ * Optional. The pipeline options which defines the pipeline type and path within the Git repository.
1053
+ */
1054
+ pipelineConfig?: Schema$PipelineConfig;
1055
+ }
948
1056
  /**
949
1057
  * `InstallNpmPackages` response message.
950
1058
  */
@@ -1267,6 +1375,10 @@ export namespace dataform_v1beta1 {
1267
1375
  * Output only. The code contents of a Notebook to be run.
1268
1376
  */
1269
1377
  contents?: string | null;
1378
+ /**
1379
+ * Output only. The path to the notebook file in the repository.
1380
+ */
1381
+ filePath?: string | null;
1270
1382
  /**
1271
1383
  * Output only. The ID of the Gemini Enterprise Agent Platform job that executed the notebook in contents and also the ID used for the outputs created in Google Cloud Storage buckets. Only set once the job has started to run.
1272
1384
  */
@@ -1284,6 +1396,10 @@ export namespace dataform_v1beta1 {
1284
1396
  * Optional. The Google Cloud Storage location to upload the result to. Format: `gs://bucket-name`.
1285
1397
  */
1286
1398
  gcsOutputBucket?: string | null;
1399
+ /**
1400
+ * Optional. The Google Cloud Storage destination to upload the snapshot to. For empty URI it defaults to the provided gcs_output_bucket. Format: `gs://bucket-name/path/`.
1401
+ */
1402
+ gcsRepositorySnapshotDestination?: Schema$GcsRepositorySnapshotDestination;
1287
1403
  }
1288
1404
  /**
1289
1405
  * This resource represents a long-running operation that is the result of a network API call.
@@ -1372,6 +1488,19 @@ export namespace dataform_v1beta1 {
1372
1488
  */
1373
1489
  tags?: string[] | null;
1374
1490
  }
1491
+ /**
1492
+ * Defines the pipeline type and path within the Git repository.
1493
+ */
1494
+ export interface Schema$PipelineConfig {
1495
+ /**
1496
+ * Required. The relative path within the Git repository where the pipeline is defined. For example, for a Dataform pipeline, it is a path to the folder where `workflow_settings.yaml` or `dataform.json` is located.
1497
+ */
1498
+ path?: string | null;
1499
+ /**
1500
+ * Required. The type of the pipeline.
1501
+ */
1502
+ pipelineType?: string | null;
1503
+ }
1375
1504
  /**
1376
1505
  * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1377
1506
  */
@@ -1685,7 +1814,7 @@ export namespace dataform_v1beta1 {
1685
1814
  */
1686
1815
  releaseCompilationResult?: string | null;
1687
1816
  /**
1688
- * Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is UTC.
1817
+ * Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the [time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is `UTC`.
1689
1818
  */
1690
1819
  timeZone?: string | null;
1691
1820
  }
@@ -1939,6 +2068,23 @@ export namespace dataform_v1beta1 {
1939
2068
  */
1940
2069
  message?: string | null;
1941
2070
  }
2071
+ /**
2072
+ * `SyncWorkspaceRefs` request message.
2073
+ */
2074
+ export interface Schema$SyncWorkspaceRefsRequest {
2075
+ /**
2076
+ * Optional. Can be used to deepen the commit history of shallow clones. Git documentation: https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---deependepth
2077
+ */
2078
+ deepen?: number | null;
2079
+ /**
2080
+ * Optional. The name of the branch in the Git remote to which the refs should be fetched for. If left unset, all remote branches will be fetched.
2081
+ */
2082
+ remoteBranchName?: string | null;
2083
+ }
2084
+ /**
2085
+ * `SyncWorkspaceRefs` response message.
2086
+ */
2087
+ export interface Schema$SyncWorkspaceRefsResponse {}
1942
2088
  /**
1943
2089
  * Represents a table update trigger configuration.
1944
2090
  */
@@ -2101,7 +2247,7 @@ export namespace dataform_v1beta1 {
2101
2247
  */
2102
2248
  releaseConfig?: string | null;
2103
2249
  /**
2104
- * Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is UTC.
2250
+ * Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the [time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is `UTC`.
2105
2251
  */
2106
2252
  timeZone?: string | null;
2107
2253
  /**
@@ -2109,7 +2255,7 @@ export namespace dataform_v1beta1 {
2109
2255
  */
2110
2256
  updateTime?: string | null;
2111
2257
  /**
2112
- * Optional. Optional trigger configuration for this workflow. If present, the workflow will be triggered based on the specified triggers.
2258
+ * Optional. Trigger configuration for this workflow. If present, the workflow will be triggered based on the specified triggers.
2113
2259
  */
2114
2260
  workflowTriggerConfig?: Schema$WorkflowTriggerConfig;
2115
2261
  }
@@ -2141,6 +2287,10 @@ export namespace dataform_v1beta1 {
2141
2287
  * Output only. The workflow invocation's name.
2142
2288
  */
2143
2289
  name?: string | null;
2290
+ /**
2291
+ * Output only. The pipeline options which defines the pipeline type and path within the Git repository.
2292
+ */
2293
+ pipelineConfig?: Schema$PipelineConfig;
2144
2294
  /**
2145
2295
  * Output only. Metadata indicating whether this resource is user-scoped. `WorkflowInvocation` resource is `user_scoped` only if it is sourced from a compilation result and the compilation result is user-scoped.
2146
2296
  */
@@ -2225,7 +2375,7 @@ export namespace dataform_v1beta1 {
2225
2375
  */
2226
2376
  maxWaitDuration?: string | null;
2227
2377
  /**
2228
- * Optional. Minimum duration between two consecutive executions. If not specified, the workflow will be executed every time trigger conditions are met and no ongoing workflow execution.
2378
+ * Optional. Minimum duration between two consecutive executions. If not specified, the workflow will be executed every time trigger conditions are met and there is no ongoing workflow execution.
2229
2379
  */
2230
2380
  minExecutionDuration?: string | null;
2231
2381
  /**
@@ -2249,10 +2399,18 @@ export namespace dataform_v1beta1 {
2249
2399
  * Output only. A data encryption state of a Git repository if this Workspace is protected by a KMS key.
2250
2400
  */
2251
2401
  dataEncryptionState?: Schema$DataEncryptionState;
2402
+ /**
2403
+ * Optional. Input only. Immutable. The maximum depth of the Git repository to checkout for this workspace. If defined and greater than 0, the Git repository will be created as a shallow clone with the given depth, otherwise a full clone will be performed. This field is available only for GitHub, Gitlab and 1p repositories with enabled branch management.
2404
+ */
2405
+ depth?: number | null;
2252
2406
  /**
2253
2407
  * Optional. If set to true, workspaces will not be moved if its linked Repository is moved. Instead, it will be deleted.
2254
2408
  */
2255
2409
  disableMoves?: boolean | null;
2410
+ /**
2411
+ * Immutable. Controls the enablement of branch checkout for the workspace. When set to True, the workspace will be allowed to checkout branches.
2412
+ */
2413
+ enableBranchManagement?: boolean | null;
2256
2414
  /**
2257
2415
  * Output only. All the metadata information that is used internally to serve the resource. For example: timestamps, flags, status fields, etc. The format of this field is a JSON string.
2258
2416
  */
@@ -2261,10 +2419,18 @@ export namespace dataform_v1beta1 {
2261
2419
  * Identifier. The workspace's name.
2262
2420
  */
2263
2421
  name?: string | null;
2422
+ /**
2423
+ * Optional. Input only. Immutable. The name of the default upstream branch for all pull/push operations in the remote repository for this workspace. If empty, the HEAD branch from repository will be used.
2424
+ */
2425
+ originalBranch?: string | null;
2264
2426
  /**
2265
2427
  * Output only. Metadata indicating whether this resource is user-scoped. For `Workspace` resources, the `user_scoped` field is always `true`.
2266
2428
  */
2267
2429
  privateResourceMetadata?: Schema$PrivateResourceMetadata;
2430
+ /**
2431
+ * Output only. If set to true, the workspace was created as a shallow clone. Will be set to true if the depth field is set to a value greater than 0, otherwise it will be set to false.
2432
+ */
2433
+ shallow?: boolean | null;
2268
2434
  }
2269
2435
  /**
2270
2436
  * Configures workspace compilation overrides for a repository. Primarily used by the UI (`console.cloud.google.com`). `schema_suffix` and `table_prefix` can have a special expression - `${workspaceName\}`, which refers to the workspace name from which the compilation results will be created. API callers are expected to resolve the expression in these overrides and provide them explicitly in `code_compilation_config` (https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories.compilationResults#codecompilationconfig) when creating workspace-scoped compilation results.
@@ -8122,6 +8288,7 @@ export namespace dataform_v1beta1 {
8122
8288
  * // "createTime": "my_createTime",
8123
8289
  * // "dataEncryptionState": {},
8124
8290
  * // "dataformCoreVersion": "my_dataformCoreVersion",
8291
+ * // "gcsRepositorySnapshotMetadata": {},
8125
8292
  * // "gitCommitish": "my_gitCommitish",
8126
8293
  * // "internalMetadata": "my_internalMetadata",
8127
8294
  * // "name": "my_name",
@@ -8141,6 +8308,7 @@ export namespace dataform_v1beta1 {
8141
8308
  * // "createTime": "my_createTime",
8142
8309
  * // "dataEncryptionState": {},
8143
8310
  * // "dataformCoreVersion": "my_dataformCoreVersion",
8311
+ * // "gcsRepositorySnapshotMetadata": {},
8144
8312
  * // "gitCommitish": "my_gitCommitish",
8145
8313
  * // "internalMetadata": "my_internalMetadata",
8146
8314
  * // "name": "my_name",
@@ -8294,6 +8462,7 @@ export namespace dataform_v1beta1 {
8294
8462
  * // "createTime": "my_createTime",
8295
8463
  * // "dataEncryptionState": {},
8296
8464
  * // "dataformCoreVersion": "my_dataformCoreVersion",
8465
+ * // "gcsRepositorySnapshotMetadata": {},
8297
8466
  * // "gitCommitish": "my_gitCommitish",
8298
8467
  * // "internalMetadata": "my_internalMetadata",
8299
8468
  * // "name": "my_name",
@@ -10663,6 +10832,7 @@ export namespace dataform_v1beta1 {
10663
10832
  * // "invocationConfig": {},
10664
10833
  * // "invocationTiming": {},
10665
10834
  * // "name": "my_name",
10835
+ * // "pipelineConfig": {},
10666
10836
  * // "privateResourceMetadata": {},
10667
10837
  * // "resolvedCompilationResult": "my_resolvedCompilationResult",
10668
10838
  * // "state": "my_state",
@@ -10680,6 +10850,7 @@ export namespace dataform_v1beta1 {
10680
10850
  * // "invocationConfig": {},
10681
10851
  * // "invocationTiming": {},
10682
10852
  * // "name": "my_name",
10853
+ * // "pipelineConfig": {},
10683
10854
  * // "privateResourceMetadata": {},
10684
10855
  * // "resolvedCompilationResult": "my_resolvedCompilationResult",
10685
10856
  * // "state": "my_state",
@@ -10967,6 +11138,7 @@ export namespace dataform_v1beta1 {
10967
11138
  * // "invocationConfig": {},
10968
11139
  * // "invocationTiming": {},
10969
11140
  * // "name": "my_name",
11141
+ * // "pipelineConfig": {},
10970
11142
  * // "privateResourceMetadata": {},
10971
11143
  * // "resolvedCompilationResult": "my_resolvedCompilationResult",
10972
11144
  * // "state": "my_state",
@@ -11461,6 +11633,155 @@ export namespace dataform_v1beta1 {
11461
11633
  this.context = context;
11462
11634
  }
11463
11635
 
11636
+ /**
11637
+ * Checkout a branch in a Workspace.
11638
+ * @example
11639
+ * ```js
11640
+ * // Before running the sample:
11641
+ * // - Enable the API at:
11642
+ * // https://console.developers.google.com/apis/api/dataform.googleapis.com
11643
+ * // - Login into gcloud by running:
11644
+ * // ```sh
11645
+ * // $ gcloud auth application-default login
11646
+ * // ```
11647
+ * // - Install the npm module by running:
11648
+ * // ```sh
11649
+ * // $ npm install googleapis
11650
+ * // ```
11651
+ *
11652
+ * const {google} = require('googleapis');
11653
+ * const dataform = google.dataform('v1beta1');
11654
+ *
11655
+ * async function main() {
11656
+ * const auth = new google.auth.GoogleAuth({
11657
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
11658
+ * scopes: [
11659
+ * 'https://www.googleapis.com/auth/bigquery',
11660
+ * 'https://www.googleapis.com/auth/cloud-platform',
11661
+ * ],
11662
+ * });
11663
+ *
11664
+ * // Acquire an auth client, and bind it to all future calls
11665
+ * const authClient = await auth.getClient();
11666
+ * google.options({auth: authClient});
11667
+ *
11668
+ * // Do the magic
11669
+ * const res =
11670
+ * await dataform.projects.locations.repositories.workspaces.checkout({
11671
+ * // Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
11672
+ * name: 'projects/my-project/locations/my-location/repositories/my-repositorie/workspaces/my-workspace',
11673
+ *
11674
+ * // Request body metadata
11675
+ * requestBody: {
11676
+ * // request body parameters
11677
+ * // {
11678
+ * // "branch": "my_branch",
11679
+ * // "createIfNotExists": false,
11680
+ * // "sourceBranch": "my_sourceBranch"
11681
+ * // }
11682
+ * },
11683
+ * });
11684
+ * console.log(res.data);
11685
+ *
11686
+ * // Example response
11687
+ * // {}
11688
+ * }
11689
+ *
11690
+ * main().catch(e => {
11691
+ * console.error(e);
11692
+ * throw e;
11693
+ * });
11694
+ *
11695
+ * ```
11696
+ *
11697
+ * @param params - Parameters for request
11698
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
11699
+ * @param callback - Optional callback that handles the response.
11700
+ * @returns A promise if used with async/await, or void if used with a callback.
11701
+ */
11702
+ checkout(
11703
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout,
11704
+ options: StreamMethodOptions
11705
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
11706
+ checkout(
11707
+ params?: Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout,
11708
+ options?: MethodOptions
11709
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
11710
+ checkout(
11711
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout,
11712
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
11713
+ callback: BodyResponseCallback<Readable>
11714
+ ): void;
11715
+ checkout(
11716
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout,
11717
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
11718
+ callback: BodyResponseCallback<Schema$Empty>
11719
+ ): void;
11720
+ checkout(
11721
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout,
11722
+ callback: BodyResponseCallback<Schema$Empty>
11723
+ ): void;
11724
+ checkout(callback: BodyResponseCallback<Schema$Empty>): void;
11725
+ checkout(
11726
+ paramsOrCallback?:
11727
+ | Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout
11728
+ | BodyResponseCallback<Schema$Empty>
11729
+ | BodyResponseCallback<Readable>,
11730
+ optionsOrCallback?:
11731
+ | MethodOptions
11732
+ | StreamMethodOptions
11733
+ | BodyResponseCallback<Schema$Empty>
11734
+ | BodyResponseCallback<Readable>,
11735
+ callback?:
11736
+ BodyResponseCallback<Schema$Empty> | BodyResponseCallback<Readable>
11737
+ ):
11738
+ | void
11739
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
11740
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
11741
+ let params = (paramsOrCallback ||
11742
+ {}) as Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout;
11743
+ let options = (optionsOrCallback || {}) as MethodOptions;
11744
+
11745
+ if (typeof paramsOrCallback === 'function') {
11746
+ callback = paramsOrCallback;
11747
+ params =
11748
+ {} as Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout;
11749
+ options = {};
11750
+ }
11751
+
11752
+ if (typeof optionsOrCallback === 'function') {
11753
+ callback = optionsOrCallback;
11754
+ options = {};
11755
+ }
11756
+
11757
+ const rootUrl = options.rootUrl || 'https://dataform.googleapis.com/';
11758
+ const parameters = {
11759
+ options: Object.assign(
11760
+ {
11761
+ url: (rootUrl + '/v1beta1/{+name}:checkout').replace(
11762
+ /([^:]\/)\/+/g,
11763
+ '$1'
11764
+ ),
11765
+ method: 'POST',
11766
+ apiVersion: '',
11767
+ },
11768
+ options
11769
+ ),
11770
+ params,
11771
+ requiredParams: ['name'],
11772
+ pathParams: ['name'],
11773
+ context: this.context,
11774
+ };
11775
+ if (callback) {
11776
+ createAPIRequest<Schema$Empty>(
11777
+ parameters,
11778
+ callback as BodyResponseCallback<unknown>
11779
+ );
11780
+ } else {
11781
+ return createAPIRequest<Schema$Empty>(parameters);
11782
+ }
11783
+ }
11784
+
11464
11785
  /**
11465
11786
  * Applies a Git commit for uncommitted files in a Workspace.
11466
11787
  * @example
@@ -11662,10 +11983,14 @@ export namespace dataform_v1beta1 {
11662
11983
  * // {
11663
11984
  * // "createTime": "my_createTime",
11664
11985
  * // "dataEncryptionState": {},
11986
+ * // "depth": 0,
11665
11987
  * // "disableMoves": false,
11988
+ * // "enableBranchManagement": false,
11666
11989
  * // "internalMetadata": "my_internalMetadata",
11667
11990
  * // "name": "my_name",
11668
- * // "privateResourceMetadata": {}
11991
+ * // "originalBranch": "my_originalBranch",
11992
+ * // "privateResourceMetadata": {},
11993
+ * // "shallow": false
11669
11994
  * // }
11670
11995
  * },
11671
11996
  * });
@@ -11675,10 +12000,14 @@ export namespace dataform_v1beta1 {
11675
12000
  * // {
11676
12001
  * // "createTime": "my_createTime",
11677
12002
  * // "dataEncryptionState": {},
12003
+ * // "depth": 0,
11678
12004
  * // "disableMoves": false,
12005
+ * // "enableBranchManagement": false,
11679
12006
  * // "internalMetadata": "my_internalMetadata",
11680
12007
  * // "name": "my_name",
11681
- * // "privateResourceMetadata": {}
12008
+ * // "originalBranch": "my_originalBranch",
12009
+ * // "privateResourceMetadata": {},
12010
+ * // "shallow": false
11682
12011
  * // }
11683
12012
  * }
11684
12013
  *
@@ -11913,7 +12242,7 @@ export namespace dataform_v1beta1 {
11913
12242
  }
11914
12243
 
11915
12244
  /**
11916
- * Fetches Git diff for an uncommitted file in a Workspace.
12245
+ * Deletes a branch in a Workspace.
11917
12246
  * @example
11918
12247
  * ```js
11919
12248
  * // Before running the sample:
@@ -11946,19 +12275,23 @@ export namespace dataform_v1beta1 {
11946
12275
  *
11947
12276
  * // Do the magic
11948
12277
  * const res =
11949
- * await dataform.projects.locations.repositories.workspaces.fetchFileDiff({
11950
- * // Required. The file's full path including filename, relative to the workspace root.
11951
- * path: 'placeholder-value',
11952
- * // Required. The workspace's name.
11953
- * workspace:
11954
- * 'projects/my-project/locations/my-location/repositories/my-repositorie/workspaces/my-workspace',
12278
+ * await dataform.projects.locations.repositories.workspaces.deleteBranch({
12279
+ * // Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
12280
+ * name: 'projects/my-project/locations/my-location/repositories/my-repositorie/workspaces/my-workspace',
12281
+ *
12282
+ * // Request body metadata
12283
+ * requestBody: {
12284
+ * // request body parameters
12285
+ * // {
12286
+ * // "branch": "my_branch",
12287
+ * // "force": false
12288
+ * // }
12289
+ * },
11955
12290
  * });
11956
12291
  * console.log(res.data);
11957
12292
  *
11958
12293
  * // Example response
11959
- * // {
11960
- * // "formattedDiff": "my_formattedDiff"
11961
- * // }
12294
+ * // {}
11962
12295
  * }
11963
12296
  *
11964
12297
  * main().catch(e => {
@@ -11973,35 +12306,492 @@ export namespace dataform_v1beta1 {
11973
12306
  * @param callback - Optional callback that handles the response.
11974
12307
  * @returns A promise if used with async/await, or void if used with a callback.
11975
12308
  */
11976
- fetchFileDiff(
11977
- params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12309
+ deleteBranch(
12310
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch,
11978
12311
  options: StreamMethodOptions
11979
12312
  ): Promise<GaxiosResponseWithHTTP2<Readable>>;
11980
- fetchFileDiff(
11981
- params?: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12313
+ deleteBranch(
12314
+ params?: Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch,
11982
12315
  options?: MethodOptions
11983
- ): Promise<GaxiosResponseWithHTTP2<Schema$FetchFileDiffResponse>>;
11984
- fetchFileDiff(
11985
- params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12316
+ ): Promise<GaxiosResponseWithHTTP2<Schema$DeleteBranchResponse>>;
12317
+ deleteBranch(
12318
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch,
11986
12319
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
11987
12320
  callback: BodyResponseCallback<Readable>
11988
12321
  ): void;
11989
- fetchFileDiff(
11990
- params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12322
+ deleteBranch(
12323
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch,
11991
12324
  options:
11992
- MethodOptions | BodyResponseCallback<Schema$FetchFileDiffResponse>,
11993
- callback: BodyResponseCallback<Schema$FetchFileDiffResponse>
12325
+ MethodOptions | BodyResponseCallback<Schema$DeleteBranchResponse>,
12326
+ callback: BodyResponseCallback<Schema$DeleteBranchResponse>
11994
12327
  ): void;
11995
- fetchFileDiff(
11996
- params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
11997
- callback: BodyResponseCallback<Schema$FetchFileDiffResponse>
12328
+ deleteBranch(
12329
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch,
12330
+ callback: BodyResponseCallback<Schema$DeleteBranchResponse>
11998
12331
  ): void;
11999
- fetchFileDiff(
12000
- callback: BodyResponseCallback<Schema$FetchFileDiffResponse>
12332
+ deleteBranch(
12333
+ callback: BodyResponseCallback<Schema$DeleteBranchResponse>
12001
12334
  ): void;
12002
- fetchFileDiff(
12335
+ deleteBranch(
12003
12336
  paramsOrCallback?:
12004
- | Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff
12337
+ | Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch
12338
+ | BodyResponseCallback<Schema$DeleteBranchResponse>
12339
+ | BodyResponseCallback<Readable>,
12340
+ optionsOrCallback?:
12341
+ | MethodOptions
12342
+ | StreamMethodOptions
12343
+ | BodyResponseCallback<Schema$DeleteBranchResponse>
12344
+ | BodyResponseCallback<Readable>,
12345
+ callback?:
12346
+ | BodyResponseCallback<Schema$DeleteBranchResponse>
12347
+ | BodyResponseCallback<Readable>
12348
+ ):
12349
+ | void
12350
+ | Promise<GaxiosResponseWithHTTP2<Schema$DeleteBranchResponse>>
12351
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
12352
+ let params = (paramsOrCallback ||
12353
+ {}) as Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch;
12354
+ let options = (optionsOrCallback || {}) as MethodOptions;
12355
+
12356
+ if (typeof paramsOrCallback === 'function') {
12357
+ callback = paramsOrCallback;
12358
+ params =
12359
+ {} as Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch;
12360
+ options = {};
12361
+ }
12362
+
12363
+ if (typeof optionsOrCallback === 'function') {
12364
+ callback = optionsOrCallback;
12365
+ options = {};
12366
+ }
12367
+
12368
+ const rootUrl = options.rootUrl || 'https://dataform.googleapis.com/';
12369
+ const parameters = {
12370
+ options: Object.assign(
12371
+ {
12372
+ url: (rootUrl + '/v1beta1/{+name}:deleteBranch').replace(
12373
+ /([^:]\/)\/+/g,
12374
+ '$1'
12375
+ ),
12376
+ method: 'POST',
12377
+ apiVersion: '',
12378
+ },
12379
+ options
12380
+ ),
12381
+ params,
12382
+ requiredParams: ['name'],
12383
+ pathParams: ['name'],
12384
+ context: this.context,
12385
+ };
12386
+ if (callback) {
12387
+ createAPIRequest<Schema$DeleteBranchResponse>(
12388
+ parameters,
12389
+ callback as BodyResponseCallback<unknown>
12390
+ );
12391
+ } else {
12392
+ return createAPIRequest<Schema$DeleteBranchResponse>(parameters);
12393
+ }
12394
+ }
12395
+
12396
+ /**
12397
+ * Fetches branches in a Workspace.
12398
+ * @example
12399
+ * ```js
12400
+ * // Before running the sample:
12401
+ * // - Enable the API at:
12402
+ * // https://console.developers.google.com/apis/api/dataform.googleapis.com
12403
+ * // - Login into gcloud by running:
12404
+ * // ```sh
12405
+ * // $ gcloud auth application-default login
12406
+ * // ```
12407
+ * // - Install the npm module by running:
12408
+ * // ```sh
12409
+ * // $ npm install googleapis
12410
+ * // ```
12411
+ *
12412
+ * const {google} = require('googleapis');
12413
+ * const dataform = google.dataform('v1beta1');
12414
+ *
12415
+ * async function main() {
12416
+ * const auth = new google.auth.GoogleAuth({
12417
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
12418
+ * scopes: [
12419
+ * 'https://www.googleapis.com/auth/bigquery',
12420
+ * 'https://www.googleapis.com/auth/cloud-platform',
12421
+ * ],
12422
+ * });
12423
+ *
12424
+ * // Acquire an auth client, and bind it to all future calls
12425
+ * const authClient = await auth.getClient();
12426
+ * google.options({auth: authClient});
12427
+ *
12428
+ * // Do the magic
12429
+ * const res =
12430
+ * await dataform.projects.locations.repositories.workspaces.fetchBranches({
12431
+ * // Optional. Filter for the returned list.
12432
+ * filter: 'placeholder-value',
12433
+ * // Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
12434
+ * name: 'projects/my-project/locations/my-location/repositories/my-repositorie/workspaces/my-workspace',
12435
+ * // Optional. Maximum number of branches to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000.
12436
+ * pageSize: 'placeholder-value',
12437
+ * // Optional. Page token received from a previous `FetchWorkspaceBranches` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchWorkspaceBranches`, with the exception of `page_size`, must match the call that provided the page token.
12438
+ * pageToken: 'placeholder-value',
12439
+ * });
12440
+ * console.log(res.data);
12441
+ *
12442
+ * // Example response
12443
+ * // {
12444
+ * // "branches": [],
12445
+ * // "nextPageToken": "my_nextPageToken"
12446
+ * // }
12447
+ * }
12448
+ *
12449
+ * main().catch(e => {
12450
+ * console.error(e);
12451
+ * throw e;
12452
+ * });
12453
+ *
12454
+ * ```
12455
+ *
12456
+ * @param params - Parameters for request
12457
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
12458
+ * @param callback - Optional callback that handles the response.
12459
+ * @returns A promise if used with async/await, or void if used with a callback.
12460
+ */
12461
+ fetchBranches(
12462
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches,
12463
+ options: StreamMethodOptions
12464
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
12465
+ fetchBranches(
12466
+ params?: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches,
12467
+ options?: MethodOptions
12468
+ ): Promise<GaxiosResponseWithHTTP2<Schema$FetchWorkspaceBranchesResponse>>;
12469
+ fetchBranches(
12470
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches,
12471
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
12472
+ callback: BodyResponseCallback<Readable>
12473
+ ): void;
12474
+ fetchBranches(
12475
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches,
12476
+ options:
12477
+ | MethodOptions
12478
+ | BodyResponseCallback<Schema$FetchWorkspaceBranchesResponse>,
12479
+ callback: BodyResponseCallback<Schema$FetchWorkspaceBranchesResponse>
12480
+ ): void;
12481
+ fetchBranches(
12482
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches,
12483
+ callback: BodyResponseCallback<Schema$FetchWorkspaceBranchesResponse>
12484
+ ): void;
12485
+ fetchBranches(
12486
+ callback: BodyResponseCallback<Schema$FetchWorkspaceBranchesResponse>
12487
+ ): void;
12488
+ fetchBranches(
12489
+ paramsOrCallback?:
12490
+ | Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches
12491
+ | BodyResponseCallback<Schema$FetchWorkspaceBranchesResponse>
12492
+ | BodyResponseCallback<Readable>,
12493
+ optionsOrCallback?:
12494
+ | MethodOptions
12495
+ | StreamMethodOptions
12496
+ | BodyResponseCallback<Schema$FetchWorkspaceBranchesResponse>
12497
+ | BodyResponseCallback<Readable>,
12498
+ callback?:
12499
+ | BodyResponseCallback<Schema$FetchWorkspaceBranchesResponse>
12500
+ | BodyResponseCallback<Readable>
12501
+ ):
12502
+ | void
12503
+ | Promise<GaxiosResponseWithHTTP2<Schema$FetchWorkspaceBranchesResponse>>
12504
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
12505
+ let params = (paramsOrCallback ||
12506
+ {}) as Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches;
12507
+ let options = (optionsOrCallback || {}) as MethodOptions;
12508
+
12509
+ if (typeof paramsOrCallback === 'function') {
12510
+ callback = paramsOrCallback;
12511
+ params =
12512
+ {} as Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches;
12513
+ options = {};
12514
+ }
12515
+
12516
+ if (typeof optionsOrCallback === 'function') {
12517
+ callback = optionsOrCallback;
12518
+ options = {};
12519
+ }
12520
+
12521
+ const rootUrl = options.rootUrl || 'https://dataform.googleapis.com/';
12522
+ const parameters = {
12523
+ options: Object.assign(
12524
+ {
12525
+ url: (rootUrl + '/v1beta1/{+name}:fetchBranches').replace(
12526
+ /([^:]\/)\/+/g,
12527
+ '$1'
12528
+ ),
12529
+ method: 'GET',
12530
+ apiVersion: '',
12531
+ },
12532
+ options
12533
+ ),
12534
+ params,
12535
+ requiredParams: ['name'],
12536
+ pathParams: ['name'],
12537
+ context: this.context,
12538
+ };
12539
+ if (callback) {
12540
+ createAPIRequest<Schema$FetchWorkspaceBranchesResponse>(
12541
+ parameters,
12542
+ callback as BodyResponseCallback<unknown>
12543
+ );
12544
+ } else {
12545
+ return createAPIRequest<Schema$FetchWorkspaceBranchesResponse>(
12546
+ parameters
12547
+ );
12548
+ }
12549
+ }
12550
+
12551
+ /**
12552
+ * Fetches the current branch of a Workspace.
12553
+ * @example
12554
+ * ```js
12555
+ * // Before running the sample:
12556
+ * // - Enable the API at:
12557
+ * // https://console.developers.google.com/apis/api/dataform.googleapis.com
12558
+ * // - Login into gcloud by running:
12559
+ * // ```sh
12560
+ * // $ gcloud auth application-default login
12561
+ * // ```
12562
+ * // - Install the npm module by running:
12563
+ * // ```sh
12564
+ * // $ npm install googleapis
12565
+ * // ```
12566
+ *
12567
+ * const {google} = require('googleapis');
12568
+ * const dataform = google.dataform('v1beta1');
12569
+ *
12570
+ * async function main() {
12571
+ * const auth = new google.auth.GoogleAuth({
12572
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
12573
+ * scopes: [
12574
+ * 'https://www.googleapis.com/auth/bigquery',
12575
+ * 'https://www.googleapis.com/auth/cloud-platform',
12576
+ * ],
12577
+ * });
12578
+ *
12579
+ * // Acquire an auth client, and bind it to all future calls
12580
+ * const authClient = await auth.getClient();
12581
+ * google.options({auth: authClient});
12582
+ *
12583
+ * // Do the magic
12584
+ * const res =
12585
+ * await dataform.projects.locations.repositories.workspaces.fetchCurrentBranch(
12586
+ * {
12587
+ * // Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
12588
+ * name: 'projects/my-project/locations/my-location/repositories/my-repositorie/workspaces/my-workspace',
12589
+ * },
12590
+ * );
12591
+ * console.log(res.data);
12592
+ *
12593
+ * // Example response
12594
+ * // {
12595
+ * // "branchName": "my_branchName"
12596
+ * // }
12597
+ * }
12598
+ *
12599
+ * main().catch(e => {
12600
+ * console.error(e);
12601
+ * throw e;
12602
+ * });
12603
+ *
12604
+ * ```
12605
+ *
12606
+ * @param params - Parameters for request
12607
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
12608
+ * @param callback - Optional callback that handles the response.
12609
+ * @returns A promise if used with async/await, or void if used with a callback.
12610
+ */
12611
+ fetchCurrentBranch(
12612
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch,
12613
+ options: StreamMethodOptions
12614
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
12615
+ fetchCurrentBranch(
12616
+ params?: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch,
12617
+ options?: MethodOptions
12618
+ ): Promise<
12619
+ GaxiosResponseWithHTTP2<Schema$FetchCurrentWorkspaceBranchResponse>
12620
+ >;
12621
+ fetchCurrentBranch(
12622
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch,
12623
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
12624
+ callback: BodyResponseCallback<Readable>
12625
+ ): void;
12626
+ fetchCurrentBranch(
12627
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch,
12628
+ options:
12629
+ | MethodOptions
12630
+ | BodyResponseCallback<Schema$FetchCurrentWorkspaceBranchResponse>,
12631
+ callback: BodyResponseCallback<Schema$FetchCurrentWorkspaceBranchResponse>
12632
+ ): void;
12633
+ fetchCurrentBranch(
12634
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch,
12635
+ callback: BodyResponseCallback<Schema$FetchCurrentWorkspaceBranchResponse>
12636
+ ): void;
12637
+ fetchCurrentBranch(
12638
+ callback: BodyResponseCallback<Schema$FetchCurrentWorkspaceBranchResponse>
12639
+ ): void;
12640
+ fetchCurrentBranch(
12641
+ paramsOrCallback?:
12642
+ | Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch
12643
+ | BodyResponseCallback<Schema$FetchCurrentWorkspaceBranchResponse>
12644
+ | BodyResponseCallback<Readable>,
12645
+ optionsOrCallback?:
12646
+ | MethodOptions
12647
+ | StreamMethodOptions
12648
+ | BodyResponseCallback<Schema$FetchCurrentWorkspaceBranchResponse>
12649
+ | BodyResponseCallback<Readable>,
12650
+ callback?:
12651
+ | BodyResponseCallback<Schema$FetchCurrentWorkspaceBranchResponse>
12652
+ | BodyResponseCallback<Readable>
12653
+ ):
12654
+ | void
12655
+ | Promise<
12656
+ GaxiosResponseWithHTTP2<Schema$FetchCurrentWorkspaceBranchResponse>
12657
+ >
12658
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
12659
+ let params = (paramsOrCallback ||
12660
+ {}) as Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch;
12661
+ let options = (optionsOrCallback || {}) as MethodOptions;
12662
+
12663
+ if (typeof paramsOrCallback === 'function') {
12664
+ callback = paramsOrCallback;
12665
+ params =
12666
+ {} as Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch;
12667
+ options = {};
12668
+ }
12669
+
12670
+ if (typeof optionsOrCallback === 'function') {
12671
+ callback = optionsOrCallback;
12672
+ options = {};
12673
+ }
12674
+
12675
+ const rootUrl = options.rootUrl || 'https://dataform.googleapis.com/';
12676
+ const parameters = {
12677
+ options: Object.assign(
12678
+ {
12679
+ url: (rootUrl + '/v1beta1/{+name}:fetchCurrentBranch').replace(
12680
+ /([^:]\/)\/+/g,
12681
+ '$1'
12682
+ ),
12683
+ method: 'GET',
12684
+ apiVersion: '',
12685
+ },
12686
+ options
12687
+ ),
12688
+ params,
12689
+ requiredParams: ['name'],
12690
+ pathParams: ['name'],
12691
+ context: this.context,
12692
+ };
12693
+ if (callback) {
12694
+ createAPIRequest<Schema$FetchCurrentWorkspaceBranchResponse>(
12695
+ parameters,
12696
+ callback as BodyResponseCallback<unknown>
12697
+ );
12698
+ } else {
12699
+ return createAPIRequest<Schema$FetchCurrentWorkspaceBranchResponse>(
12700
+ parameters
12701
+ );
12702
+ }
12703
+ }
12704
+
12705
+ /**
12706
+ * Fetches Git diff for an uncommitted file in a Workspace.
12707
+ * @example
12708
+ * ```js
12709
+ * // Before running the sample:
12710
+ * // - Enable the API at:
12711
+ * // https://console.developers.google.com/apis/api/dataform.googleapis.com
12712
+ * // - Login into gcloud by running:
12713
+ * // ```sh
12714
+ * // $ gcloud auth application-default login
12715
+ * // ```
12716
+ * // - Install the npm module by running:
12717
+ * // ```sh
12718
+ * // $ npm install googleapis
12719
+ * // ```
12720
+ *
12721
+ * const {google} = require('googleapis');
12722
+ * const dataform = google.dataform('v1beta1');
12723
+ *
12724
+ * async function main() {
12725
+ * const auth = new google.auth.GoogleAuth({
12726
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
12727
+ * scopes: [
12728
+ * 'https://www.googleapis.com/auth/bigquery',
12729
+ * 'https://www.googleapis.com/auth/cloud-platform',
12730
+ * ],
12731
+ * });
12732
+ *
12733
+ * // Acquire an auth client, and bind it to all future calls
12734
+ * const authClient = await auth.getClient();
12735
+ * google.options({auth: authClient});
12736
+ *
12737
+ * // Do the magic
12738
+ * const res =
12739
+ * await dataform.projects.locations.repositories.workspaces.fetchFileDiff({
12740
+ * // Required. The file's full path including filename, relative to the workspace root.
12741
+ * path: 'placeholder-value',
12742
+ * // Required. The workspace's name.
12743
+ * workspace:
12744
+ * 'projects/my-project/locations/my-location/repositories/my-repositorie/workspaces/my-workspace',
12745
+ * });
12746
+ * console.log(res.data);
12747
+ *
12748
+ * // Example response
12749
+ * // {
12750
+ * // "formattedDiff": "my_formattedDiff"
12751
+ * // }
12752
+ * }
12753
+ *
12754
+ * main().catch(e => {
12755
+ * console.error(e);
12756
+ * throw e;
12757
+ * });
12758
+ *
12759
+ * ```
12760
+ *
12761
+ * @param params - Parameters for request
12762
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
12763
+ * @param callback - Optional callback that handles the response.
12764
+ * @returns A promise if used with async/await, or void if used with a callback.
12765
+ */
12766
+ fetchFileDiff(
12767
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12768
+ options: StreamMethodOptions
12769
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
12770
+ fetchFileDiff(
12771
+ params?: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12772
+ options?: MethodOptions
12773
+ ): Promise<GaxiosResponseWithHTTP2<Schema$FetchFileDiffResponse>>;
12774
+ fetchFileDiff(
12775
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12776
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
12777
+ callback: BodyResponseCallback<Readable>
12778
+ ): void;
12779
+ fetchFileDiff(
12780
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12781
+ options:
12782
+ MethodOptions | BodyResponseCallback<Schema$FetchFileDiffResponse>,
12783
+ callback: BodyResponseCallback<Schema$FetchFileDiffResponse>
12784
+ ): void;
12785
+ fetchFileDiff(
12786
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff,
12787
+ callback: BodyResponseCallback<Schema$FetchFileDiffResponse>
12788
+ ): void;
12789
+ fetchFileDiff(
12790
+ callback: BodyResponseCallback<Schema$FetchFileDiffResponse>
12791
+ ): void;
12792
+ fetchFileDiff(
12793
+ paramsOrCallback?:
12794
+ | Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff
12005
12795
  | BodyResponseCallback<Schema$FetchFileDiffResponse>
12006
12796
  | BodyResponseCallback<Readable>,
12007
12797
  optionsOrCallback?:
@@ -12404,10 +13194,14 @@ export namespace dataform_v1beta1 {
12404
13194
  * // {
12405
13195
  * // "createTime": "my_createTime",
12406
13196
  * // "dataEncryptionState": {},
13197
+ * // "depth": 0,
12407
13198
  * // "disableMoves": false,
13199
+ * // "enableBranchManagement": false,
12408
13200
  * // "internalMetadata": "my_internalMetadata",
12409
13201
  * // "name": "my_name",
12410
- * // "privateResourceMetadata": {}
13202
+ * // "originalBranch": "my_originalBranch",
13203
+ * // "privateResourceMetadata": {},
13204
+ * // "shallow": false
12411
13205
  * // }
12412
13206
  * }
12413
13207
  *
@@ -12692,7 +13486,9 @@ export namespace dataform_v1beta1 {
12692
13486
  * // Request body metadata
12693
13487
  * requestBody: {
12694
13488
  * // request body parameters
12695
- * // {}
13489
+ * // {
13490
+ * // "pipelineConfig": {}
13491
+ * // }
12696
13492
  * },
12697
13493
  * },
12698
13494
  * );
@@ -14771,6 +15567,160 @@ export namespace dataform_v1beta1 {
14771
15567
  }
14772
15568
  }
14773
15569
 
15570
+ /**
15571
+ * Syncs the refs of a Workspace.
15572
+ * @example
15573
+ * ```js
15574
+ * // Before running the sample:
15575
+ * // - Enable the API at:
15576
+ * // https://console.developers.google.com/apis/api/dataform.googleapis.com
15577
+ * // - Login into gcloud by running:
15578
+ * // ```sh
15579
+ * // $ gcloud auth application-default login
15580
+ * // ```
15581
+ * // - Install the npm module by running:
15582
+ * // ```sh
15583
+ * // $ npm install googleapis
15584
+ * // ```
15585
+ *
15586
+ * const {google} = require('googleapis');
15587
+ * const dataform = google.dataform('v1beta1');
15588
+ *
15589
+ * async function main() {
15590
+ * const auth = new google.auth.GoogleAuth({
15591
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
15592
+ * scopes: [
15593
+ * 'https://www.googleapis.com/auth/bigquery',
15594
+ * 'https://www.googleapis.com/auth/cloud-platform',
15595
+ * ],
15596
+ * });
15597
+ *
15598
+ * // Acquire an auth client, and bind it to all future calls
15599
+ * const authClient = await auth.getClient();
15600
+ * google.options({auth: authClient});
15601
+ *
15602
+ * // Do the magic
15603
+ * const res =
15604
+ * await dataform.projects.locations.repositories.workspaces.syncWorkspaceRefs(
15605
+ * {
15606
+ * // Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
15607
+ * name: 'projects/my-project/locations/my-location/repositories/my-repositorie/workspaces/my-workspace',
15608
+ *
15609
+ * // Request body metadata
15610
+ * requestBody: {
15611
+ * // request body parameters
15612
+ * // {
15613
+ * // "deepen": 0,
15614
+ * // "remoteBranchName": "my_remoteBranchName"
15615
+ * // }
15616
+ * },
15617
+ * },
15618
+ * );
15619
+ * console.log(res.data);
15620
+ *
15621
+ * // Example response
15622
+ * // {}
15623
+ * }
15624
+ *
15625
+ * main().catch(e => {
15626
+ * console.error(e);
15627
+ * throw e;
15628
+ * });
15629
+ *
15630
+ * ```
15631
+ *
15632
+ * @param params - Parameters for request
15633
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
15634
+ * @param callback - Optional callback that handles the response.
15635
+ * @returns A promise if used with async/await, or void if used with a callback.
15636
+ */
15637
+ syncWorkspaceRefs(
15638
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs,
15639
+ options: StreamMethodOptions
15640
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
15641
+ syncWorkspaceRefs(
15642
+ params?: Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs,
15643
+ options?: MethodOptions
15644
+ ): Promise<GaxiosResponseWithHTTP2<Schema$SyncWorkspaceRefsResponse>>;
15645
+ syncWorkspaceRefs(
15646
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs,
15647
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
15648
+ callback: BodyResponseCallback<Readable>
15649
+ ): void;
15650
+ syncWorkspaceRefs(
15651
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs,
15652
+ options:
15653
+ MethodOptions | BodyResponseCallback<Schema$SyncWorkspaceRefsResponse>,
15654
+ callback: BodyResponseCallback<Schema$SyncWorkspaceRefsResponse>
15655
+ ): void;
15656
+ syncWorkspaceRefs(
15657
+ params: Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs,
15658
+ callback: BodyResponseCallback<Schema$SyncWorkspaceRefsResponse>
15659
+ ): void;
15660
+ syncWorkspaceRefs(
15661
+ callback: BodyResponseCallback<Schema$SyncWorkspaceRefsResponse>
15662
+ ): void;
15663
+ syncWorkspaceRefs(
15664
+ paramsOrCallback?:
15665
+ | Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs
15666
+ | BodyResponseCallback<Schema$SyncWorkspaceRefsResponse>
15667
+ | BodyResponseCallback<Readable>,
15668
+ optionsOrCallback?:
15669
+ | MethodOptions
15670
+ | StreamMethodOptions
15671
+ | BodyResponseCallback<Schema$SyncWorkspaceRefsResponse>
15672
+ | BodyResponseCallback<Readable>,
15673
+ callback?:
15674
+ | BodyResponseCallback<Schema$SyncWorkspaceRefsResponse>
15675
+ | BodyResponseCallback<Readable>
15676
+ ):
15677
+ | void
15678
+ | Promise<GaxiosResponseWithHTTP2<Schema$SyncWorkspaceRefsResponse>>
15679
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
15680
+ let params = (paramsOrCallback ||
15681
+ {}) as Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs;
15682
+ let options = (optionsOrCallback || {}) as MethodOptions;
15683
+
15684
+ if (typeof paramsOrCallback === 'function') {
15685
+ callback = paramsOrCallback;
15686
+ params =
15687
+ {} as Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs;
15688
+ options = {};
15689
+ }
15690
+
15691
+ if (typeof optionsOrCallback === 'function') {
15692
+ callback = optionsOrCallback;
15693
+ options = {};
15694
+ }
15695
+
15696
+ const rootUrl = options.rootUrl || 'https://dataform.googleapis.com/';
15697
+ const parameters = {
15698
+ options: Object.assign(
15699
+ {
15700
+ url: (rootUrl + '/v1beta1/{+name}:syncWorkspaceRefs').replace(
15701
+ /([^:]\/)\/+/g,
15702
+ '$1'
15703
+ ),
15704
+ method: 'POST',
15705
+ apiVersion: '',
15706
+ },
15707
+ options
15708
+ ),
15709
+ params,
15710
+ requiredParams: ['name'],
15711
+ pathParams: ['name'],
15712
+ context: this.context,
15713
+ };
15714
+ if (callback) {
15715
+ createAPIRequest<Schema$SyncWorkspaceRefsResponse>(
15716
+ parameters,
15717
+ callback as BodyResponseCallback<unknown>
15718
+ );
15719
+ } else {
15720
+ return createAPIRequest<Schema$SyncWorkspaceRefsResponse>(parameters);
15721
+ }
15722
+ }
15723
+
14774
15724
  /**
14775
15725
  * 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.
14776
15726
  * @example
@@ -15078,6 +16028,17 @@ export namespace dataform_v1beta1 {
15078
16028
  }
15079
16029
  }
15080
16030
 
16031
+ export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Checkout extends StandardParameters {
16032
+ /**
16033
+ * Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
16034
+ */
16035
+ name?: string;
16036
+
16037
+ /**
16038
+ * Request body metadata
16039
+ */
16040
+ requestBody?: Schema$CheckoutWorkspaceBranchRequest;
16041
+ }
15081
16042
  export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Commit extends StandardParameters {
15082
16043
  /**
15083
16044
  * Required. The workspace's name.
@@ -15110,6 +16071,41 @@ export namespace dataform_v1beta1 {
15110
16071
  */
15111
16072
  name?: string;
15112
16073
  }
16074
+ export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Deletebranch extends StandardParameters {
16075
+ /**
16076
+ * Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
16077
+ */
16078
+ name?: string;
16079
+
16080
+ /**
16081
+ * Request body metadata
16082
+ */
16083
+ requestBody?: Schema$DeleteBranchRequest;
16084
+ }
16085
+ export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchbranches extends StandardParameters {
16086
+ /**
16087
+ * Optional. Filter for the returned list.
16088
+ */
16089
+ filter?: string;
16090
+ /**
16091
+ * Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
16092
+ */
16093
+ name?: string;
16094
+ /**
16095
+ * Optional. Maximum number of branches to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000.
16096
+ */
16097
+ pageSize?: number;
16098
+ /**
16099
+ * Optional. Page token received from a previous `FetchWorkspaceBranches` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchWorkspaceBranches`, with the exception of `page_size`, must match the call that provided the page token.
16100
+ */
16101
+ pageToken?: string;
16102
+ }
16103
+ export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchcurrentbranch extends StandardParameters {
16104
+ /**
16105
+ * Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
16106
+ */
16107
+ name?: string;
16108
+ }
15113
16109
  export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Fetchfilediff extends StandardParameters {
15114
16110
  /**
15115
16111
  * Required. The file's full path including filename, relative to the workspace root.
@@ -15338,6 +16334,17 @@ export namespace dataform_v1beta1 {
15338
16334
  */
15339
16335
  requestBody?: Schema$SetIamPolicyRequest;
15340
16336
  }
16337
+ export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Syncworkspacerefs extends StandardParameters {
16338
+ /**
16339
+ * Required. The workspace resource name. Format: projects/{project\}/locations/{location\}/repositories/{repository\}/workspaces/{workspace\}
16340
+ */
16341
+ name?: string;
16342
+
16343
+ /**
16344
+ * Request body metadata
16345
+ */
16346
+ requestBody?: Schema$SyncWorkspaceRefsRequest;
16347
+ }
15341
16348
  export interface Params$Resource$Projects$Locations$Repositories$Workspaces$Testiampermissions extends StandardParameters {
15342
16349
  /**
15343
16350
  * REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.