Skip to content

Commit f5a6217

Browse files
fix: add missing resource annotations and additional_bindings (#591)
1 parent c3fe6b1 commit f5a6217

46 files changed

Lines changed: 21286 additions & 30433 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,6 @@ message DeleteAgentRequest {
328328
];
329329
}
330330

331-
// ============================================================================
332-
// Requests and responses for custom methods.
333331
// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
334332
message SearchAgentsRequest {
335333
// Required. The project to list agents from.

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/context.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ message Context {
172172
// - MapKey value: parameter name
173173
// - MapValue type:
174174
// - If parameter's entity type is a composite entity: map
175-
// - Else: string
175+
// - Else: string or number, depending on parameter value type
176176
// - MapValue value:
177177
// - If parameter's entity type is a composite entity:
178178
// map from composite entity property names to property values

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session.proto

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ service Sessions {
7676
}
7777
}
7878

79-
// Requests and responses for custom methods.
8079
// The request to detect user's intent.
8180
message DetectIntentRequest {
8281
// Required. The name of the session this query is sent to. Format:
@@ -244,6 +243,20 @@ message QueryResult {
244243
string action = 3;
245244

246245
// The collection of extracted parameters.
246+
//
247+
// Depending on your protocol or client library language, this is a
248+
// map, associative array, symbol table, dictionary, or JSON object
249+
// composed of a collection of (MapKey, MapValue) pairs:
250+
//
251+
// - MapKey type: string
252+
// - MapKey value: parameter name
253+
// - MapValue type:
254+
// - If parameter's entity type is a composite entity: map
255+
// - Else: string or number, depending on parameter value type
256+
// - MapValue value:
257+
// - If parameter's entity type is a composite entity:
258+
// map from composite entity property names to property values
259+
// - Else: parameter value
247260
google.protobuf.Struct parameters = 4;
248261

249262
// This field is set to:
@@ -539,6 +552,20 @@ message EventInput {
539552
string name = 1 [(google.api.field_behavior) = REQUIRED];
540553

541554
// The collection of parameters associated with the event.
555+
//
556+
// Depending on your protocol or client library language, this is a
557+
// map, associative array, symbol table, dictionary, or JSON object
558+
// composed of a collection of (MapKey, MapValue) pairs:
559+
//
560+
// - MapKey type: string
561+
// - MapKey value: parameter name
562+
// - MapValue type:
563+
// - If parameter's entity type is a composite entity: map
564+
// - Else: string or number, depending on parameter value type
565+
// - MapValue value:
566+
// - If parameter's entity type is a composite entity:
567+
// map from composite entity property names to property values
568+
// - Else: parameter value
542569
google.protobuf.Struct parameters = 2;
543570

544571
// Required. The language of this query. See [Language

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ message InputAudioConfig {
194194
// the same session do not necessarily need to specify the same language.
195195
string language_code = 3;
196196

197-
// Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
197+
// If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
198198
// [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
199199
// words, e.g. start and end time offsets. If false or unspecified, Speech
200200
// doesn't return any word-level information.
201201
bool enable_word_info = 13;
202202

203-
// Optional. A list of strings containing words and phrases that the speech
203+
// A list of strings containing words and phrases that the speech
204204
// recognizer should recognize with higher likelihood.
205205
//
206206
// See [the Cloud Speech
@@ -210,19 +210,16 @@ message InputAudioConfig {
210210
// This field is deprecated. Please use [speech_contexts]() instead. If you
211211
// specify both [phrase_hints]() and [speech_contexts](), Dialogflow will
212212
// treat the [phrase_hints]() as a single additional [SpeechContext]().
213-
repeated string phrase_hints = 4 [
214-
deprecated = true,
215-
(google.api.field_behavior) = OPTIONAL
216-
];
213+
repeated string phrase_hints = 4 [deprecated = true];
217214

218-
// Optional. Context information to assist speech recognition.
215+
// Context information to assist speech recognition.
219216
//
220217
// See [the Cloud Speech
221218
// documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
222219
// for more details.
223220
repeated SpeechContext speech_contexts = 11;
224221

225-
// Optional. Which Speech model to select for the given request. Select the
222+
// Which Speech model to select for the given request. Select the
226223
// model best suited to your domain to get best results. If a model is not
227224
// explicitly specified, then we auto-select a model based on the parameters
228225
// in the InputAudioConfig.
@@ -235,10 +232,10 @@ message InputAudioConfig {
235232
// for more details.
236233
string model = 7;
237234

238-
// Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
235+
// Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
239236
SpeechModelVariant model_variant = 10;
240237

241-
// Optional. If `false` (default), recognition does not cease until the
238+
// If `false` (default), recognition does not cease until the
242239
// client closes the stream.
243240
// If `true`, the recognizer will detect a single spoken utterance in input
244241
// audio. Recognition ceases when it detects the audio's voice has

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,26 @@ message Context {
183183
string name = 1;
184184

185185
// Optional. The number of conversational query requests after which the
186-
// context expires. If set to `0` (the default) the context expires
186+
// context expires. The default is `0`. If set to `0`, the context expires
187187
// immediately. Contexts expire automatically after 20 minutes if there
188188
// are no matching queries.
189189
int32 lifespan_count = 2;
190190

191191
// Optional. The collection of parameters associated with this context.
192-
// Refer to [this
193-
// doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
194-
// for syntax.
192+
//
193+
// Depending on your protocol or client library language, this is a
194+
// map, associative array, symbol table, dictionary, or JSON object
195+
// composed of a collection of (MapKey, MapValue) pairs:
196+
//
197+
// - MapKey type: string
198+
// - MapKey value: parameter name
199+
// - MapValue type:
200+
// - If parameter's entity type is a composite entity: map
201+
// - Else: string or number, depending on parameter value type
202+
// - MapValue value:
203+
// - If parameter's entity type is a composite entity:
204+
// map from composite entity property names to property values
205+
// - Else: parameter value
195206
google.protobuf.Struct parameters = 3;
196207
}
197208

packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ service Documents {
7171
//
7272
// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
7373
// only use `projects.knowledgeBases.documents`.
74-
//
75-
// Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
76-
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
7774
rpc CreateDocument(CreateDocumentRequest) returns (google.longrunning.Operation) {
7875
option (google.api.http) = {
7976
post: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents"
@@ -83,31 +80,33 @@ service Documents {
8380
body: "document"
8481
}
8582
};
83+
option (google.longrunning.operation_info) = {
84+
response_type: "Document"
85+
metadata_type: "KnowledgeOperationMetadata"
86+
};
8687
}
8788

8889
// Deletes the specified document.
8990
//
9091
// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
9192
// only use `projects.knowledgeBases.documents`.
92-
//
93-
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
94-
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
9593
rpc DeleteDocument(DeleteDocumentRequest) returns (google.longrunning.Operation) {
9694
option (google.api.http) = {
9795
delete: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}"
9896
additional_bindings {
9997
delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}"
10098
}
10199
};
100+
option (google.longrunning.operation_info) = {
101+
response_type: "google.protobuf.Empty"
102+
metadata_type: "KnowledgeOperationMetadata"
103+
};
102104
}
103105

104106
// Updates the specified document.
105107
//
106108
// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
107109
// only use `projects.knowledgeBases.documents`.
108-
//
109-
// Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
110-
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
111110
rpc UpdateDocument(UpdateDocumentRequest) returns (google.longrunning.Operation) {
112111
option (google.api.http) = {
113112
patch: "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}"
@@ -117,6 +116,10 @@ service Documents {
117116
body: "document"
118117
}
119118
};
119+
option (google.longrunning.operation_info) = {
120+
response_type: "Document"
121+
metadata_type: "KnowledgeOperationMetadata"
122+
};
120123
}
121124

122125
// Reloads the specified document from its specified source, content_uri or
@@ -126,9 +129,6 @@ service Documents {
126129
//
127130
// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
128131
// only use `projects.knowledgeBases.documents`.
129-
//
130-
// Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
131-
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
132132
rpc ReloadDocument(ReloadDocumentRequest) returns (google.longrunning.Operation) {
133133
option (google.api.http) = {
134134
post: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload"
@@ -138,6 +138,10 @@ service Documents {
138138
body: "*"
139139
}
140140
};
141+
option (google.longrunning.operation_info) = {
142+
response_type: "Document"
143+
metadata_type: "KnowledgeOperationMetadata"
144+
};
141145
}
142146
}
143147

@@ -299,7 +303,8 @@ message ReloadDocumentRequest {
299303
// Optional. If provided, the service will load the contents from the source
300304
// and update document in the knowledge base.
301305
oneof source {
302-
// The path of gcs source file for reloading document content.
306+
// Optional. The path for a Cloud Storage source file for reloading document content.
307+
// If not provided, the Document's existing source will be reloaded.
303308
GcsSource gcs_source = 3;
304309
}
305310
}

0 commit comments

Comments
 (0)