1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.dialogflow.cx.v3; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/protobuf/timestamp.proto"; 24 25option cc_enable_arenas = true; 26option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; 27option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; 28option java_multiple_files = true; 29option java_outer_classname = "ChangelogProto"; 30option java_package = "com.google.cloud.dialogflow.cx.v3"; 31option objc_class_prefix = "DF"; 32option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; 33 34// Service for managing [Changelogs][google.cloud.dialogflow.cx.v3.Changelog]. 35service Changelogs { 36 option (google.api.default_host) = "dialogflow.googleapis.com"; 37 option (google.api.oauth_scopes) = 38 "https://www.googleapis.com/auth/cloud-platform," 39 "https://www.googleapis.com/auth/dialogflow"; 40 41 // Returns the list of Changelogs. 42 rpc ListChangelogs(ListChangelogsRequest) returns (ListChangelogsResponse) { 43 option (google.api.http) = { 44 get: "/v3/{parent=projects/*/locations/*/agents/*}/changelogs" 45 }; 46 option (google.api.method_signature) = "parent"; 47 } 48 49 // Retrieves the specified Changelog. 50 rpc GetChangelog(GetChangelogRequest) returns (Changelog) { 51 option (google.api.http) = { 52 get: "/v3/{name=projects/*/locations/*/agents/*/changelogs/*}" 53 }; 54 option (google.api.method_signature) = "name"; 55 } 56} 57 58// The request message for 59// [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogs]. 60message ListChangelogsRequest { 61 // Required. The agent containing the changelogs. 62 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. 63 string parent = 1 [ 64 (google.api.field_behavior) = REQUIRED, 65 (google.api.resource_reference) = { 66 child_type: "dialogflow.googleapis.com/Changelog" 67 } 68 ]; 69 70 // The filter string. Supports filter by user_email, resource, type and 71 // create_time. Some examples: 72 // 1. By user email: 73 // user_email = "[email protected]" 74 // 2. By resource name: 75 // resource = "projects/123/locations/global/agents/456/flows/789" 76 // 3. By resource display name: 77 // display_name = "my agent" 78 // 4. By action: 79 // action = "Create" 80 // 5. By type: 81 // type = "flows" 82 // 6. By create time. Currently predicates on `create_time` and 83 // `create_time_epoch_seconds` are supported: 84 // create_time_epoch_seconds > 1551790877 AND create_time <= 85 // 2017-01-15T01:30:15.01Z 86 // 7. Combination of above filters: 87 // resource = "projects/123/locations/global/agents/456/flows/789" 88 // AND user_email = "[email protected]" 89 // AND create_time <= 2017-01-15T01:30:15.01Z 90 string filter = 2; 91 92 // The maximum number of items to return in a single page. By default 100 and 93 // at most 1000. 94 int32 page_size = 3; 95 96 // The next_page_token value returned from a previous list request. 97 string page_token = 4; 98} 99 100// The response message for 101// [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogs]. 102message ListChangelogsResponse { 103 // The list of changelogs. There will be a maximum number of items returned 104 // based on the page_size field in the request. The changelogs will be ordered 105 // by timestamp. 106 repeated Changelog changelogs = 1; 107 108 // Token to retrieve the next page of results, or empty if there are no more 109 // results in the list. 110 string next_page_token = 2; 111} 112 113// The request message for 114// [Changelogs.GetChangelog][google.cloud.dialogflow.cx.v3.Changelogs.GetChangelog]. 115message GetChangelogRequest { 116 // Required. The name of the changelog to get. 117 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 118 // ID>/changelogs/<Changelog ID>`. 119 string name = 1 [ 120 (google.api.field_behavior) = REQUIRED, 121 (google.api.resource_reference) = { 122 type: "dialogflow.googleapis.com/Changelog" 123 } 124 ]; 125} 126 127// Changelogs represents a change made to a given agent. 128message Changelog { 129 option (google.api.resource) = { 130 type: "dialogflow.googleapis.com/Changelog" 131 pattern: "projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}" 132 }; 133 134 // The unique identifier of the changelog. 135 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 136 // ID>/changelogs/<Changelog ID>`. 137 string name = 1; 138 139 // Email address of the authenticated user. 140 string user_email = 2; 141 142 // The affected resource display name of the change. 143 string display_name = 7; 144 145 // The action of the change. 146 string action = 11; 147 148 // The affected resource type. 149 string type = 8; 150 151 // The affected resource name of the change. 152 string resource = 3; 153 154 // The timestamp of the change. 155 google.protobuf.Timestamp create_time = 4; 156 157 // The affected language code of the change. 158 string language_code = 14; 159} 160