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

docs: reorder some fields

PiperOrigin-RevId: 389907245
  • Loading branch information
Google APIs authored and Copybara-Service committed Aug 10, 2021
1 parent 4c984f3 commit 114b141
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 31 deletions.
50 changes: 25 additions & 25 deletions google/cloud/dialogflow/cx/v3beta1/audio_config.proto
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
24 changes: 24 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/dialogflow_v3beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ documentation:
For more information, see the
[Dialogflow documentation](https://cloud.google.com/dialogflow/docs).
rules:
- selector: google.cloud.location.Locations.GetLocation
description: Gets information about a location.

- selector: google.cloud.location.Locations.ListLocations
description: Lists information about the supported locations for this service.

backend:
rules:
Expand Down Expand Up @@ -94,11 +100,19 @@ backend:
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Webhooks.*'
deadline: 60.0
- selector: google.cloud.location.Locations.GetLocation
deadline: 60.0
- selector: google.cloud.location.Locations.ListLocations
deadline: 60.0
- selector: 'google.longrunning.Operations.*'
deadline: 60.0

http:
rules:
- selector: google.cloud.location.Locations.GetLocation
get: '/v3beta1/{name=projects/*/locations/*}'
- selector: google.cloud.location.Locations.ListLocations
get: '/v3beta1/{name=projects/*}/locations'
- selector: google.longrunning.Operations.CancelOperation
post: '/v3beta1/{name=projects/*/operations/*}:cancel'
additional_bindings:
Expand Down Expand Up @@ -184,6 +198,16 @@ authentication:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/dialogflow
- selector: google.cloud.location.Locations.GetLocation
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/dialogflow
- selector: google.cloud.location.Locations.ListLocations
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/dialogflow
- selector: 'google.longrunning.Operations.*'
oauth:
canonical_scopes: |-
Expand Down
42 changes: 36 additions & 6 deletions google/cloud/dialogflow/cx/v3beta1/security_settings.proto
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;
}

0 comments on commit 114b141

Please sign in to comment.