Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: Add WriteDisposition to BigQuery Export API (#80)
Browse files Browse the repository at this point in the history
* feat: Add WriteDisposition to BigQuery Export API

PiperOrigin-RevId: 413945427

Source-Link: googleapis/googleapis@6230f6e

Source-Link: googleapis/googleapis-gen@00cdef3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDBjZGVmMzA4ZDZkNmJhNGM3NTM1NGRlNDkxZGE0ODRmNjQyYmQ4MCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Dec 3, 2021
1 parent 594fc6d commit 3f19a63
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 0 deletions.
Expand Up @@ -607,6 +607,19 @@ message ExportInsightsDataRequest {
string table = 2;
}

// Specifies the action that occurs if the destination table already exists.
enum WriteDisposition {
// Write disposition is not specified. Defaults to WRITE_TRUNCATE.
WRITE_DISPOSITION_UNSPECIFIED = 0;

// If the table already exists, BigQuery will overwrite the table data and
// use the schema from the load.
WRITE_TRUNCATE = 1;

// If the table already exists, BigQuery will append data to the table.
WRITE_APPEND = 2;
}

// Exporter destination.
oneof destination {
// Specified if sink is a BigQuery table.
Expand All @@ -629,6 +642,9 @@ message ExportInsightsDataRequest {
// Format:
// projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version}
string kms_key = 4;

// Options for what to do if the destination table already exists.
WriteDisposition write_disposition = 5;
}

// Metadata for an export insights operation.
Expand Down
13 changes: 13 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -38,6 +38,10 @@ function main(parent) {
* projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version}
*/
// const kmsKey = 'abc123'
/**
* Options for what to do if the destination table already exists.
*/
// const writeDisposition = {}

// Imports the Contactcenterinsights library
const {ContactCenterInsightsClient} =
Expand Down
2 changes: 2 additions & 0 deletions src/v1/contact_center_insights_client.ts
Expand Up @@ -2586,6 +2586,8 @@ export class ContactCenterInsightsClient {
* A fully qualified KMS key name for BigQuery tables protected by CMEK.
* Format:
* projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version}
* @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition} request.writeDisposition
* Options for what to do if the destination table already exists.
* @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.
Expand Down

0 comments on commit 3f19a63

Please sign in to comment.