Skip to content

Commit

Permalink
feat: added support for DLP templates; expose Locations service to …
Browse files Browse the repository at this point in the history
…get/list avaliable locations of Dialogflow products (#162)

PiperOrigin-RevId: 389939863

Source-Link: googleapis/googleapis@626df52

Source-Link: googleapis/googleapis-gen@6d110f5
  • Loading branch information
gcf-owl-bot[bot] authored Aug 10, 2021
1 parent af5d66c commit fa38ab8
Show file tree
Hide file tree
Showing 10 changed files with 1,475 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ option java_multiple_files = true;
option java_outer_classname = "SecuritySettingsProto";
option java_package = "com.google.cloud.dialogflow.cx.v3";
option objc_class_prefix = "DF";
option (google.api.resource_definition) = {
type: "dlp.googleapis.com/InspectTemplate"
pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}"
pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}"
};
option (google.api.resource_definition) = {
type: "dlp.googleapis.com/DeidentifyTemplate"
pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}"
pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}"
};

// Service for managing security settings for Dialogflow.
service SecuritySettingsService {
Expand Down Expand Up @@ -234,11 +244,31 @@ message SecuritySettings {
// If empty, we use the default DLP inspect config.
//
// The template name will have one of the following formats:
// `projects/<Project ID>/inspectTemplates/<Template ID>` OR
// `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
// ID>` OR
// `organizations/<Organization ID>/inspectTemplates/<Template ID>`
string inspect_template = 9;
// ID>` OR `organizations/<Organization ID>/locations/<Location
// ID>/inspectTemplates/<Template ID>`
//
// Note: `inspect_template` must be located in the same region as the
// `SecuritySettings`.
string inspect_template = 9 [(google.api.resource_reference) = {
type: "dlp.googleapis.com/InspectTemplate"
}];

// [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this
// template to define de-identification configuration for the content.
//
// If empty, Dialogflow replaces sensitive info with `[redacted]` text.
//
// The template name will have one of the following formats:
// `projects/<Project ID>/locations/<Location
// ID>/deidentifyTemplates/<Template ID>` OR `organizations/<Organization
// ID>/locations/<Location ID>/deidentifyTemplates/<Template ID>`
//
// Note: `deidentify_template` must be located in the same region as the
// `SecuritySettings`.
string deidentify_template = 17 [(google.api.resource_reference) = {
type: "dlp.googleapis.com/DeidentifyTemplate"
}];

// Specifies how data is retained. Note that even if the data is
// purged due to retention policy, we may still hold it in backup storage for
Expand All @@ -259,10 +289,10 @@ message SecuritySettings {
// List of types of data to remove when retention settings triggers purge.
repeated PurgeDataType purge_data_types = 8;

// Optional. Controls conversation exporting settings to Insights after conversation is
// Controls conversation exporting settings to Insights after conversation is
// completed.
//
// If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
// Insights export is disabled no matter what you configure here.
InsightsExportSettings insights_export_settings = 13 [(google.api.field_behavior) = OPTIONAL];
InsightsExportSettings insights_export_settings = 13;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,31 @@ option java_outer_classname = "AudioConfigProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;

// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;

// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;

// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}

// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
// [Cloud Speech API
Expand Down Expand Up @@ -78,31 +103,6 @@ enum AudioEncoding {
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
}

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;

// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;

// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;

// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}

// Instructs the speech recognizer on how to process the audio content.
message InputAudioConfig {
// Required. Audio encoding of the audio content to process.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ option java_multiple_files = true;
option java_outer_classname = "SecuritySettingsProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";
option (google.api.resource_definition) = {
type: "dlp.googleapis.com/InspectTemplate"
pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}"
pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}"
};
option (google.api.resource_definition) = {
type: "dlp.googleapis.com/DeidentifyTemplate"
pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}"
pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}"
};

// Service for managing security settings for Dialogflow.
service SecuritySettingsService {
Expand Down Expand Up @@ -234,11 +244,31 @@ message SecuritySettings {
// If empty, we use the default DLP inspect config.
//
// The template name will have one of the following formats:
// `projects/<Project ID>/inspectTemplates/<Template ID>` OR
// `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
// ID>` OR
// `organizations/<Organization ID>/inspectTemplates/<Template ID>`
string inspect_template = 9;
// ID>` OR `organizations/<Organization ID>/locations/<Location
// ID>/inspectTemplates/<Template ID>`
//
// Note: `inspect_template` must be located in the same region as the
// `SecuritySettings`.
string inspect_template = 9 [(google.api.resource_reference) = {
type: "dlp.googleapis.com/InspectTemplate"
}];

// [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this
// template to define de-identification configuration for the content.
//
// If empty, Dialogflow replaces sensitive info with `[redacted]` text.
//
// The template name will have one of the following formats:
// `projects/<Project ID>/locations/<Location
// ID>/deidentifyTemplates/<Template ID>` OR `organizations/<Organization
// ID>/locations/<Location ID>/deidentifyTemplates/<Template ID>`
//
// Note: `deidentify_template` must be located in the same region as the
// `SecuritySettings`.
string deidentify_template = 17 [(google.api.resource_reference) = {
type: "dlp.googleapis.com/DeidentifyTemplate"
}];

// Specifies how data is retained. Note that even if the data is
// purged due to retention policy, we may still hold it in backup storage for
Expand All @@ -259,10 +289,10 @@ message SecuritySettings {
// List of types of data to remove when retention settings triggers purge.
repeated PurgeDataType purge_data_types = 8;

// Optional. Controls conversation exporting settings to Insights after conversation is
// Controls conversation exporting settings to Insights after conversation is
// completed.
//
// If [retention_strategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
// Insights export is disabled no matter what you configure here.
InsightsExportSettings insights_export_settings = 13 [(google.api.field_behavior) = OPTIONAL];
InsightsExportSettings insights_export_settings = 13;
}
36 changes: 24 additions & 12 deletions packages/google-cloud-dialogflow-cx/protos/protos.d.ts

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

Loading

0 comments on commit fa38ab8

Please sign in to comment.