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

Commit

Permalink
feat: expose Security Settings API. (#46)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/9610e861-65a2-4035-85ab-1303620c4597/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 348481983
Source-Link: googleapis/googleapis@fb36278
  • Loading branch information
yoshi-automation authored Jan 8, 2021
1 parent e0acc5d commit f6460ce
Show file tree
Hide file tree
Showing 46 changed files with 9,269 additions and 257 deletions.
1 change: 1 addition & 0 deletions protos/google/cloud/dialogflow/cx/v3beta1/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/cx/v3beta1/flow.proto";
import "google/cloud/dialogflow/cx/v3beta1/security_settings.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
Expand Down
14 changes: 7 additions & 7 deletions protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ message ResponseMessage {
bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Indicates that interaction with the Dialogflow agent has ended.
// This message is generated by Dialogflow only and not supposed to be
// defined by the user.
message EndInteraction {

}

// Represents an audio message that is composed of both segments
// synthesized from the Dialogflow agent prompts and ones hosted externally
// at the specified URIs.
Expand Down Expand Up @@ -163,6 +156,13 @@ message ResponseMessage {
repeated Segment segments = 1;
}

// Indicates that interaction with the Dialogflow agent has ended.
// This message is generated by Dialogflow only and not supposed to be
// defined by the user.
message EndInteraction {

}

// Required. The rich response message.
oneof message {
// Returns a text response.
Expand Down
246 changes: 246 additions & 0 deletions protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
// Copyright 2020 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.dialogflow.cx.v3beta1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx";
option java_multiple_files = true;
option java_outer_classname = "SecuritySettingsProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";

// Service for managing security settings for Dialogflow.
service SecuritySettingsService {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/dialogflow";

// Create security settings in the specified location.
rpc CreateSecuritySettings(CreateSecuritySettingsRequest) returns (SecuritySettings) {
option (google.api.http) = {
post: "/v3beta1/{parent=projects/*/locations/*}/securitySettings"
body: "security_settings"
};
option (google.api.method_signature) = "parent,security_settings";
}

// Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].
// The returned settings may be stale by up to 1 minute.
rpc GetSecuritySettings(GetSecuritySettingsRequest) returns (SecuritySettings) {
option (google.api.http) = {
get: "/v3beta1/{name=projects/*/locations/*/securitySettings/*}"
};
option (google.api.method_signature) = "name";
}

// Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].
rpc UpdateSecuritySettings(UpdateSecuritySettingsRequest) returns (SecuritySettings) {
option (google.api.http) = {
patch: "/v3beta1/{security_settings.name=projects/*/locations/*/securitySettings/*}"
body: "security_settings"
};
option (google.api.method_signature) = "security_settings,update_mask";
}

// Returns the list of all security settings in the specified location.
rpc ListSecuritySettings(ListSecuritySettingsRequest) returns (ListSecuritySettingsResponse) {
option (google.api.http) = {
get: "/v3beta1/{parent=projects/*/locations/*}/securitySettings"
};
option (google.api.method_signature) = "parent";
}

// Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].
rpc DeleteSecuritySettings(DeleteSecuritySettingsRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3beta1/{name=projects/*/locations/*/securitySettings/*}"
};
option (google.api.method_signature) = "name";
}
}

// The request message for [SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettings].
message GetSecuritySettingsRequest {
// Required. Resource name of the settings.
// Format: `projects/<Project ID>/locations/<Location
// ID>/securitySettings/<security settings ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/SecuritySettings"
}
];
}

// The request message for [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings].
message UpdateSecuritySettingsRequest {
// Required. [SecuritySettings] object that contains values for each of the
// fields to update.
SecuritySettings security_settings = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The mask to control which fields get updated. If the mask is not present,
// all fields will be updated.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}

// The request message for [SecuritySettings.ListSecuritySettings][].
message ListSecuritySettingsRequest {
// Required. The location to list all security settings for.
// Format: `projects/<Project ID>/locations/<Location ID>`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "dialogflow.googleapis.com/SecuritySettings"
}
];

// The maximum number of items to return in a single page. By default 20 and
// at most 100.
int32 page_size = 2;

// The next_page_token value returned from a previous list request.
string page_token = 3;
}

// The response message for [SecuritySettings.ListSecuritySettings][].
message ListSecuritySettingsResponse {
// The list of security settings.
repeated SecuritySettings security_settings = 1;

// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
string next_page_token = 2;
}

// The request message for [SecuritySettings.CreateSecuritySettings][].
message CreateSecuritySettingsRequest {
// Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] for.
// Format: `projects/<Project ID>/locations/<Location ID>`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "dialogflow.googleapis.com/SecuritySettings"
}
];

// Required. The security settings to create.
SecuritySettings security_settings = 2 [(google.api.field_behavior) = REQUIRED];
}

// The request message for [SecuritySettings.DeleteSecuritySettings][].
message DeleteSecuritySettingsRequest {
// Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] to delete.
// Format: `projects/<Project ID>/locations/<Location
// ID>/securitySettings/<Security Settings ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/SecuritySettings"
}
];
}

// Represents the settings related to security issues, such as data redaction
// and data retention. It may take hours for updates on the settings to
// propagate to all the related components and take effect.
message SecuritySettings {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/SecuritySettings"
pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}"
};

// Defines how we redact data.
enum RedactionStrategy {
// Do not redact.
REDACTION_STRATEGY_UNSPECIFIED = 0;

// Call redaction service to clean up the data to be persisted.
REDACT_WITH_SERVICE = 1;
}

// Defines what types of data to redact.
enum RedactionScope {
// Don't redact any kind of data.
REDACTION_SCOPE_UNSPECIFIED = 0;

// On data to be written to disk or similar devices that are capable of
// holding data even if power is disconnected. This includes data that are
// temporarily saved on disk.
REDACT_DISK_STORAGE = 2;
}

// Type of data we purge after retention settings triggers purge.
enum PurgeDataType {
// Unspecified. Do not use.
PURGE_DATA_TYPE_UNSPECIFIED = 0;

// Dialogflow history. This does not include Stackdriver log, which is
// owned by the user not Dialogflow.
DIALOGFLOW_HISTORY = 1;
}

// Required. Resource name of the settings.
// Format: `projects/<Project ID>/locations/<Location
// ID>/securitySettings/<Security Settings ID>`.
string name = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The human-readable name of the security settings, unique within the
// location.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];

// Strategy that defines how we do redaction.
RedactionStrategy redaction_strategy = 3;

// Defines on what data we apply redaction. Note that we don't
// redact data to which we don't have access, e.g., Stackdriver logs.
RedactionScope redaction_scope = 4;

// DLP inspect template name. Use this template to define inspect base
// settings.
//
// 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
// `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
string inspect_template = 9;

// 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
// a few days without allowing direct readings.
oneof data_retention {
// Retains the data for the specified number of days.
// User must Set a value lower than Dialogflow's default 30d TTL. Setting a
// value higher than that has no effect.
// A missing value or setting to 0 also means we use Dialogflow's default
// TTL.
int32 retention_window_days = 6;
}

// List of types of data to remove when retention settings triggers purge.
repeated PurgeDataType purge_data_types = 8;
}
Loading

0 comments on commit f6460ce

Please sign in to comment.