Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit d14161e

Browse files
fix!: Set agent default language code as required (#238)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/5cbf6e13-833e-4879-a642-7270f8729446/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 378978212 Source-Link: googleapis/googleapis@ecc3ac6 feat: Support partial response feature docs: Update docs of Agents, Fulfillments, SecuritySettings and Sessions
1 parent 3209e54 commit d14161e

File tree

22 files changed

+1207
-356
lines changed

22 files changed

+1207
-356
lines changed

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ public final UnaryCallable<DetectIntentRequest, DetectIntentResponse> detectInte
241241
* .setQueryParams(QueryParameters.newBuilder().build())
242242
* .setQueryInput(QueryInput.newBuilder().build())
243243
* .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
244+
* .setEnablePartialResponse(true)
244245
* .build();
245246
* bidiStream.send(request);
246247
* for (StreamingDetectIntentResponse response : bidiStream) {

google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public void detectIntentTest() throws Exception {
9090
.setQueryResult(QueryResult.newBuilder().build())
9191
.setOutputAudio(ByteString.EMPTY)
9292
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
93+
.setAllowCancellation(true)
9394
.build();
9495
mockSessions.addResponse(expectedResponse);
9596

@@ -158,6 +159,7 @@ public void streamingDetectIntentTest() throws Exception {
158159
.setQueryParams(QueryParameters.newBuilder().build())
159160
.setQueryInput(QueryInput.newBuilder().build())
160161
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
162+
.setEnablePartialResponse(true)
161163
.build();
162164

163165
MockStreamObserver<StreamingDetectIntentResponse> responseObserver = new MockStreamObserver<>();
@@ -188,6 +190,7 @@ public void streamingDetectIntentExceptionTest() throws Exception {
188190
.setQueryParams(QueryParameters.newBuilder().build())
189191
.setQueryInput(QueryInput.newBuilder().build())
190192
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
193+
.setEnablePartialResponse(true)
191194
.build();
192195

193196
MockStreamObserver<StreamingDetectIntentResponse> responseObserver = new MockStreamObserver<>();

proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,16 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
325325
*
326326
*
327327
* <pre>
328-
* Immutable. The default language of the agent as a language tag.
328+
* Required. Immutable. The default language of the agent as a language tag.
329329
* See [Language
330330
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
331331
* for a list of the currently supported language codes.
332332
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
333333
* </pre>
334334
*
335-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
335+
* <code>
336+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
337+
* </code>
336338
*
337339
* @return The defaultLanguageCode.
338340
*/
@@ -352,14 +354,16 @@ public java.lang.String getDefaultLanguageCode() {
352354
*
353355
*
354356
* <pre>
355-
* Immutable. The default language of the agent as a language tag.
357+
* Required. Immutable. The default language of the agent as a language tag.
356358
* See [Language
357359
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
358360
* for a list of the currently supported language codes.
359361
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
360362
* </pre>
361363
*
362-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
364+
* <code>
365+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
366+
* </code>
363367
*
364368
* @return The bytes for defaultLanguageCode.
365369
*/
@@ -1566,14 +1570,16 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
15661570
*
15671571
*
15681572
* <pre>
1569-
* Immutable. The default language of the agent as a language tag.
1573+
* Required. Immutable. The default language of the agent as a language tag.
15701574
* See [Language
15711575
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
15721576
* for a list of the currently supported language codes.
15731577
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
15741578
* </pre>
15751579
*
1576-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
1580+
* <code>
1581+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1582+
* </code>
15771583
*
15781584
* @return The defaultLanguageCode.
15791585
*/
@@ -1592,14 +1598,16 @@ public java.lang.String getDefaultLanguageCode() {
15921598
*
15931599
*
15941600
* <pre>
1595-
* Immutable. The default language of the agent as a language tag.
1601+
* Required. Immutable. The default language of the agent as a language tag.
15961602
* See [Language
15971603
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
15981604
* for a list of the currently supported language codes.
15991605
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
16001606
* </pre>
16011607
*
1602-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
1608+
* <code>
1609+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1610+
* </code>
16031611
*
16041612
* @return The bytes for defaultLanguageCode.
16051613
*/
@@ -1618,14 +1626,16 @@ public com.google.protobuf.ByteString getDefaultLanguageCodeBytes() {
16181626
*
16191627
*
16201628
* <pre>
1621-
* Immutable. The default language of the agent as a language tag.
1629+
* Required. Immutable. The default language of the agent as a language tag.
16221630
* See [Language
16231631
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
16241632
* for a list of the currently supported language codes.
16251633
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
16261634
* </pre>
16271635
*
1628-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
1636+
* <code>
1637+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1638+
* </code>
16291639
*
16301640
* @param value The defaultLanguageCode to set.
16311641
* @return This builder for chaining.
@@ -1643,14 +1653,16 @@ public Builder setDefaultLanguageCode(java.lang.String value) {
16431653
*
16441654
*
16451655
* <pre>
1646-
* Immutable. The default language of the agent as a language tag.
1656+
* Required. Immutable. The default language of the agent as a language tag.
16471657
* See [Language
16481658
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
16491659
* for a list of the currently supported language codes.
16501660
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
16511661
* </pre>
16521662
*
1653-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
1663+
* <code>
1664+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1665+
* </code>
16541666
*
16551667
* @return This builder for chaining.
16561668
*/
@@ -1664,14 +1676,16 @@ public Builder clearDefaultLanguageCode() {
16641676
*
16651677
*
16661678
* <pre>
1667-
* Immutable. The default language of the agent as a language tag.
1679+
* Required. Immutable. The default language of the agent as a language tag.
16681680
* See [Language
16691681
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
16701682
* for a list of the currently supported language codes.
16711683
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
16721684
* </pre>
16731685
*
1674-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
1686+
* <code>
1687+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1688+
* </code>
16751689
*
16761690
* @param value The bytes for defaultLanguageCode to set.
16771691
* @return This builder for chaining.

proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ public interface AgentOrBuilder
8383
*
8484
*
8585
* <pre>
86-
* Immutable. The default language of the agent as a language tag.
86+
* Required. Immutable. The default language of the agent as a language tag.
8787
* See [Language
8888
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
8989
* for a list of the currently supported language codes.
9090
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
9191
* </pre>
9292
*
93-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
93+
* <code>
94+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
95+
* </code>
9496
*
9597
* @return The defaultLanguageCode.
9698
*/
@@ -99,14 +101,16 @@ public interface AgentOrBuilder
99101
*
100102
*
101103
* <pre>
102-
* Immutable. The default language of the agent as a language tag.
104+
* Required. Immutable. The default language of the agent as a language tag.
103105
* See [Language
104106
* Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
105107
* for a list of the currently supported language codes.
106108
* This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
107109
* </pre>
108110
*
109-
* <code>string default_language_code = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
111+
* <code>
112+
* string default_language_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
113+
* </code>
110114
*
111115
* @return The bytes for defaultLanguageCode.
112116
*/

0 commit comments

Comments
 (0)