diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java index 57a12ed7a..7d4eaba2c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1040,14 +1039,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListAgentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListAgentsPagedResponse apply(ListAgentsPage input) { - return new ListAgentsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListAgentsPagedResponse(input), MoreExecutors.directExecutor()); } private ListAgentsPagedResponse(ListAgentsPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java index 464fc9a6b..73a976227 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsSettings.java @@ -214,14 +214,13 @@ public AgentsStubSettings.Builder getStubSettingsBuilder() { return ((AgentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java index d75ce3057..a7485aa37 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -764,12 +763,7 @@ public static ApiFuture createAsync( ListEntityTypesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListEntityTypesPagedResponse apply(ListEntityTypesPage input) { - return new ListEntityTypesPagedResponse(input); - } - }, + input -> new ListEntityTypesPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java index 968ae2c58..cd4a17eea 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java @@ -180,14 +180,13 @@ public EntityTypesStubSettings.Builder getStubSettingsBuilder() { return ((EntityTypesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java index b0fd8bc9c..6336cdf75 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1223,12 +1222,7 @@ public static ApiFuture createAsync( ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListEnvironmentsPagedResponse apply(ListEnvironmentsPage input) { - return new ListEnvironmentsPagedResponse(input); - } - }, + input -> new ListEnvironmentsPagedResponse(input), MoreExecutors.directExecutor()); } @@ -1306,12 +1300,7 @@ public static ApiFuture createAsync( LookupEnvironmentHistoryPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public LookupEnvironmentHistoryPagedResponse apply(LookupEnvironmentHistoryPage input) { - return new LookupEnvironmentHistoryPagedResponse(input); - } - }, + input -> new LookupEnvironmentHistoryPagedResponse(input), MoreExecutors.directExecutor()); } @@ -1398,13 +1387,7 @@ public static ApiFuture createAsync( ListContinuousTestResultsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListContinuousTestResultsPagedResponse apply( - ListContinuousTestResultsPage input) { - return new ListContinuousTestResultsPagedResponse(input); - } - }, + input -> new ListContinuousTestResultsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java index 16248bcd0..53c80202f 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsSettings.java @@ -228,14 +228,13 @@ public EnvironmentsStubSettings.Builder getStubSettingsBuilder() { return ((EnvironmentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java index 628ede57b..6d2715e3c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -963,12 +962,7 @@ public static ApiFuture createAsync( ListExperimentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListExperimentsPagedResponse apply(ListExperimentsPage input) { - return new ListExperimentsPagedResponse(input); - } - }, + input -> new ListExperimentsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java index c7cbed4ba..abf7ed7cf 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentsSettings.java @@ -190,14 +190,13 @@ public ExperimentsStubSettings.Builder getStubSettingsBuilder() { return ((ExperimentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java index ca652a687..6ce6fa119 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1174,14 +1173,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListFlowsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListFlowsPagedResponse apply(ListFlowsPage input) { - return new ListFlowsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListFlowsPagedResponse(input), MoreExecutors.directExecutor()); } private ListFlowsPagedResponse(ListFlowsPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java index 58ed6f0ef..a2f91736d 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java @@ -225,14 +225,13 @@ public FlowsStubSettings.Builder getStubSettingsBuilder() { return ((FlowsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java index 3a532d577..bfd368d3e 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -725,14 +724,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListIntentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListIntentsPagedResponse apply(ListIntentsPage input) { - return new ListIntentsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListIntentsPagedResponse(input), MoreExecutors.directExecutor()); } private ListIntentsPagedResponse(ListIntentsPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsSettings.java index 851c48f8d..774c3ae62 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentsSettings.java @@ -179,14 +179,13 @@ public IntentsStubSettings.Builder getStubSettingsBuilder() { return ((IntentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java index 0028e6381..0d6d08487 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -734,14 +733,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListPagesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListPagesPagedResponse apply(ListPagesPage input) { - return new ListPagesPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListPagesPagedResponse(input), MoreExecutors.directExecutor()); } private ListPagesPagedResponse(ListPagesPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesSettings.java index 307b5cef6..b725331c9 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/PagesSettings.java @@ -179,14 +179,13 @@ public PagesStubSettings.Builder getStubSettingsBuilder() { return ((PagesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java index 44270fbe1..a800c4d50 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -781,12 +780,7 @@ public static ApiFuture createAsync( ListSecuritySettingsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListSecuritySettingsPagedResponse apply(ListSecuritySettingsPage input) { - return new ListSecuritySettingsPagedResponse(input); - } - }, + input -> new ListSecuritySettingsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceSettings.java index a2fbb7ea4..1958da49c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceSettings.java @@ -193,14 +193,13 @@ public SecuritySettingsServiceStubSettings.Builder getStubSettingsBuilder() { return ((SecuritySettingsServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java index 144623926..3a80a1340 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -808,12 +807,7 @@ public static ApiFuture createAsync( ListSessionEntityTypesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListSessionEntityTypesPagedResponse apply(ListSessionEntityTypesPage input) { - return new ListSessionEntityTypesPagedResponse(input); - } - }, + input -> new ListSessionEntityTypesPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesSettings.java index dd9842751..a78c107d0 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesSettings.java @@ -189,14 +189,13 @@ public SessionEntityTypesStubSettings.Builder getStubSettingsBuilder() { return ((SessionEntityTypesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java index eff9035ce..fe689bc75 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java @@ -171,14 +171,13 @@ public SessionsStubSettings.Builder getStubSettingsBuilder() { return ((SessionsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java index 63a41ab57..a1d46a373 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1359,12 +1358,7 @@ public static ApiFuture createAsync( ListTestCasesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTestCasesPagedResponse apply(ListTestCasesPage input) { - return new ListTestCasesPagedResponse(input); - } - }, + input -> new ListTestCasesPagedResponse(input), MoreExecutors.directExecutor()); } @@ -1441,12 +1435,7 @@ public static ApiFuture createAsync( ListTestCaseResultsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTestCaseResultsPagedResponse apply(ListTestCaseResultsPage input) { - return new ListTestCaseResultsPagedResponse(input); - } - }, + input -> new ListTestCaseResultsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java index 2a2eb3e7c..eb78dce68 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesSettings.java @@ -247,14 +247,13 @@ public TestCasesStubSettings.Builder getStubSettingsBuilder() { return ((TestCasesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java index 2e2ebac23..52bd0e970 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -906,13 +905,7 @@ public static ApiFuture createAsync( ListTransitionRouteGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTransitionRouteGroupsPagedResponse apply( - ListTransitionRouteGroupsPage input) { - return new ListTransitionRouteGroupsPagedResponse(input); - } - }, + input -> new ListTransitionRouteGroupsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsSettings.java index 492468fba..18adc189a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsSettings.java @@ -195,14 +195,13 @@ public TransitionRouteGroupsStubSettings.Builder getStubSettingsBuilder() { return ((TransitionRouteGroupsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java index 6f5a60d26..ca85d0192 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -892,12 +891,7 @@ public static ApiFuture createAsync( ListVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListVersionsPagedResponse apply(ListVersionsPage input) { - return new ListVersionsPagedResponse(input); - } - }, + input -> new ListVersionsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsSettings.java index a3a8bbf55..15c2fa80c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsSettings.java @@ -198,14 +198,13 @@ public VersionsStubSettings.Builder getStubSettingsBuilder() { return ((VersionsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java index 5786b83f6..58c9ff207 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -689,12 +688,7 @@ public static ApiFuture createAsync( ListWebhooksPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListWebhooksPagedResponse apply(ListWebhooksPage input) { - return new ListWebhooksPagedResponse(input); - } - }, + input -> new ListWebhooksPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksSettings.java index bcea73f65..d34914325 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhooksSettings.java @@ -179,14 +179,13 @@ public WebhooksStubSettings.Builder getStubSettingsBuilder() { return ((WebhooksStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java index 27b93ef37..f66aecf89 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/AgentsStubSettings.java @@ -544,14 +544,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java index 0832ce14a..2e775f810 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java @@ -397,14 +397,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java index d8c63250b..5d9a3d4cd 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EnvironmentsStubSettings.java @@ -761,14 +761,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java index bc14d142d..4ab3e70b2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ExperimentsStubSettings.java @@ -435,14 +435,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java index af8d89612..61d549578 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStubSettings.java @@ -596,14 +596,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java index 45e5c7eca..f84612a0a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcAgentsStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.Agent; import com.google.cloud.dialogflow.cx.v3.AgentValidationResult; @@ -47,7 +46,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -197,104 +195,80 @@ protected GrpcAgentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listAgentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListAgentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("agent.name", String.valueOf(request.getAgent().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("agent.name", String.valueOf(request.getAgent().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings exportAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings restoreAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(restoreAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(RestoreAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings validateAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(validateAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ValidateAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -302,13 +276,10 @@ public Map extract(ValidateAgentRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getAgentValidationResultMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetAgentValidationResultRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -429,7 +400,13 @@ public UnaryCallable validateAgentC @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java index 29b880258..45c2f7445 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -157,66 +155,50 @@ protected GrpcEntityTypesStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listEntityTypesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListEntityTypesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "entity_type.name", String.valueOf(request.getEntityType().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("entity_type.name", String.valueOf(request.getEntityType().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -280,7 +262,13 @@ public UnaryCallable deleteEntityTypeCallable() @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java index ee08f9e83..259ebedb2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEnvironmentsStub.java @@ -26,7 +26,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest; @@ -50,7 +49,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -225,66 +223,51 @@ protected GrpcEnvironmentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listEnvironmentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListEnvironmentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "environment.name", String.valueOf(request.getEnvironment().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "environment.name", String.valueOf(request.getEnvironment().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -293,26 +276,20 @@ public Map extract(DeleteEnvironmentRequest request) { .newBuilder() .setMethodDescriptor(lookupEnvironmentHistoryMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(LookupEnvironmentHistoryRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings runContinuousTestTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runContinuousTestMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(RunContinuousTestRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("environment", String.valueOf(request.getEnvironment())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("environment", String.valueOf(request.getEnvironment())); + return params.build(); }) .build(); GrpcCallSettings @@ -321,13 +298,10 @@ public Map extract(RunContinuousTestRequest request) { .newBuilder() .setMethodDescriptor(listContinuousTestResultsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListContinuousTestResultsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); @@ -489,7 +463,13 @@ public UnaryCallable runContinuousTestCalla @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java index 727dad097..dad9e7f3a 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcExperimentsStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateExperimentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; @@ -40,7 +39,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -181,92 +179,70 @@ protected GrpcExperimentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listExperimentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListExperimentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "experiment.name", String.valueOf(request.getExperiment().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("experiment.name", String.valueOf(request.getExperiment().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings startExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(startExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StartExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings stopExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(stopExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StopExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -346,7 +322,13 @@ public UnaryCallable stopExperimentCallable() @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java index 2d1b4919e..5b97125ff 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcFlowsStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3.DeleteFlowRequest; @@ -49,7 +48,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -208,91 +206,70 @@ protected GrpcFlowsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(createFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings deleteFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings listFlowsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listFlowsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListFlowsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings updateFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("flow.name", String.valueOf(request.getFlow().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("flow.name", String.valueOf(request.getFlow().getName())); + return params.build(); }) .build(); GrpcCallSettings trainFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(trainFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TrainFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings validateFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(validateFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ValidateFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -300,39 +277,30 @@ public Map extract(ValidateFlowRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getFlowValidationResultMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetFlowValidationResultRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings importFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ImportFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings exportFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -473,7 +441,13 @@ public UnaryCallable exportFlowCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java index 814fa3397..1f94be8b6 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcIntentsStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateIntentRequest; import com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -143,65 +141,50 @@ protected GrpcIntentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listIntentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListIntentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("intent.name", String.valueOf(request.getIntent().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("intent.name", String.valueOf(request.getIntent().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -264,7 +247,13 @@ public UnaryCallable deleteIntentCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java index 347fac076..e7e736bf8 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcPagesStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreatePageRequest; import com.google.cloud.dialogflow.cx.v3.DeletePageRequest; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -141,65 +139,50 @@ protected GrpcPagesStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listPagesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListPagesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getPageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getPageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetPageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createPageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createPageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreatePageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updatePageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updatePageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdatePageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("page.name", String.valueOf(request.getPage().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("page.name", String.valueOf(request.getPage().getName())); + return params.build(); }) .build(); GrpcCallSettings deletePageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deletePageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeletePageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -262,7 +245,13 @@ public UnaryCallable deletePageCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java index 5948a60a7..4684e4620 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSecuritySettingsServiceStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; import com.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -168,13 +166,10 @@ protected GrpcSecuritySettingsServiceStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(createSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -182,13 +177,10 @@ public Map extract(CreateSecuritySettingsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -196,15 +188,12 @@ public Map extract(GetSecuritySettingsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "security_settings.name", - String.valueOf(request.getSecuritySettings().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "security_settings.name", + String.valueOf(request.getSecuritySettings().getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -212,26 +201,20 @@ public Map extract(UpdateSecuritySettingsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(listSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings deleteSecuritySettingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -310,7 +293,13 @@ public UnaryCallable deleteSecuritySetting @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java index bff2f0db0..70aa6a739 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionEntityTypesStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -171,13 +169,10 @@ protected GrpcSessionEntityTypesStub( .newBuilder() .setMethodDescriptor(listSessionEntityTypesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListSessionEntityTypesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -185,13 +180,10 @@ public Map extract(ListSessionEntityTypesRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -199,13 +191,10 @@ public Map extract(GetSessionEntityTypeRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(createSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -213,15 +202,12 @@ public Map extract(CreateSessionEntityTypeRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "session_entity_type.name", - String.valueOf(request.getSessionEntityType().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "session_entity_type.name", + String.valueOf(request.getSessionEntityType().getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -229,13 +215,10 @@ public Map extract(UpdateSessionEntityTypeRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -315,7 +298,13 @@ public UnaryCallable deleteSessionEntityT @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java index f7a505fb8..bdb4c42cc 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java @@ -22,7 +22,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; @@ -37,7 +36,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -140,13 +138,10 @@ protected GrpcSessionsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(detectIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DetectIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("session", String.valueOf(request.getSession())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("session", String.valueOf(request.getSession())); + return params.build(); }) .build(); GrpcCallSettings @@ -159,28 +154,22 @@ public Map extract(DetectIntentRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(matchIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(MatchIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("session", String.valueOf(request.getSession())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("session", String.valueOf(request.getSession())); + return params.build(); }) .build(); GrpcCallSettings fulfillIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(fulfillIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(FulfillIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "match_intent_request.session", - String.valueOf(request.getMatchIntentRequest().getSession())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "match_intent_request.session", + String.valueOf(request.getMatchIntentRequest().getSession())); + return params.build(); }) .build(); @@ -230,7 +219,13 @@ public UnaryCallable fulfillIntentC @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java index 5a616c670..d61985db2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTestCasesStub.java @@ -25,7 +25,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest; import com.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata; @@ -59,7 +58,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -265,91 +263,70 @@ protected GrpcTestCasesStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings batchDeleteTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchDeleteTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("test_case.name", String.valueOf(request.getTestCase().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("test_case.name", String.valueOf(request.getTestCase().getName())); + return params.build(); }) .build(); GrpcCallSettings runTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(RunTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings batchRunTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchRunTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchRunTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -357,39 +334,30 @@ public Map extract(BatchRunTestCasesRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(calculateCoverageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CalculateCoverageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("agent", String.valueOf(request.getAgent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("agent", String.valueOf(request.getAgent())); + return params.build(); }) .build(); GrpcCallSettings importTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ImportTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings exportTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -397,26 +365,20 @@ public Map extract(ExportTestCasesRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(listTestCaseResultsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListTestCaseResultsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getTestCaseResultTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTestCaseResultMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTestCaseResultRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -608,7 +570,13 @@ public UnaryCallable getTestCaseResult @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java index d1059338f..ecddbb790 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcTransitionRouteGroupsStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; import com.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -175,13 +173,10 @@ protected GrpcTransitionRouteGroupsStub( .newBuilder() .setMethodDescriptor(listTransitionRouteGroupsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListTransitionRouteGroupsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -189,13 +184,10 @@ public Map extract(ListTransitionRouteGroupsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -203,14 +195,10 @@ public Map extract(GetTransitionRouteGroupRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(createTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - CreateTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -218,16 +206,12 @@ public Map extract( GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - UpdateTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "transition_route_group.name", - String.valueOf(request.getTransitionRouteGroup().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "transition_route_group.name", + String.valueOf(request.getTransitionRouteGroup().getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -235,14 +219,10 @@ public Map extract( GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - DeleteTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -323,7 +303,13 @@ public GrpcOperationsStub getOperationsStub() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java index dafa84518..616b2b3c9 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcVersionsStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; import com.google.cloud.dialogflow.cx.v3.CreateVersionRequest; @@ -43,7 +42,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -164,78 +162,60 @@ protected GrpcVersionsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listVersionsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListVersionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("version.name", String.valueOf(request.getVersion().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("version.name", String.valueOf(request.getVersion().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings loadVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(loadVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(LoadVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -329,7 +309,13 @@ public OperationCallable loadVersionOperation @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java index b2b383b2a..561949be8 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcWebhooksStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateWebhookRequest; import com.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -147,65 +145,50 @@ protected GrpcWebhooksStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listWebhooksMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListWebhooksRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("webhook.name", String.valueOf(request.getWebhook().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("webhook.name", String.valueOf(request.getWebhook().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -268,7 +251,13 @@ public UnaryCallable deleteWebhookCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/IntentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/IntentsStubSettings.java index 035c04ee0..b1f430c87 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/IntentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/IntentsStubSettings.java @@ -387,14 +387,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PagesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PagesStubSettings.java index 1c11a30ff..124129c65 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PagesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/PagesStubSettings.java @@ -387,14 +387,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SecuritySettingsServiceStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SecuritySettingsServiceStubSettings.java index 8334e97d9..642f29f92 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SecuritySettingsServiceStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SecuritySettingsServiceStubSettings.java @@ -424,14 +424,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionEntityTypesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionEntityTypesStubSettings.java index f3ccdd86e..a9991ae30 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionEntityTypesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionEntityTypesStubSettings.java @@ -429,14 +429,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java index df92e82ae..6fe2e4c80 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java @@ -326,14 +326,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java index 094222339..3cef3dc48 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TestCasesStubSettings.java @@ -770,14 +770,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TransitionRouteGroupsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TransitionRouteGroupsStubSettings.java index 87291904a..27d93d4da 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TransitionRouteGroupsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/TransitionRouteGroupsStubSettings.java @@ -438,14 +438,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/VersionsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/VersionsStubSettings.java index b4655f4ac..bdd6a4bb4 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/VersionsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/VersionsStubSettings.java @@ -487,14 +487,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/WebhooksStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/WebhooksStubSettings.java index e6851ba4f..45e8e5e40 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/WebhooksStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/WebhooksStubSettings.java @@ -388,14 +388,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java index cd1b68a61..ed67abed3 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1041,14 +1040,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListAgentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListAgentsPagedResponse apply(ListAgentsPage input) { - return new ListAgentsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListAgentsPagedResponse(input), MoreExecutors.directExecutor()); } private ListAgentsPagedResponse(ListAgentsPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java index c3cc999d7..c53fa6421 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsSettings.java @@ -215,14 +215,13 @@ public AgentsStubSettings.Builder getStubSettingsBuilder() { return ((AgentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java index 1573c9304..ad0e61905 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -753,12 +752,7 @@ public static ApiFuture createAsync( ListEntityTypesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListEntityTypesPagedResponse apply(ListEntityTypesPage input) { - return new ListEntityTypesPagedResponse(input); - } - }, + input -> new ListEntityTypesPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java index 950647cf0..b79a66567 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java @@ -181,14 +181,13 @@ public EntityTypesStubSettings.Builder getStubSettingsBuilder() { return ((EntityTypesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java index a3f4195dd..1763ab315 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1233,12 +1232,7 @@ public static ApiFuture createAsync( ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListEnvironmentsPagedResponse apply(ListEnvironmentsPage input) { - return new ListEnvironmentsPagedResponse(input); - } - }, + input -> new ListEnvironmentsPagedResponse(input), MoreExecutors.directExecutor()); } @@ -1316,12 +1310,7 @@ public static ApiFuture createAsync( LookupEnvironmentHistoryPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public LookupEnvironmentHistoryPagedResponse apply(LookupEnvironmentHistoryPage input) { - return new LookupEnvironmentHistoryPagedResponse(input); - } - }, + input -> new LookupEnvironmentHistoryPagedResponse(input), MoreExecutors.directExecutor()); } @@ -1408,13 +1397,7 @@ public static ApiFuture createAsync( ListContinuousTestResultsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListContinuousTestResultsPagedResponse apply( - ListContinuousTestResultsPage input) { - return new ListContinuousTestResultsPagedResponse(input); - } - }, + input -> new ListContinuousTestResultsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java index 6bf7f8afb..9e9019e70 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsSettings.java @@ -229,14 +229,13 @@ public EnvironmentsStubSettings.Builder getStubSettingsBuilder() { return ((EnvironmentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java index 19464feca..b9ad4d457 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -966,12 +965,7 @@ public static ApiFuture createAsync( ListExperimentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListExperimentsPagedResponse apply(ListExperimentsPage input) { - return new ListExperimentsPagedResponse(input); - } - }, + input -> new ListExperimentsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java index 1164d6b00..794645e48 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsSettings.java @@ -191,14 +191,13 @@ public ExperimentsStubSettings.Builder getStubSettingsBuilder() { return ((ExperimentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java index 2e69daa78..8b2eefa44 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1175,14 +1174,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListFlowsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListFlowsPagedResponse apply(ListFlowsPage input) { - return new ListFlowsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListFlowsPagedResponse(input), MoreExecutors.directExecutor()); } private ListFlowsPagedResponse(ListFlowsPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java index af9330d13..fe95c06f3 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsSettings.java @@ -226,14 +226,13 @@ public FlowsStubSettings.Builder getStubSettingsBuilder() { return ((FlowsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java index d0e0c52e6..b8d63bd78 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -726,14 +725,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListIntentsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListIntentsPagedResponse apply(ListIntentsPage input) { - return new ListIntentsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListIntentsPagedResponse(input), MoreExecutors.directExecutor()); } private ListIntentsPagedResponse(ListIntentsPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java index 899524b2c..e13ba05cb 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsSettings.java @@ -180,14 +180,13 @@ public IntentsStubSettings.Builder getStubSettingsBuilder() { return ((IntentsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java index e770a4a07..ff35bee93 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -702,14 +701,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListPagesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListPagesPagedResponse apply(ListPagesPage input) { - return new ListPagesPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListPagesPagedResponse(input), MoreExecutors.directExecutor()); } private ListPagesPagedResponse(ListPagesPage page) { diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesSettings.java index af4297379..45fa73b2c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PagesSettings.java @@ -180,14 +180,13 @@ public PagesStubSettings.Builder getStubSettingsBuilder() { return ((PagesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java index 425886376..f8908af76 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -786,12 +785,7 @@ public static ApiFuture createAsync( ListSecuritySettingsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListSecuritySettingsPagedResponse apply(ListSecuritySettingsPage input) { - return new ListSecuritySettingsPagedResponse(input); - } - }, + input -> new ListSecuritySettingsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceSettings.java index e2b87696b..be741c4d3 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceSettings.java @@ -194,14 +194,13 @@ public SecuritySettingsServiceStubSettings.Builder getStubSettingsBuilder() { return ((SecuritySettingsServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java index a512e1b11..b44f4585f 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -809,12 +808,7 @@ public static ApiFuture createAsync( ListSessionEntityTypesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListSessionEntityTypesPagedResponse apply(ListSessionEntityTypesPage input) { - return new ListSessionEntityTypesPagedResponse(input); - } - }, + input -> new ListSessionEntityTypesPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesSettings.java index 3f0fc7664..3cc13dd0e 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesSettings.java @@ -190,14 +190,13 @@ public SessionEntityTypesStubSettings.Builder getStubSettingsBuilder() { return ((SessionEntityTypesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java index 1dd8ec4fd..aef0b76cf 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java @@ -172,14 +172,13 @@ public SessionsStubSettings.Builder getStubSettingsBuilder() { return ((SessionsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java index bd3f4da68..3d158f81e 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1361,12 +1360,7 @@ public static ApiFuture createAsync( ListTestCasesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTestCasesPagedResponse apply(ListTestCasesPage input) { - return new ListTestCasesPagedResponse(input); - } - }, + input -> new ListTestCasesPagedResponse(input), MoreExecutors.directExecutor()); } @@ -1443,12 +1437,7 @@ public static ApiFuture createAsync( ListTestCaseResultsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTestCaseResultsPagedResponse apply(ListTestCaseResultsPage input) { - return new ListTestCaseResultsPagedResponse(input); - } - }, + input -> new ListTestCaseResultsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java index 0cc8144a2..ca22eb5b6 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesSettings.java @@ -248,14 +248,13 @@ public TestCasesStubSettings.Builder getStubSettingsBuilder() { return ((TestCasesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java index d941d0d99..e0f200da2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -907,13 +906,7 @@ public static ApiFuture createAsync( ListTransitionRouteGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTransitionRouteGroupsPagedResponse apply( - ListTransitionRouteGroupsPage input) { - return new ListTransitionRouteGroupsPagedResponse(input); - } - }, + input -> new ListTransitionRouteGroupsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsSettings.java index 453142029..ddf37f71b 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsSettings.java @@ -196,14 +196,13 @@ public TransitionRouteGroupsStubSettings.Builder getStubSettingsBuilder() { return ((TransitionRouteGroupsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java index b86b61190..6de0cdcd7 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -898,12 +897,7 @@ public static ApiFuture createAsync( ListVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListVersionsPagedResponse apply(ListVersionsPage input) { - return new ListVersionsPagedResponse(input); - } - }, + input -> new ListVersionsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsSettings.java index b89476079..1972f9e65 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsSettings.java @@ -199,14 +199,13 @@ public VersionsStubSettings.Builder getStubSettingsBuilder() { return ((VersionsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java index 00dab4063..9c36e36e0 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClient.java @@ -16,7 +16,6 @@ package com.google.cloud.dialogflow.cx.v3beta1; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -690,12 +689,7 @@ public static ApiFuture createAsync( ListWebhooksPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListWebhooksPagedResponse apply(ListWebhooksPage input) { - return new ListWebhooksPagedResponse(input); - } - }, + input -> new ListWebhooksPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksSettings.java index a983b7097..c469b3ac1 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksSettings.java @@ -180,14 +180,13 @@ public WebhooksStubSettings.Builder getStubSettingsBuilder() { return ((WebhooksStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java index a57b0e790..60473db91 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/AgentsStubSettings.java @@ -545,14 +545,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java index 8c407ffc0..a8acfd467 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java @@ -398,14 +398,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java index 353924a4f..1f349e0be 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EnvironmentsStubSettings.java @@ -762,14 +762,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java index c1aaa9d95..cad1249f2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExperimentsStubSettings.java @@ -436,14 +436,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java index 42377bc51..7e1df5073 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/FlowsStubSettings.java @@ -597,14 +597,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java index fd0101eac..fd0c58a19 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcAgentsStub.java @@ -25,7 +25,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.Agent; import com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; @@ -48,7 +47,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -200,104 +198,80 @@ protected GrpcAgentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listAgentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListAgentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("agent.name", String.valueOf(request.getAgent().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("agent.name", String.valueOf(request.getAgent().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings exportAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings restoreAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(restoreAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(RestoreAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings validateAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(validateAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ValidateAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -305,13 +279,10 @@ public Map extract(ValidateAgentRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getAgentValidationResultMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetAgentValidationResultRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -432,7 +403,13 @@ public UnaryCallable validateAgentC @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java index db32007ed..5c45fc952 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -159,66 +157,50 @@ protected GrpcEntityTypesStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listEntityTypesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListEntityTypesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "entity_type.name", String.valueOf(request.getEntityType().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("entity_type.name", String.valueOf(request.getEntityType().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -282,7 +264,13 @@ public UnaryCallable deleteEntityTypeCallable() @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java index e00483b66..a8a707572 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEnvironmentsStub.java @@ -27,7 +27,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; @@ -51,7 +50,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -231,66 +229,51 @@ protected GrpcEnvironmentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listEnvironmentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListEnvironmentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "environment.name", String.valueOf(request.getEnvironment().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "environment.name", String.valueOf(request.getEnvironment().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteEnvironmentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEnvironmentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteEnvironmentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -299,26 +282,20 @@ public Map extract(DeleteEnvironmentRequest request) { .newBuilder() .setMethodDescriptor(lookupEnvironmentHistoryMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(LookupEnvironmentHistoryRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings runContinuousTestTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runContinuousTestMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(RunContinuousTestRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("environment", String.valueOf(request.getEnvironment())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("environment", String.valueOf(request.getEnvironment())); + return params.build(); }) .build(); GrpcCallSettings @@ -327,13 +304,10 @@ public Map extract(RunContinuousTestRequest request) { .newBuilder() .setMethodDescriptor(listContinuousTestResultsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListContinuousTestResultsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); @@ -495,7 +469,13 @@ public UnaryCallable runContinuousTestCalla @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java index 72ec2a99e..d0d5bbb84 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExperimentsStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; @@ -41,7 +40,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -183,92 +181,70 @@ protected GrpcExperimentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listExperimentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListExperimentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "experiment.name", String.valueOf(request.getExperiment().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("experiment.name", String.valueOf(request.getExperiment().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings startExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(startExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StartExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings stopExperimentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(stopExperimentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(StopExperimentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -348,7 +324,13 @@ public UnaryCallable stopExperimentCallable() @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java index bfe3e1a73..63922b1a6 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcFlowsStub.java @@ -25,7 +25,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; @@ -50,7 +49,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -210,91 +208,70 @@ protected GrpcFlowsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(createFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings deleteFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings listFlowsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listFlowsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListFlowsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings updateFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("flow.name", String.valueOf(request.getFlow().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("flow.name", String.valueOf(request.getFlow().getName())); + return params.build(); }) .build(); GrpcCallSettings trainFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(trainFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TrainFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings validateFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(validateFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ValidateFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -302,39 +279,30 @@ public Map extract(ValidateFlowRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getFlowValidationResultMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetFlowValidationResultRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings importFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ImportFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings exportFlowTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportFlowMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportFlowRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -475,7 +443,13 @@ public UnaryCallable exportFlowCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java index d19ead0b6..3d6550ec2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcIntentsStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -145,65 +143,50 @@ protected GrpcIntentsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listIntentsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListIntentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("intent.name", String.valueOf(request.getIntent().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("intent.name", String.valueOf(request.getIntent().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -266,7 +249,13 @@ public UnaryCallable deleteIntentCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java index fb8ffd2a9..36d8f97a2 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPagesStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -143,65 +141,50 @@ protected GrpcPagesStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listPagesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListPagesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getPageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getPageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetPageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createPageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createPageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreatePageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updatePageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updatePageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdatePageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("page.name", String.valueOf(request.getPage().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("page.name", String.valueOf(request.getPage().getName())); + return params.build(); }) .build(); GrpcCallSettings deletePageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deletePageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeletePageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -264,7 +247,13 @@ public UnaryCallable deletePageCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java index 8d176bb4f..ea010ae9d 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSecuritySettingsServiceStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -170,13 +168,10 @@ protected GrpcSecuritySettingsServiceStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(createSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -184,13 +179,10 @@ public Map extract(CreateSecuritySettingsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -198,15 +190,12 @@ public Map extract(GetSecuritySettingsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "security_settings.name", - String.valueOf(request.getSecuritySettings().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "security_settings.name", + String.valueOf(request.getSecuritySettings().getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -214,26 +203,20 @@ public Map extract(UpdateSecuritySettingsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(listSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings deleteSecuritySettingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteSecuritySettingsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteSecuritySettingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -312,7 +295,13 @@ public UnaryCallable deleteSecuritySetting @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java index cd8c06474..d5aa41c06 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionEntityTypesStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateSessionEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteSessionEntityTypeRequest; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -173,13 +171,10 @@ protected GrpcSessionEntityTypesStub( .newBuilder() .setMethodDescriptor(listSessionEntityTypesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListSessionEntityTypesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -187,13 +182,10 @@ public Map extract(ListSessionEntityTypesRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -201,13 +193,10 @@ public Map extract(GetSessionEntityTypeRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(createSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -215,15 +204,12 @@ public Map extract(CreateSessionEntityTypeRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "session_entity_type.name", - String.valueOf(request.getSessionEntityType().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "session_entity_type.name", + String.valueOf(request.getSessionEntityType().getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -231,13 +217,10 @@ public Map extract(UpdateSessionEntityTypeRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteSessionEntityTypeMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -317,7 +300,13 @@ public UnaryCallable deleteSessionEntityT @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java index 89b9f45ff..f08ff6dc7 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse; @@ -38,7 +37,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -143,13 +141,10 @@ protected GrpcSessionsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(detectIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DetectIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("session", String.valueOf(request.getSession())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("session", String.valueOf(request.getSession())); + return params.build(); }) .build(); GrpcCallSettings @@ -162,28 +157,22 @@ public Map extract(DetectIntentRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(matchIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(MatchIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("session", String.valueOf(request.getSession())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("session", String.valueOf(request.getSession())); + return params.build(); }) .build(); GrpcCallSettings fulfillIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(fulfillIntentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(FulfillIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "match_intent_request.session", - String.valueOf(request.getMatchIntentRequest().getSession())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "match_intent_request.session", + String.valueOf(request.getMatchIntentRequest().getSession())); + return params.build(); }) .build(); @@ -233,7 +222,13 @@ public UnaryCallable fulfillIntentC @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java index 2c96dca26..23b3d9ad8 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTestCasesStub.java @@ -26,7 +26,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest; import com.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata; @@ -60,7 +59,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -268,91 +266,70 @@ protected GrpcTestCasesStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings batchDeleteTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchDeleteTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("test_case.name", String.valueOf(request.getTestCase().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("test_case.name", String.valueOf(request.getTestCase().getName())); + return params.build(); }) .build(); GrpcCallSettings runTestCaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runTestCaseMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(RunTestCaseRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings batchRunTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchRunTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchRunTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -360,39 +337,30 @@ public Map extract(BatchRunTestCasesRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(calculateCoverageMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CalculateCoverageRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("agent", String.valueOf(request.getAgent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("agent", String.valueOf(request.getAgent())); + return params.build(); }) .build(); GrpcCallSettings importTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ImportTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings exportTestCasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportTestCasesMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportTestCasesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -400,26 +368,20 @@ public Map extract(ExportTestCasesRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(listTestCaseResultsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListTestCaseResultsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getTestCaseResultTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTestCaseResultMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTestCaseResultRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -611,7 +573,13 @@ public UnaryCallable getTestCaseResult @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java index 01cfc0342..7d614ba6d 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcTransitionRouteGroupsStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateTransitionRouteGroupRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteTransitionRouteGroupRequest; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -177,13 +175,10 @@ protected GrpcTransitionRouteGroupsStub( .newBuilder() .setMethodDescriptor(listTransitionRouteGroupsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListTransitionRouteGroupsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -191,13 +186,10 @@ public Map extract(ListTransitionRouteGroupsRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -205,14 +197,10 @@ public Map extract(GetTransitionRouteGroupRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(createTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - CreateTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings @@ -220,16 +208,12 @@ public Map extract( GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - UpdateTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "transition_route_group.name", - String.valueOf(request.getTransitionRouteGroup().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "transition_route_group.name", + String.valueOf(request.getTransitionRouteGroup().getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -237,14 +221,10 @@ public Map extract( GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTransitionRouteGroupMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - DeleteTransitionRouteGroupRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -325,7 +305,13 @@ public GrpcOperationsStub getOperationsStub() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java index c45dcd705..32cd1f0a9 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcVersionsStub.java @@ -25,7 +25,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateVersionOperationMetadata; import com.google.cloud.dialogflow.cx.v3beta1.CreateVersionRequest; @@ -44,7 +43,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -166,78 +164,60 @@ protected GrpcVersionsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listVersionsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListVersionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("version.name", String.valueOf(request.getVersion().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("version.name", String.valueOf(request.getVersion().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings loadVersionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(loadVersionMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(LoadVersionRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -331,7 +311,13 @@ public OperationCallable loadVersionOperation @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java index fcab240cc..98fde3a16 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcWebhooksStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateWebhookRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteWebhookRequest; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -149,65 +147,50 @@ protected GrpcWebhooksStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(listWebhooksMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListWebhooksRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings getWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); }) .build(); GrpcCallSettings updateWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("webhook.name", String.valueOf(request.getWebhook().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("webhook.name", String.valueOf(request.getWebhook().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteWebhookTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteWebhookMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteWebhookRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); @@ -270,7 +253,13 @@ public UnaryCallable deleteWebhookCallable() { @Override public final void close() { - shutdown(); + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } } @Override diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java index a35795e74..52a523453 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java @@ -388,14 +388,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PagesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PagesStubSettings.java index ebe0cfe1a..094f2fc9c 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PagesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PagesStubSettings.java @@ -388,14 +388,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SecuritySettingsServiceStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SecuritySettingsServiceStubSettings.java index 2e35712a0..da9c4715d 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SecuritySettingsServiceStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SecuritySettingsServiceStubSettings.java @@ -425,14 +425,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionEntityTypesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionEntityTypesStubSettings.java index 5002b9442..fe5036d26 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionEntityTypesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionEntityTypesStubSettings.java @@ -430,14 +430,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java index b92b6f2ba..4bd697477 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java @@ -327,14 +327,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java index 58b32531f..0449791cc 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TestCasesStubSettings.java @@ -771,14 +771,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TransitionRouteGroupsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TransitionRouteGroupsStubSettings.java index 93c99781a..258769ef8 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TransitionRouteGroupsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/TransitionRouteGroupsStubSettings.java @@ -439,14 +439,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/VersionsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/VersionsStubSettings.java index c33ba79f9..fea2243ba 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/VersionsStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/VersionsStubSettings.java @@ -488,14 +488,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/WebhooksStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/WebhooksStubSettings.java index 1ee87bdd7..699cc9226 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/WebhooksStubSettings.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/WebhooksStubSettings.java @@ -389,14 +389,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java index 38adb9405..1091228d8 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java @@ -191,6 +191,7 @@ public void getAgentTest() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -242,6 +243,7 @@ public void getAgentTest2() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -293,6 +295,7 @@ public void createAgentTest() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -347,6 +350,7 @@ public void createAgentTest2() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -401,6 +405,7 @@ public void updateAgentTest() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java index a66969038..77326f960 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java @@ -184,6 +184,9 @@ public void getExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -237,6 +240,9 @@ public void getExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -288,6 +294,9 @@ public void createExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -344,6 +353,9 @@ public void createExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -398,6 +410,9 @@ public void updateExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -522,6 +537,9 @@ public void startExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -575,6 +593,9 @@ public void startExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -626,6 +647,9 @@ public void stopExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -679,6 +703,9 @@ public void stopExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java index 07b0e387f..79f0fc163 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java @@ -91,7 +91,9 @@ public void createSecuritySettingsTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -138,7 +140,9 @@ public void createSecuritySettingsTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -185,7 +189,9 @@ public void getSecuritySettingsTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -230,7 +236,9 @@ public void getSecuritySettingsTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -273,7 +281,9 @@ public void updateSecuritySettingsTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java index c37bc2274..38bf050d1 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java @@ -191,6 +191,7 @@ public void getAgentTest() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -242,6 +243,7 @@ public void getAgentTest2() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -293,6 +295,7 @@ public void createAgentTest() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -347,6 +350,7 @@ public void createAgentTest2() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -401,6 +405,7 @@ public void updateAgentTest() throws Exception { .toString()) .setEnableStackdriverLogging(true) .setEnableSpellCorrection(true) + .setAdvancedSettings(AdvancedSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java index 58aa53bf4..2d8a50740 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java @@ -184,6 +184,9 @@ public void getExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -237,6 +240,9 @@ public void getExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -288,6 +294,9 @@ public void createExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -344,6 +353,9 @@ public void createExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -398,6 +410,9 @@ public void updateExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -522,6 +537,9 @@ public void startExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -575,6 +593,9 @@ public void startExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -626,6 +647,9 @@ public void stopExperimentTest() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -679,6 +703,9 @@ public void stopExperimentTest2() throws Exception { .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setDefinition(Experiment.Definition.newBuilder().build()) + .setRolloutConfig(RolloutConfig.newBuilder().build()) + .setRolloutState(RolloutState.newBuilder().build()) + .setRolloutFailureReason("rolloutFailureReason958797373") .setResult(Experiment.Result.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java index 653840042..efa71eb0f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java @@ -91,7 +91,9 @@ public void createSecuritySettingsTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -138,7 +140,9 @@ public void createSecuritySettingsTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -185,7 +189,9 @@ public void getSecuritySettingsTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -230,7 +236,9 @@ public void getSecuritySettingsTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); @@ -273,7 +281,9 @@ public void updateSecuritySettingsTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setInspectTemplate("inspectTemplate-2053620050") + .setDeidentifyTemplate("deidentifyTemplate-2141929945") .addAllPurgeDataTypes(new ArrayList()) + .setInsightsExportSettings(SecuritySettings.InsightsExportSettings.newBuilder().build()) .build(); mockSecuritySettingsService.addResponse(expectedResponse); diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/it/ITSystemTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/it/ITSystemTest.java index 8a363fa11..19f33fd9c 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/it/ITSystemTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/it/ITSystemTest.java @@ -112,8 +112,10 @@ public class ITSystemTest { private static final String PROJECT = ServiceOptions.getDefaultProjectId(); private static final String ID = UUID.randomUUID().toString(); + private static final String ID2 = UUID.randomUUID().toString(); private static final String LOCATION = "global"; private static final String DISPLAY_NAME = "test-" + ID.substring(0, 8); + private static final String DISPLAY_NAME2 = "test-" + ID2.substring(0, 8); private static final String AGENT_TIME_ZONE = "America/Los_Angeles"; private static final String DEFAULT_LANGUAGE_CODE = "en"; private static final String DESCRIPTION = "description-test-" + ID; @@ -178,7 +180,7 @@ public static void setUp() throws IOException, ExecutionException, InterruptedEx Flow trainFlow = Flow.newBuilder() .setNluSettings(NLUSETTINGS) - .setDisplayName(DISPLAY_NAME) + .setDisplayName(DISPLAY_NAME2) .setDescription(DESCRIPTION) .build(); CreateFlowRequest createTrainFlowRequest = diff --git a/pom.xml b/pom.xml index 6d4c98503..03bfa94ca 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.12.0 + 1.0.0 @@ -87,7 +87,7 @@ com.google.cloud google-cloud-shared-dependencies - 1.4.0 + 2.0.0 pom import diff --git a/proto-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml b/proto-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml index 6386d824e..84d078f5a 100644 --- a/proto-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml +++ b/proto-google-cloud-dialogflow-cx-v3/clirr-ignored-differences.xml @@ -16,4 +16,9 @@ com/google/cloud/dialogflow/cx/v3/*OrBuilder boolean has*(*) + + + 8001 + com/google/cloud/dialogflow/cx/v3/Service* + diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettings.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettings.java new file mode 100644 index 000000000..4058e531b --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettings.java @@ -0,0 +1,1476 @@ +/* + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/advanced_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *

+ * Hierarchical advanced settings for agent/flow/page/fulfillment/parameter.
+ * Settings exposed at lower level overrides the settings exposed at higher
+ * level.
+ * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AdvancedSettings} + */ +public final class AdvancedSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.AdvancedSettings) + AdvancedSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdvancedSettings.newBuilder() to construct. + private AdvancedSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdvancedSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdvancedSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AdvancedSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 50: + { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder + subBuilder = null; + if (loggingSettings_ != null) { + subBuilder = loggingSettings_.toBuilder(); + } + loggingSettings_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(loggingSettings_); + loggingSettings_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.class, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder.class); + } + + public interface LoggingSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If true, StackDriver logging is currently enabled.
+     * 
+ * + * bool enable_stackdriver_logging = 2; + * + * @return The enableStackdriverLogging. + */ + boolean getEnableStackdriverLogging(); + + /** + * + * + *
+     * If true, DF Interaction logging is currently enabled.
+     * 
+ * + * bool enable_interaction_logging = 3; + * + * @return The enableInteractionLogging. + */ + boolean getEnableInteractionLogging(); + } + /** + * + * + *
+   * Define behaviors on logging.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings} + */ + public static final class LoggingSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) + LoggingSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoggingSettings.newBuilder() to construct. + private LoggingSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoggingSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoggingSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LoggingSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + enableStackdriverLogging_ = input.readBool(); + break; + } + case 24: + { + enableInteractionLogging_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.class, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder.class); + } + + public static final int ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER = 2; + private boolean enableStackdriverLogging_; + /** + * + * + *
+     * If true, StackDriver logging is currently enabled.
+     * 
+ * + * bool enable_stackdriver_logging = 2; + * + * @return The enableStackdriverLogging. + */ + @java.lang.Override + public boolean getEnableStackdriverLogging() { + return enableStackdriverLogging_; + } + + public static final int ENABLE_INTERACTION_LOGGING_FIELD_NUMBER = 3; + private boolean enableInteractionLogging_; + /** + * + * + *
+     * If true, DF Interaction logging is currently enabled.
+     * 
+ * + * bool enable_interaction_logging = 3; + * + * @return The enableInteractionLogging. + */ + @java.lang.Override + public boolean getEnableInteractionLogging() { + return enableInteractionLogging_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableStackdriverLogging_ != false) { + output.writeBool(2, enableStackdriverLogging_); + } + if (enableInteractionLogging_ != false) { + output.writeBool(3, enableInteractionLogging_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableStackdriverLogging_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableStackdriverLogging_); + } + if (enableInteractionLogging_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableInteractionLogging_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings other = + (com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) obj; + + if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; + if (getEnableInteractionLogging() != other.getEnableInteractionLogging()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverLogging()); + hash = (37 * hash) + ENABLE_INTERACTION_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableInteractionLogging()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Define behaviors on logging.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.class, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableStackdriverLogging_ = false; + + enableInteractionLogging_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings build() { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings result = + new com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings(this); + result.enableStackdriverLogging_ = enableStackdriverLogging_; + result.enableInteractionLogging_ = enableInteractionLogging_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + .getDefaultInstance()) return this; + if (other.getEnableStackdriverLogging() != false) { + setEnableStackdriverLogging(other.getEnableStackdriverLogging()); + } + if (other.getEnableInteractionLogging() != false) { + setEnableInteractionLogging(other.getEnableInteractionLogging()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableStackdriverLogging_; + /** + * + * + *
+       * If true, StackDriver logging is currently enabled.
+       * 
+ * + * bool enable_stackdriver_logging = 2; + * + * @return The enableStackdriverLogging. + */ + @java.lang.Override + public boolean getEnableStackdriverLogging() { + return enableStackdriverLogging_; + } + /** + * + * + *
+       * If true, StackDriver logging is currently enabled.
+       * 
+ * + * bool enable_stackdriver_logging = 2; + * + * @param value The enableStackdriverLogging to set. + * @return This builder for chaining. + */ + public Builder setEnableStackdriverLogging(boolean value) { + + enableStackdriverLogging_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, StackDriver logging is currently enabled.
+       * 
+ * + * bool enable_stackdriver_logging = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableStackdriverLogging() { + + enableStackdriverLogging_ = false; + onChanged(); + return this; + } + + private boolean enableInteractionLogging_; + /** + * + * + *
+       * If true, DF Interaction logging is currently enabled.
+       * 
+ * + * bool enable_interaction_logging = 3; + * + * @return The enableInteractionLogging. + */ + @java.lang.Override + public boolean getEnableInteractionLogging() { + return enableInteractionLogging_; + } + /** + * + * + *
+       * If true, DF Interaction logging is currently enabled.
+       * 
+ * + * bool enable_interaction_logging = 3; + * + * @param value The enableInteractionLogging to set. + * @return This builder for chaining. + */ + public Builder setEnableInteractionLogging(boolean value) { + + enableInteractionLogging_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, DF Interaction logging is currently enabled.
+       * 
+ * + * bool enable_interaction_logging = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableInteractionLogging() { + + enableInteractionLogging_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings) + private static final com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoggingSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoggingSettings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int LOGGING_SETTINGS_FIELD_NUMBER = 6; + private com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings loggingSettings_; + /** + * + * + *
+   * Settings for logging.
+   * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+   * and speech logging.
+   * Exposed at the following levels:
+   * - Agent level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + * + * @return Whether the loggingSettings field is set. + */ + @java.lang.Override + public boolean hasLoggingSettings() { + return loggingSettings_ != null; + } + /** + * + * + *
+   * Settings for logging.
+   * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+   * and speech logging.
+   * Exposed at the following levels:
+   * - Agent level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + * + * @return The loggingSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings getLoggingSettings() { + return loggingSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.getDefaultInstance() + : loggingSettings_; + } + /** + * + * + *
+   * Settings for logging.
+   * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+   * and speech logging.
+   * Exposed at the following levels:
+   * - Agent level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettingsOrBuilder + getLoggingSettingsOrBuilder() { + return getLoggingSettings(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (loggingSettings_ != null) { + output.writeMessage(6, getLoggingSettings()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (loggingSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLoggingSettings()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.AdvancedSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.AdvancedSettings other = + (com.google.cloud.dialogflow.cx.v3.AdvancedSettings) obj; + + if (hasLoggingSettings() != other.hasLoggingSettings()) return false; + if (hasLoggingSettings()) { + if (!getLoggingSettings().equals(other.getLoggingSettings())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLoggingSettings()) { + hash = (37 * hash) + LOGGING_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLoggingSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.AdvancedSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Hierarchical advanced settings for agent/flow/page/fulfillment/parameter.
+   * Settings exposed at lower level overrides the settings exposed at higher
+   * level.
+   * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.AdvancedSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.AdvancedSettings) + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.class, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.AdvancedSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (loggingSettingsBuilder_ == null) { + loggingSettings_ = null; + } else { + loggingSettings_ = null; + loggingSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings build() { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings result = + new com.google.cloud.dialogflow.cx.v3.AdvancedSettings(this); + if (loggingSettingsBuilder_ == null) { + result.loggingSettings_ = loggingSettings_; + } else { + result.loggingSettings_ = loggingSettingsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.AdvancedSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.AdvancedSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.AdvancedSettings other) { + if (other == com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance()) + return this; + if (other.hasLoggingSettings()) { + mergeLoggingSettings(other.getLoggingSettings()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.AdvancedSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings loggingSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettingsOrBuilder> + loggingSettingsBuilder_; + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + * + * @return Whether the loggingSettings field is set. + */ + public boolean hasLoggingSettings() { + return loggingSettingsBuilder_ != null || loggingSettings_ != null; + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + * + * @return The loggingSettings. + */ + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings getLoggingSettings() { + if (loggingSettingsBuilder_ == null) { + return loggingSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + .getDefaultInstance() + : loggingSettings_; + } else { + return loggingSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + public Builder setLoggingSettings( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings value) { + if (loggingSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loggingSettings_ = value; + onChanged(); + } else { + loggingSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + public Builder setLoggingSettings( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder + builderForValue) { + if (loggingSettingsBuilder_ == null) { + loggingSettings_ = builderForValue.build(); + onChanged(); + } else { + loggingSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + public Builder mergeLoggingSettings( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings value) { + if (loggingSettingsBuilder_ == null) { + if (loggingSettings_ != null) { + loggingSettings_ = + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.newBuilder( + loggingSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + loggingSettings_ = value; + } + onChanged(); + } else { + loggingSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + public Builder clearLoggingSettings() { + if (loggingSettingsBuilder_ == null) { + loggingSettings_ = null; + onChanged(); + } else { + loggingSettings_ = null; + loggingSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder + getLoggingSettingsBuilder() { + + onChanged(); + return getLoggingSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettingsOrBuilder + getLoggingSettingsOrBuilder() { + if (loggingSettingsBuilder_ != null) { + return loggingSettingsBuilder_.getMessageOrBuilder(); + } else { + return loggingSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings + .getDefaultInstance() + : loggingSettings_; + } + } + /** + * + * + *
+     * Settings for logging.
+     * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+     * and speech logging.
+     * Exposed at the following levels:
+     * - Agent level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettingsOrBuilder> + getLoggingSettingsFieldBuilder() { + if (loggingSettingsBuilder_ == null) { + loggingSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.Builder, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettingsOrBuilder>( + getLoggingSettings(), getParentForChildren(), isClean()); + loggingSettings_ = null; + } + return loggingSettingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.AdvancedSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.AdvancedSettings) + private static final com.google.cloud.dialogflow.cx.v3.AdvancedSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.AdvancedSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.AdvancedSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdvancedSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AdvancedSettings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettingsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettingsOrBuilder.java new file mode 100644 index 000000000..ca5352ba0 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettingsOrBuilder.java @@ -0,0 +1,76 @@ +/* + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/advanced_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface AdvancedSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.AdvancedSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Settings for logging.
+   * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+   * and speech logging.
+   * Exposed at the following levels:
+   * - Agent level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + * + * @return Whether the loggingSettings field is set. + */ + boolean hasLoggingSettings(); + /** + * + * + *
+   * Settings for logging.
+   * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+   * and speech logging.
+   * Exposed at the following levels:
+   * - Agent level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + * + * @return The loggingSettings. + */ + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings getLoggingSettings(); + /** + * + * + *
+   * Settings for logging.
+   * Settings for Dialogflow History, Contact Center messages, StackDriver logs,
+   * and speech logging.
+   * Exposed at the following levels:
+   * - Agent level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings logging_settings = 6; + * + */ + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettingsOrBuilder + getLoggingSettingsOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettingsProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettingsProto.java new file mode 100644 index 000000000..e69824559 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AdvancedSettingsProto.java @@ -0,0 +1,94 @@ +/* + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/advanced_settings.proto + +package com.google.cloud.dialogflow.cx.v3; + +public final class AdvancedSettingsProto { + private AdvancedSettingsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/dialogflow/cx/v3/advanced" + + "_settings.proto\022\035google.cloud.dialogflow" + + ".cx.v3\032\037google/api/field_behavior.proto\032" + + "\036google/protobuf/duration.proto\032\034google/" + + "api/annotations.proto\"\310\001\n\020AdvancedSettin" + + "gs\022Y\n\020logging_settings\030\006 \001(\0132?.google.cl" + + "oud.dialogflow.cx.v3.AdvancedSettings.Lo" + + "ggingSettings\032Y\n\017LoggingSettings\022\"\n\032enab" + + "le_stackdriver_logging\030\002 \001(\010\022\"\n\032enable_i" + + "nteraction_logging\030\003 \001(\010B\245\001\n!com.google." + + "cloud.dialogflow.cx.v3B\025AdvancedSettings" + + "ProtoP\001Z?google.golang.org/genproto/goog" + + "leapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF" + + "\252\002\035Google.Cloud.Dialogflow.Cx.V3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_descriptor, + new java.lang.String[] { + "LoggingSettings", + }); + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_AdvancedSettings_LoggingSettings_descriptor, + new java.lang.String[] { + "EnableStackdriverLogging", "EnableInteractionLogging", + }); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java index 0013024f5..a4a938c5a 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java @@ -176,6 +176,23 @@ private Agent( case 160: { enableSpellCorrection_ = input.readBool(); + break; + } + case 178: + { + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder subBuilder = null; + if (advancedSettings_ != null) { + subBuilder = advancedSettings_.toBuilder(); + } + advancedSettings_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(advancedSettings_); + advancedSettings_ = subBuilder.buildPartial(); + } + break; } default: @@ -774,13 +791,16 @@ public com.google.protobuf.ByteString getSecuritySettingsBytes() { * *
    * Indicates if stackdriver logging is enabled for the agent.
+   * Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings]
+   * instead.
    * 
* - * bool enable_stackdriver_logging = 18; + * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @return The enableStackdriverLogging. */ @java.lang.Override + @java.lang.Deprecated public boolean getEnableStackdriverLogging() { return enableStackdriverLogging_; } @@ -804,6 +824,58 @@ public boolean getEnableSpellCorrection() { return enableSpellCorrection_; } + public static final int ADVANCED_SETTINGS_FIELD_NUMBER = 22; + private com.google.cloud.dialogflow.cx.v3.AdvancedSettings advancedSettings_; + /** + * + * + *
+   * Hierarchical advanced settings for this agent. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * + * @return Whether the advancedSettings field is set. + */ + @java.lang.Override + public boolean hasAdvancedSettings() { + return advancedSettings_ != null; + } + /** + * + * + *
+   * Hierarchical advanced settings for this agent. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * + * @return The advancedSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings getAdvancedSettings() { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + /** + * + * + *
+   * Hierarchical advanced settings for this agent. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + return getAdvancedSettings(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -855,6 +927,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableSpellCorrection_ != false) { output.writeBool(20, enableSpellCorrection_); } + if (advancedSettings_ != null) { + output.writeMessage(22, getAdvancedSettings()); + } unknownFields.writeTo(output); } @@ -906,6 +981,9 @@ public int getSerializedSize() { if (enableSpellCorrection_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, enableSpellCorrection_); } + if (advancedSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getAdvancedSettings()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -937,6 +1015,10 @@ public boolean equals(final java.lang.Object obj) { if (!getSecuritySettings().equals(other.getSecuritySettings())) return false; if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; if (getEnableSpellCorrection() != other.getEnableSpellCorrection()) return false; + if (hasAdvancedSettings() != other.hasAdvancedSettings()) return false; + if (hasAdvancedSettings()) { + if (!getAdvancedSettings().equals(other.getAdvancedSettings())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -976,6 +1058,10 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverLogging()); hash = (37 * hash) + ENABLE_SPELL_CORRECTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSpellCorrection()); + if (hasAdvancedSettings()) { + hash = (37 * hash) + ADVANCED_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedSettings().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1155,6 +1241,12 @@ public Builder clear() { enableSpellCorrection_ = false; + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = null; + } else { + advancedSettings_ = null; + advancedSettingsBuilder_ = null; + } return this; } @@ -1203,6 +1295,11 @@ public com.google.cloud.dialogflow.cx.v3.Agent buildPartial() { result.securitySettings_ = securitySettings_; result.enableStackdriverLogging_ = enableStackdriverLogging_; result.enableSpellCorrection_ = enableSpellCorrection_; + if (advancedSettingsBuilder_ == null) { + result.advancedSettings_ = advancedSettings_; + } else { + result.advancedSettings_ = advancedSettingsBuilder_.build(); + } onBuilt(); return result; } @@ -1303,6 +1400,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Agent other) { if (other.getEnableSpellCorrection() != false) { setEnableSpellCorrection(other.getEnableSpellCorrection()); } + if (other.hasAdvancedSettings()) { + mergeAdvancedSettings(other.getAdvancedSettings()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2681,13 +2781,16 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { * *
      * Indicates if stackdriver logging is enabled for the agent.
+     * Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings]
+     * instead.
      * 
* - * bool enable_stackdriver_logging = 18; + * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @return The enableStackdriverLogging. */ @java.lang.Override + @java.lang.Deprecated public boolean getEnableStackdriverLogging() { return enableStackdriverLogging_; } @@ -2696,13 +2799,16 @@ public boolean getEnableStackdriverLogging() { * *
      * Indicates if stackdriver logging is enabled for the agent.
+     * Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings]
+     * instead.
      * 
* - * bool enable_stackdriver_logging = 18; + * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setEnableStackdriverLogging(boolean value) { enableStackdriverLogging_ = value; @@ -2714,12 +2820,15 @@ public Builder setEnableStackdriverLogging(boolean value) { * *
      * Indicates if stackdriver logging is enabled for the agent.
+     * Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings]
+     * instead.
      * 
* - * bool enable_stackdriver_logging = 18; + * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearEnableStackdriverLogging() { enableStackdriverLogging_ = false; @@ -2782,6 +2891,202 @@ public Builder clearEnableSpellCorrection() { return this; } + private com.google.cloud.dialogflow.cx.v3.AdvancedSettings advancedSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder> + advancedSettingsBuilder_; + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * + * @return Whether the advancedSettings field is set. + */ + public boolean hasAdvancedSettings() { + return advancedSettingsBuilder_ != null || advancedSettings_ != null; + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * + * @return The advancedSettings. + */ + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings getAdvancedSettings() { + if (advancedSettingsBuilder_ == null) { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } else { + return advancedSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + public Builder setAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedSettings_ = value; + onChanged(); + } else { + advancedSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + public Builder setAdvancedSettings( + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder builderForValue) { + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = builderForValue.build(); + onChanged(); + } else { + advancedSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSettings value) { + if (advancedSettingsBuilder_ == null) { + if (advancedSettings_ != null) { + advancedSettings_ = + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.newBuilder(advancedSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + advancedSettings_ = value; + } + onChanged(); + } else { + advancedSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + public Builder clearAdvancedSettings() { + if (advancedSettingsBuilder_ == null) { + advancedSettings_ = null; + onChanged(); + } else { + advancedSettings_ = null; + advancedSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSettingsBuilder() { + + onChanged(); + return getAdvancedSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + public com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder + getAdvancedSettingsOrBuilder() { + if (advancedSettingsBuilder_ != null) { + return advancedSettingsBuilder_.getMessageOrBuilder(); + } else { + return advancedSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance() + : advancedSettings_; + } + } + /** + * + * + *
+     * Hierarchical advanced settings for this agent. The settings exposed at the
+     * lower level overrides the settings exposed at the higher level.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder> + getAdvancedSettingsFieldBuilder() { + if (advancedSettingsBuilder_ == null) { + advancedSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.AdvancedSettings, + com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder, + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder>( + getAdvancedSettings(), getParentForChildren(), isClean()); + advancedSettings_ = null; + } + return advancedSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java index f494d0a9c..571520e90 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java @@ -365,12 +365,15 @@ public interface AgentOrBuilder * *
    * Indicates if stackdriver logging is enabled for the agent.
+   * Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings]
+   * instead.
    * 
* - * bool enable_stackdriver_logging = 18; + * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @return The enableStackdriverLogging. */ + @java.lang.Deprecated boolean getEnableStackdriverLogging(); /** @@ -386,4 +389,42 @@ public interface AgentOrBuilder * @return The enableSpellCorrection. */ boolean getEnableSpellCorrection(); + + /** + * + * + *
+   * Hierarchical advanced settings for this agent. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * + * @return Whether the advancedSettings field is set. + */ + boolean hasAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this agent. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + * + * @return The advancedSettings. + */ + com.google.cloud.dialogflow.cx.v3.AdvancedSettings getAdvancedSettings(); + /** + * + * + *
+   * Hierarchical advanced settings for this agent. The settings exposed at the
+   * lower level overrides the settings exposed at the higher level.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 22; + */ + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsOrBuilder getAdvancedSettingsOrBuilder(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java index 50daddc8a..b26fa5e67 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentProto.java @@ -96,119 +96,123 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oto\022\035google.cloud.dialogflow.cx.v3\032\034goog" + "le/api/annotations.proto\032\027google/api/cli" + "ent.proto\032\037google/api/field_behavior.pro" - + "to\032\031google/api/resource.proto\032(google/cl" - + "oud/dialogflow/cx/v3/flow.proto\0325google/" - + "cloud/dialogflow/cx/v3/security_settings" - + ".proto\032#google/longrunning/operations.pr" - + "oto\032\033google/protobuf/empty.proto\032 google" - + "/protobuf/field_mask.proto\"8\n\024SpeechToTe" - + "xtSettings\022 \n\030enable_speech_adaptation\030\001" - + " \001(\010\"\273\004\n\005Agent\022\014\n\004name\030\001 \001(\t\022\031\n\014display_" - + "name\030\002 \001(\tB\003\340A\002\022%\n\025default_language_code" - + "\030\003 \001(\tB\006\340A\002\340A\005\022 \n\030supported_language_cod" - + "es\030\004 \003(\t\022\026\n\ttime_zone\030\005 \001(\tB\003\340A\002\022\023\n\013desc" - + "ription\030\006 \001(\t\022\022\n\navatar_uri\030\007 \001(\t\022T\n\027spe" - + "ech_to_text_settings\030\r \001(\01323.google.clou" - + "d.dialogflow.cx.v3.SpeechToTextSettings\022" - + ":\n\nstart_flow\030\020 \001(\tB&\340A\005\372A \n\036dialogflow." - + "googleapis.com/Flow\022J\n\021security_settings" - + "\030\021 \001(\tB/\372A,\n*dialogflow.googleapis.com/S" - + "ecuritySettings\022\"\n\032enable_stackdriver_lo" - + "gging\030\022 \001(\010\022\037\n\027enable_spell_correction\030\024" - + " \001(\010:\\\352AY\n\037dialogflow.googleapis.com/Age" - + "nt\0226projects/{project}/locations/{locati" - + "on}/agents/{agent}\"s\n\021ListAgentsRequest\022" - + "7\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflow.goog" - + "leapis.com/Agent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\np" - + "age_token\030\003 \001(\t\"c\n\022ListAgentsResponse\0224\n" - + "\006agents\030\001 \003(\0132$.google.cloud.dialogflow." - + "cx.v3.Agent\022\027\n\017next_page_token\030\002 \001(\t\"H\n\017" - + "GetAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037d" - + "ialogflow.googleapis.com/Agent\"\207\001\n\022Creat" - + "eAgentRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037d" - + "ialogflow.googleapis.com/Agent\0228\n\005agent\030" - + "\002 \001(\0132$.google.cloud.dialogflow.cx.v3.Ag" - + "entB\003\340A\002\"\177\n\022UpdateAgentRequest\0228\n\005agent\030" - + "\001 \001(\0132$.google.cloud.dialogflow.cx.v3.Ag" - + "entB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.p" - + "rotobuf.FieldMask\"K\n\022DeleteAgentRequest\022" - + "5\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.google" - + "apis.com/Agent\"\247\001\n\022ExportAgentRequest\0225\n" - + "\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googleap" - + "is.com/Agent\022\026\n\tagent_uri\030\002 \001(\tB\003\340A\001\022B\n\013" - + "environment\030\005 \001(\tB-\340A\001\372A\'\n%dialogflow.go" - + "ogleapis.com/Environment\"L\n\023ExportAgentR" - + "esponse\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\ragent_co" - + "ntent\030\002 \001(\014H\000B\007\n\005agent\"\246\002\n\023RestoreAgentR" - + "equest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow" - + ".googleapis.com/Agent\022\023\n\tagent_uri\030\002 \001(\t" - + "H\000\022\027\n\ragent_content\030\003 \001(\014H\000\022X\n\016restore_o" - + "ption\030\005 \001(\0162@.google.cloud.dialogflow.cx" - + ".v3.RestoreAgentRequest.RestoreOption\"G\n" - + "\rRestoreOption\022\036\n\032RESTORE_OPTION_UNSPECI" - + "FIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\007\n\005agent\"" - + "d\n\024ValidateAgentRequest\0225\n\004name\030\001 \001(\tB\'\340" - + "A\002\372A!\n\037dialogflow.googleapis.com/Agent\022\025" - + "\n\rlanguage_code\030\002 \001(\t\"\177\n\037GetAgentValidat" - + "ionResultRequest\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/" - + "dialogflow.googleapis.com/AgentValidatio" - + "nResult\022\025\n\rlanguage_code\030\002 \001(\t\"\372\001\n\025Agent" - + "ValidationResult\022\014\n\004name\030\001 \001(\t\022T\n\027flow_v" - + "alidation_results\030\002 \003(\01323.google.cloud.d" - + "ialogflow.cx.v3.FlowValidationResult:}\352A" - + "z\n/dialogflow.googleapis.com/AgentValida" - + "tionResult\022Gprojects/{project}/locations" - + "/{location}/agents/{agent}/validationRes" - + "ult2\231\016\n\006Agents\022\256\001\n\nListAgents\0220.google.c" - + "loud.dialogflow.cx.v3.ListAgentsRequest\032" - + "1.google.cloud.dialogflow.cx.v3.ListAgen" - + "tsResponse\";\202\323\344\223\002,\022*/v3/{parent=projects" - + "/*/locations/*}/agents\332A\006parent\022\233\001\n\010GetA" - + "gent\022..google.cloud.dialogflow.cx.v3.Get" - + "AgentRequest\032$.google.cloud.dialogflow.c" - + "x.v3.Agent\"9\202\323\344\223\002,\022*/v3/{name=projects/*" - + "/locations/*/agents/*}\332A\004name\022\260\001\n\013Create" - + "Agent\0221.google.cloud.dialogflow.cx.v3.Cr" - + "eateAgentRequest\032$.google.cloud.dialogfl" - + "ow.cx.v3.Agent\"H\202\323\344\223\0023\"*/v3/{parent=proj" - + "ects/*/locations/*}/agents:\005agent\332A\014pare" - + "nt,agent\022\273\001\n\013UpdateAgent\0221.google.cloud." - + "dialogflow.cx.v3.UpdateAgentRequest\032$.go" - + "ogle.cloud.dialogflow.cx.v3.Agent\"S\202\323\344\223\002" - + "920/v3/{agent.name=projects/*/locations/" - + "*/agents/*}:\005agent\332A\021agent,update_mask\022\223" - + "\001\n\013DeleteAgent\0221.google.cloud.dialogflow" - + ".cx.v3.DeleteAgentRequest\032\026.google.proto" - + "buf.Empty\"9\202\323\344\223\002,**/v3/{name=projects/*/" - + "locations/*/agents/*}\332A\004name\022\315\001\n\013ExportA" - + "gent\0221.google.cloud.dialogflow.cx.v3.Exp" - + "ortAgentRequest\032\035.google.longrunning.Ope" - + "ration\"l\202\323\344\223\0026\"1/v3/{name=projects/*/loc" - + "ations/*/agents/*}:export:\001*\312A-\n\023ExportA" - + "gentResponse\022\026google.protobuf.Struct\022\322\001\n" - + "\014RestoreAgent\0222.google.cloud.dialogflow." - + "cx.v3.RestoreAgentRequest\032\035.google.longr" - + "unning.Operation\"o\202\323\344\223\0027\"2/v3/{name=proj" - + "ects/*/locations/*/agents/*}:restore:\001*\312" - + "A/\n\025google.protobuf.Empty\022\026google.protob" - + "uf.Struct\022\272\001\n\rValidateAgent\0223.google.clo" - + "ud.dialogflow.cx.v3.ValidateAgentRequest" - + "\0324.google.cloud.dialogflow.cx.v3.AgentVa" - + "lidationResult\">\202\323\344\223\0028\"3/v3/{name=projec" - + "ts/*/locations/*/agents/*}:validate:\001*\022\334" - + "\001\n\030GetAgentValidationResult\022>.google.clo" - + "ud.dialogflow.cx.v3.GetAgentValidationRe" - + "sultRequest\0324.google.cloud.dialogflow.cx" - + ".v3.AgentValidationResult\"J\202\323\344\223\002=\022;/v3/{" - + "name=projects/*/locations/*/agents/*/val" - + "idationResult}\332A\004name\032x\312A\031dialogflow.goo" - + "gleapis.com\322AYhttps://www.googleapis.com" - + "/auth/cloud-platform,https://www.googlea" - + "pis.com/auth/dialogflowB\232\001\n!com.google.c" - + "loud.dialogflow.cx.v3B\nAgentProtoP\001Z?goo" - + "gle.golang.org/genproto/googleapis/cloud" - + "/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cl" - + "oud.Dialogflow.Cx.V3b\006proto3" + + "to\032\031google/api/resource.proto\0325google/cl" + + "oud/dialogflow/cx/v3/advanced_settings.p" + + "roto\032(google/cloud/dialogflow/cx/v3/flow" + + ".proto\0325google/cloud/dialogflow/cx/v3/se" + + "curity_settings.proto\032#google/longrunnin" + + "g/operations.proto\032\033google/protobuf/empt" + + "y.proto\032 google/protobuf/field_mask.prot" + + "o\"8\n\024SpeechToTextSettings\022 \n\030enable_spee" + + "ch_adaptation\030\001 \001(\010\"\213\005\n\005Agent\022\014\n\004name\030\001 " + + "\001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022%\n\025defaul" + + "t_language_code\030\003 \001(\tB\006\340A\002\340A\005\022 \n\030support" + + "ed_language_codes\030\004 \003(\t\022\026\n\ttime_zone\030\005 \001" + + "(\tB\003\340A\002\022\023\n\013description\030\006 \001(\t\022\022\n\navatar_u" + + "ri\030\007 \001(\t\022T\n\027speech_to_text_settings\030\r \001(" + + "\01323.google.cloud.dialogflow.cx.v3.Speech" + + "ToTextSettings\022:\n\nstart_flow\030\020 \001(\tB&\340A\005\372" + + "A \n\036dialogflow.googleapis.com/Flow\022J\n\021se" + + "curity_settings\030\021 \001(\tB/\372A,\n*dialogflow.g" + + "oogleapis.com/SecuritySettings\022&\n\032enable" + + "_stackdriver_logging\030\022 \001(\010B\002\030\001\022\037\n\027enable" + + "_spell_correction\030\024 \001(\010\022J\n\021advanced_sett" + + "ings\030\026 \001(\0132/.google.cloud.dialogflow.cx." + + "v3.AdvancedSettings:\\\352AY\n\037dialogflow.goo" + + "gleapis.com/Agent\0226projects/{project}/lo" + + "cations/{location}/agents/{agent}\"s\n\021Lis" + + "tAgentsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037" + + "dialogflow.googleapis.com/Agent\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"c\n\022ListAg" + + "entsResponse\0224\n\006agents\030\001 \003(\0132$.google.cl" + + "oud.dialogflow.cx.v3.Agent\022\027\n\017next_page_" + + "token\030\002 \001(\t\"H\n\017GetAgentRequest\0225\n\004name\030\001" + + " \001(\tB\'\340A\002\372A!\n\037dialogflow.googleapis.com/" + + "Agent\"\207\001\n\022CreateAgentRequest\0227\n\006parent\030\001" + + " \001(\tB\'\340A\002\372A!\022\037dialogflow.googleapis.com/" + + "Agent\0228\n\005agent\030\002 \001(\0132$.google.cloud.dial" + + "ogflow.cx.v3.AgentB\003\340A\002\"\177\n\022UpdateAgentRe" + + "quest\0228\n\005agent\030\001 \001(\0132$.google.cloud.dial" + + "ogflow.cx.v3.AgentB\003\340A\002\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMask\"K\n\022Dele" + + "teAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037di" + + "alogflow.googleapis.com/Agent\"\247\001\n\022Export" + + "AgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dial" + + "ogflow.googleapis.com/Agent\022\026\n\tagent_uri" + + "\030\002 \001(\tB\003\340A\001\022B\n\013environment\030\005 \001(\tB-\340A\001\372A\'" + + "\n%dialogflow.googleapis.com/Environment\"" + + "L\n\023ExportAgentResponse\022\023\n\tagent_uri\030\001 \001(" + + "\tH\000\022\027\n\ragent_content\030\002 \001(\014H\000B\007\n\005agent\"\246\002" + + "\n\023RestoreAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002" + + "\372A!\n\037dialogflow.googleapis.com/Agent\022\023\n\t" + + "agent_uri\030\002 \001(\tH\000\022\027\n\ragent_content\030\003 \001(\014" + + "H\000\022X\n\016restore_option\030\005 \001(\0162@.google.clou" + + "d.dialogflow.cx.v3.RestoreAgentRequest.R" + + "estoreOption\"G\n\rRestoreOption\022\036\n\032RESTORE" + + "_OPTION_UNSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLB" + + "ACK\020\002B\007\n\005agent\"d\n\024ValidateAgentRequest\0225" + + "\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googlea" + + "pis.com/Agent\022\025\n\rlanguage_code\030\002 \001(\t\"\177\n\037" + + "GetAgentValidationResultRequest\022E\n\004name\030" + + "\001 \001(\tB7\340A\002\372A1\n/dialogflow.googleapis.com" + + "/AgentValidationResult\022\025\n\rlanguage_code\030" + + "\002 \001(\t\"\372\001\n\025AgentValidationResult\022\014\n\004name\030" + + "\001 \001(\t\022T\n\027flow_validation_results\030\002 \003(\01323" + + ".google.cloud.dialogflow.cx.v3.FlowValid" + + "ationResult:}\352Az\n/dialogflow.googleapis." + + "com/AgentValidationResult\022Gprojects/{pro" + + "ject}/locations/{location}/agents/{agent" + + "}/validationResult2\231\016\n\006Agents\022\256\001\n\nListAg" + + "ents\0220.google.cloud.dialogflow.cx.v3.Lis" + + "tAgentsRequest\0321.google.cloud.dialogflow" + + ".cx.v3.ListAgentsResponse\";\202\323\344\223\002,\022*/v3/{" + + "parent=projects/*/locations/*}/agents\332A\006" + + "parent\022\233\001\n\010GetAgent\022..google.cloud.dialo" + + "gflow.cx.v3.GetAgentRequest\032$.google.clo" + + "ud.dialogflow.cx.v3.Agent\"9\202\323\344\223\002,\022*/v3/{" + + "name=projects/*/locations/*/agents/*}\332A\004" + + "name\022\260\001\n\013CreateAgent\0221.google.cloud.dial" + + "ogflow.cx.v3.CreateAgentRequest\032$.google" + + ".cloud.dialogflow.cx.v3.Agent\"H\202\323\344\223\0023\"*/" + + "v3/{parent=projects/*/locations/*}/agent" + + "s:\005agent\332A\014parent,agent\022\273\001\n\013UpdateAgent\022" + + "1.google.cloud.dialogflow.cx.v3.UpdateAg" + + "entRequest\032$.google.cloud.dialogflow.cx." + + "v3.Agent\"S\202\323\344\223\002920/v3/{agent.name=projec" + + "ts/*/locations/*/agents/*}:\005agent\332A\021agen" + + "t,update_mask\022\223\001\n\013DeleteAgent\0221.google.c" + + "loud.dialogflow.cx.v3.DeleteAgentRequest" + + "\032\026.google.protobuf.Empty\"9\202\323\344\223\002,**/v3/{n" + + "ame=projects/*/locations/*/agents/*}\332A\004n" + + "ame\022\315\001\n\013ExportAgent\0221.google.cloud.dialo" + + "gflow.cx.v3.ExportAgentRequest\032\035.google." + + "longrunning.Operation\"l\202\323\344\223\0026\"1/v3/{name" + + "=projects/*/locations/*/agents/*}:export" + + ":\001*\312A-\n\023ExportAgentResponse\022\026google.prot" + + "obuf.Struct\022\322\001\n\014RestoreAgent\0222.google.cl" + + "oud.dialogflow.cx.v3.RestoreAgentRequest" + + "\032\035.google.longrunning.Operation\"o\202\323\344\223\0027\"" + + "2/v3/{name=projects/*/locations/*/agents" + + "/*}:restore:\001*\312A/\n\025google.protobuf.Empty" + + "\022\026google.protobuf.Struct\022\272\001\n\rValidateAge" + + "nt\0223.google.cloud.dialogflow.cx.v3.Valid" + + "ateAgentRequest\0324.google.cloud.dialogflo" + + "w.cx.v3.AgentValidationResult\">\202\323\344\223\0028\"3/" + + "v3/{name=projects/*/locations/*/agents/*" + + "}:validate:\001*\022\334\001\n\030GetAgentValidationResu" + + "lt\022>.google.cloud.dialogflow.cx.v3.GetAg" + + "entValidationResultRequest\0324.google.clou" + + "d.dialogflow.cx.v3.AgentValidationResult" + + "\"J\202\323\344\223\002=\022;/v3/{name=projects/*/locations" + + "/*/agents/*/validationResult}\332A\004name\032x\312A" + + "\031dialogflow.googleapis.com\322AYhttps://www" + + ".googleapis.com/auth/cloud-platform,http" + + "s://www.googleapis.com/auth/dialogflowB\232" + + "\001\n!com.google.cloud.dialogflow.cx.v3B\nAg" + + "entProtoP\001Z?google.golang.org/genproto/g" + + "oogleapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002" + + "\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -218,6 +222,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.SecuritySettingsProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), @@ -250,6 +255,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SecuritySettings", "EnableStackdriverLogging", "EnableSpellCorrection", + "AdvancedSettings", }); internal_static_google_cloud_dialogflow_cx_v3_ListAgentsRequest_descriptor = getDescriptor().getMessageTypes().get(2); @@ -363,6 +369,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.SecuritySettingsProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java index 2709a7e78..2f61be1df 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Experiment.java @@ -42,6 +42,7 @@ private Experiment() { displayName_ = ""; description_ = ""; state_ = 0; + rolloutFailureReason_ = ""; variantsHistory_ = java.util.Collections.emptyList(); } @@ -225,6 +226,45 @@ private Experiment( extensionRegistry)); break; } + case 114: + { + com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder subBuilder = null; + if (rolloutConfig_ != null) { + subBuilder = rolloutConfig_.toBuilder(); + } + rolloutConfig_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rolloutConfig_); + rolloutConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + com.google.cloud.dialogflow.cx.v3.RolloutState.Builder subBuilder = null; + if (rolloutState_ != null) { + subBuilder = rolloutState_.toBuilder(); + } + rolloutState_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.RolloutState.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rolloutState_); + rolloutState_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + rolloutFailureReason_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -312,6 +352,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * DONE = 3; */ DONE(3), + /** + * + * + *
+     * The experiment with auto-rollout enabled has failed.
+     * 
+ * + * ROLLOUT_FAILED = 4; + */ + ROLLOUT_FAILED(4), UNRECOGNIZED(-1), ; @@ -355,6 +405,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * DONE = 3; */ public static final int DONE_VALUE = 3; + /** + * + * + *
+     * The experiment with auto-rollout enabled has failed.
+     * 
+ * + * ROLLOUT_FAILED = 4; + */ + public static final int ROLLOUT_FAILED_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -388,6 +448,8 @@ public static State forNumber(int value) { return RUNNING; case 3: return DONE; + case 4: + return ROLLOUT_FAILED; default: return null; } @@ -7473,9 +7535,9 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * *
    * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
+   * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+   * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+   * RUNNING->DONE.
    * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -7491,9 +7553,9 @@ public int getStateValue() { * *
    * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
+   * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+   * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+   * RUNNING->DONE.
    * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -7558,6 +7620,165 @@ public com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder getDefin return getDefinition(); } + public static final int ROLLOUT_CONFIG_FIELD_NUMBER = 14; + private com.google.cloud.dialogflow.cx.v3.RolloutConfig rolloutConfig_; + /** + * + * + *
+   * The configuration for auto rollout. If set, there should be exactly two
+   * variants in the experiment (control variant being the default version of
+   * the flow), the traffic allocation for the non-control variant will
+   * gradually increase to 100% when conditions are met, and eventually
+   * replace the control variant to become the default version of the flow.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * + * @return Whether the rolloutConfig field is set. + */ + @java.lang.Override + public boolean hasRolloutConfig() { + return rolloutConfig_ != null; + } + /** + * + * + *
+   * The configuration for auto rollout. If set, there should be exactly two
+   * variants in the experiment (control variant being the default version of
+   * the flow), the traffic allocation for the non-control variant will
+   * gradually increase to 100% when conditions are met, and eventually
+   * replace the control variant to become the default version of the flow.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * + * @return The rolloutConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig getRolloutConfig() { + return rolloutConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.RolloutConfig.getDefaultInstance() + : rolloutConfig_; + } + /** + * + * + *
+   * The configuration for auto rollout. If set, there should be exactly two
+   * variants in the experiment (control variant being the default version of
+   * the flow), the traffic allocation for the non-control variant will
+   * gradually increase to 100% when conditions are met, and eventually
+   * replace the control variant to become the default version of the flow.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfigOrBuilder getRolloutConfigOrBuilder() { + return getRolloutConfig(); + } + + public static final int ROLLOUT_STATE_FIELD_NUMBER = 15; + private com.google.cloud.dialogflow.cx.v3.RolloutState rolloutState_; + /** + * + * + *
+   * State of the auto rollout process.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * + * @return Whether the rolloutState field is set. + */ + @java.lang.Override + public boolean hasRolloutState() { + return rolloutState_ != null; + } + /** + * + * + *
+   * State of the auto rollout process.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * + * @return The rolloutState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutState getRolloutState() { + return rolloutState_ == null + ? com.google.cloud.dialogflow.cx.v3.RolloutState.getDefaultInstance() + : rolloutState_; + } + /** + * + * + *
+   * State of the auto rollout process.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutStateOrBuilder getRolloutStateOrBuilder() { + return getRolloutState(); + } + + public static final int ROLLOUT_FAILURE_REASON_FIELD_NUMBER = 16; + private volatile java.lang.Object rolloutFailureReason_; + /** + * + * + *
+   * The reason why rollout has failed. Should only be set when state is
+   * ROLLOUT_FAILED.
+   * 
+ * + * string rollout_failure_reason = 16; + * + * @return The rolloutFailureReason. + */ + @java.lang.Override + public java.lang.String getRolloutFailureReason() { + java.lang.Object ref = rolloutFailureReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutFailureReason_ = s; + return s; + } + } + /** + * + * + *
+   * The reason why rollout has failed. Should only be set when state is
+   * ROLLOUT_FAILED.
+   * 
+ * + * string rollout_failure_reason = 16; + * + * @return The bytes for rolloutFailureReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutFailureReasonBytes() { + java.lang.Object ref = rolloutFailureReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutFailureReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int RESULT_FIELD_NUMBER = 6; private com.google.cloud.dialogflow.cx.v3.Experiment.Result result_; /** @@ -7968,6 +8189,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < variantsHistory_.size(); i++) { output.writeMessage(12, variantsHistory_.get(i)); } + if (rolloutConfig_ != null) { + output.writeMessage(14, getRolloutConfig()); + } + if (rolloutState_ != null) { + output.writeMessage(15, getRolloutState()); + } + if (!getRolloutFailureReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, rolloutFailureReason_); + } unknownFields.writeTo(output); } @@ -8014,6 +8244,15 @@ public int getSerializedSize() { for (int i = 0; i < variantsHistory_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, variantsHistory_.get(i)); } + if (rolloutConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getRolloutConfig()); + } + if (rolloutState_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getRolloutState()); + } + if (!getRolloutFailureReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, rolloutFailureReason_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -8038,6 +8277,15 @@ public boolean equals(final java.lang.Object obj) { if (hasDefinition()) { if (!getDefinition().equals(other.getDefinition())) return false; } + if (hasRolloutConfig() != other.hasRolloutConfig()) return false; + if (hasRolloutConfig()) { + if (!getRolloutConfig().equals(other.getRolloutConfig())) return false; + } + if (hasRolloutState() != other.hasRolloutState()) return false; + if (hasRolloutState()) { + if (!getRolloutState().equals(other.getRolloutState())) return false; + } + if (!getRolloutFailureReason().equals(other.getRolloutFailureReason())) return false; if (hasResult() != other.hasResult()) return false; if (hasResult()) { if (!getResult().equals(other.getResult())) return false; @@ -8086,6 +8334,16 @@ public int hashCode() { hash = (37 * hash) + DEFINITION_FIELD_NUMBER; hash = (53 * hash) + getDefinition().hashCode(); } + if (hasRolloutConfig()) { + hash = (37 * hash) + ROLLOUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRolloutConfig().hashCode(); + } + if (hasRolloutState()) { + hash = (37 * hash) + ROLLOUT_STATE_FIELD_NUMBER; + hash = (53 * hash) + getRolloutState().hashCode(); + } + hash = (37 * hash) + ROLLOUT_FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getRolloutFailureReason().hashCode(); if (hasResult()) { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResult().hashCode(); @@ -8275,6 +8533,20 @@ public Builder clear() { definition_ = null; definitionBuilder_ = null; } + if (rolloutConfigBuilder_ == null) { + rolloutConfig_ = null; + } else { + rolloutConfig_ = null; + rolloutConfigBuilder_ = null; + } + if (rolloutStateBuilder_ == null) { + rolloutState_ = null; + } else { + rolloutState_ = null; + rolloutStateBuilder_ = null; + } + rolloutFailureReason_ = ""; + if (resultBuilder_ == null) { result_ = null; } else { @@ -8354,6 +8626,17 @@ public com.google.cloud.dialogflow.cx.v3.Experiment buildPartial() { } else { result.definition_ = definitionBuilder_.build(); } + if (rolloutConfigBuilder_ == null) { + result.rolloutConfig_ = rolloutConfig_; + } else { + result.rolloutConfig_ = rolloutConfigBuilder_.build(); + } + if (rolloutStateBuilder_ == null) { + result.rolloutState_ = rolloutState_; + } else { + result.rolloutState_ = rolloutStateBuilder_.build(); + } + result.rolloutFailureReason_ = rolloutFailureReason_; if (resultBuilder_ == null) { result.result_ = result_; } else { @@ -8460,6 +8743,16 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Experiment other) { if (other.hasDefinition()) { mergeDefinition(other.getDefinition()); } + if (other.hasRolloutConfig()) { + mergeRolloutConfig(other.getRolloutConfig()); + } + if (other.hasRolloutState()) { + mergeRolloutState(other.getRolloutState()); + } + if (!other.getRolloutFailureReason().isEmpty()) { + rolloutFailureReason_ = other.rolloutFailureReason_; + onChanged(); + } if (other.hasResult()) { mergeResult(other.getResult()); } @@ -8875,9 +9168,9 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * *
      * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
+     * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+     * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+     * RUNNING->DONE.
      * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -8893,9 +9186,9 @@ public int getStateValue() { * *
      * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
+     * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+     * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+     * RUNNING->DONE.
      * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -8914,9 +9207,9 @@ public Builder setStateValue(int value) { * *
      * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
+     * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+     * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+     * RUNNING->DONE.
      * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -8937,9 +9230,9 @@ public com.google.cloud.dialogflow.cx.v3.Experiment.State getState() { * *
      * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
+     * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+     * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+     * RUNNING->DONE.
      * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -8961,9 +9254,9 @@ public Builder setState(com.google.cloud.dialogflow.cx.v3.Experiment.State value * *
      * The current state of the experiment.
-     * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-     * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-     * RUNNING->CANCELLED.
+     * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+     * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+     * RUNNING->DONE.
      * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -9164,6 +9457,525 @@ public com.google.cloud.dialogflow.cx.v3.Experiment.Definition.Builder getDefini return definitionBuilder_; } + private com.google.cloud.dialogflow.cx.v3.RolloutConfig rolloutConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutConfig, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutConfigOrBuilder> + rolloutConfigBuilder_; + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * + * @return Whether the rolloutConfig field is set. + */ + public boolean hasRolloutConfig() { + return rolloutConfigBuilder_ != null || rolloutConfig_ != null; + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * + * @return The rolloutConfig. + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfig getRolloutConfig() { + if (rolloutConfigBuilder_ == null) { + return rolloutConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.RolloutConfig.getDefaultInstance() + : rolloutConfig_; + } else { + return rolloutConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + public Builder setRolloutConfig(com.google.cloud.dialogflow.cx.v3.RolloutConfig value) { + if (rolloutConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rolloutConfig_ = value; + onChanged(); + } else { + rolloutConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + public Builder setRolloutConfig( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder builderForValue) { + if (rolloutConfigBuilder_ == null) { + rolloutConfig_ = builderForValue.build(); + onChanged(); + } else { + rolloutConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + public Builder mergeRolloutConfig(com.google.cloud.dialogflow.cx.v3.RolloutConfig value) { + if (rolloutConfigBuilder_ == null) { + if (rolloutConfig_ != null) { + rolloutConfig_ = + com.google.cloud.dialogflow.cx.v3.RolloutConfig.newBuilder(rolloutConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + rolloutConfig_ = value; + } + onChanged(); + } else { + rolloutConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + public Builder clearRolloutConfig() { + if (rolloutConfigBuilder_ == null) { + rolloutConfig_ = null; + onChanged(); + } else { + rolloutConfig_ = null; + rolloutConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder getRolloutConfigBuilder() { + + onChanged(); + return getRolloutConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfigOrBuilder getRolloutConfigOrBuilder() { + if (rolloutConfigBuilder_ != null) { + return rolloutConfigBuilder_.getMessageOrBuilder(); + } else { + return rolloutConfig_ == null + ? com.google.cloud.dialogflow.cx.v3.RolloutConfig.getDefaultInstance() + : rolloutConfig_; + } + } + /** + * + * + *
+     * The configuration for auto rollout. If set, there should be exactly two
+     * variants in the experiment (control variant being the default version of
+     * the flow), the traffic allocation for the non-control variant will
+     * gradually increase to 100% when conditions are met, and eventually
+     * replace the control variant to become the default version of the flow.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutConfig, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutConfigOrBuilder> + getRolloutConfigFieldBuilder() { + if (rolloutConfigBuilder_ == null) { + rolloutConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutConfig, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutConfigOrBuilder>( + getRolloutConfig(), getParentForChildren(), isClean()); + rolloutConfig_ = null; + } + return rolloutConfigBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3.RolloutState rolloutState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutState, + com.google.cloud.dialogflow.cx.v3.RolloutState.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutStateOrBuilder> + rolloutStateBuilder_; + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * + * @return Whether the rolloutState field is set. + */ + public boolean hasRolloutState() { + return rolloutStateBuilder_ != null || rolloutState_ != null; + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * + * @return The rolloutState. + */ + public com.google.cloud.dialogflow.cx.v3.RolloutState getRolloutState() { + if (rolloutStateBuilder_ == null) { + return rolloutState_ == null + ? com.google.cloud.dialogflow.cx.v3.RolloutState.getDefaultInstance() + : rolloutState_; + } else { + return rolloutStateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + public Builder setRolloutState(com.google.cloud.dialogflow.cx.v3.RolloutState value) { + if (rolloutStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rolloutState_ = value; + onChanged(); + } else { + rolloutStateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + public Builder setRolloutState( + com.google.cloud.dialogflow.cx.v3.RolloutState.Builder builderForValue) { + if (rolloutStateBuilder_ == null) { + rolloutState_ = builderForValue.build(); + onChanged(); + } else { + rolloutStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + public Builder mergeRolloutState(com.google.cloud.dialogflow.cx.v3.RolloutState value) { + if (rolloutStateBuilder_ == null) { + if (rolloutState_ != null) { + rolloutState_ = + com.google.cloud.dialogflow.cx.v3.RolloutState.newBuilder(rolloutState_) + .mergeFrom(value) + .buildPartial(); + } else { + rolloutState_ = value; + } + onChanged(); + } else { + rolloutStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + public Builder clearRolloutState() { + if (rolloutStateBuilder_ == null) { + rolloutState_ = null; + onChanged(); + } else { + rolloutState_ = null; + rolloutStateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + public com.google.cloud.dialogflow.cx.v3.RolloutState.Builder getRolloutStateBuilder() { + + onChanged(); + return getRolloutStateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + public com.google.cloud.dialogflow.cx.v3.RolloutStateOrBuilder getRolloutStateOrBuilder() { + if (rolloutStateBuilder_ != null) { + return rolloutStateBuilder_.getMessageOrBuilder(); + } else { + return rolloutState_ == null + ? com.google.cloud.dialogflow.cx.v3.RolloutState.getDefaultInstance() + : rolloutState_; + } + } + /** + * + * + *
+     * State of the auto rollout process.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutState, + com.google.cloud.dialogflow.cx.v3.RolloutState.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutStateOrBuilder> + getRolloutStateFieldBuilder() { + if (rolloutStateBuilder_ == null) { + rolloutStateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutState, + com.google.cloud.dialogflow.cx.v3.RolloutState.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutStateOrBuilder>( + getRolloutState(), getParentForChildren(), isClean()); + rolloutState_ = null; + } + return rolloutStateBuilder_; + } + + private java.lang.Object rolloutFailureReason_ = ""; + /** + * + * + *
+     * The reason why rollout has failed. Should only be set when state is
+     * ROLLOUT_FAILED.
+     * 
+ * + * string rollout_failure_reason = 16; + * + * @return The rolloutFailureReason. + */ + public java.lang.String getRolloutFailureReason() { + java.lang.Object ref = rolloutFailureReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutFailureReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The reason why rollout has failed. Should only be set when state is
+     * ROLLOUT_FAILED.
+     * 
+ * + * string rollout_failure_reason = 16; + * + * @return The bytes for rolloutFailureReason. + */ + public com.google.protobuf.ByteString getRolloutFailureReasonBytes() { + java.lang.Object ref = rolloutFailureReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutFailureReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The reason why rollout has failed. Should only be set when state is
+     * ROLLOUT_FAILED.
+     * 
+ * + * string rollout_failure_reason = 16; + * + * @param value The rolloutFailureReason to set. + * @return This builder for chaining. + */ + public Builder setRolloutFailureReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutFailureReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The reason why rollout has failed. Should only be set when state is
+     * ROLLOUT_FAILED.
+     * 
+ * + * string rollout_failure_reason = 16; + * + * @return This builder for chaining. + */ + public Builder clearRolloutFailureReason() { + + rolloutFailureReason_ = getDefaultInstance().getRolloutFailureReason(); + onChanged(); + return this; + } + /** + * + * + *
+     * The reason why rollout has failed. Should only be set when state is
+     * ROLLOUT_FAILED.
+     * 
+ * + * string rollout_failure_reason = 16; + * + * @param value The bytes for rolloutFailureReason to set. + * @return This builder for chaining. + */ + public Builder setRolloutFailureReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rolloutFailureReason_ = value; + onChanged(); + return this; + } + private com.google.cloud.dialogflow.cx.v3.Experiment.Result result_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.Experiment.Result, diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java index 2d8061387..885fe57c9 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentOrBuilder.java @@ -109,9 +109,9 @@ public interface ExperimentOrBuilder * *
    * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
+   * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+   * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+   * RUNNING->DONE.
    * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -124,9 +124,9 @@ public interface ExperimentOrBuilder * *
    * The current state of the experiment.
-   * Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
-   * Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
-   * RUNNING->CANCELLED.
+   * Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
+   * Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
+   * RUNNING->DONE.
    * 
* * .google.cloud.dialogflow.cx.v3.Experiment.State state = 4; @@ -170,6 +170,115 @@ public interface ExperimentOrBuilder */ com.google.cloud.dialogflow.cx.v3.Experiment.DefinitionOrBuilder getDefinitionOrBuilder(); + /** + * + * + *
+   * The configuration for auto rollout. If set, there should be exactly two
+   * variants in the experiment (control variant being the default version of
+   * the flow), the traffic allocation for the non-control variant will
+   * gradually increase to 100% when conditions are met, and eventually
+   * replace the control variant to become the default version of the flow.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * + * @return Whether the rolloutConfig field is set. + */ + boolean hasRolloutConfig(); + /** + * + * + *
+   * The configuration for auto rollout. If set, there should be exactly two
+   * variants in the experiment (control variant being the default version of
+   * the flow), the traffic allocation for the non-control variant will
+   * gradually increase to 100% when conditions are met, and eventually
+   * replace the control variant to become the default version of the flow.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + * + * @return The rolloutConfig. + */ + com.google.cloud.dialogflow.cx.v3.RolloutConfig getRolloutConfig(); + /** + * + * + *
+   * The configuration for auto rollout. If set, there should be exactly two
+   * variants in the experiment (control variant being the default version of
+   * the flow), the traffic allocation for the non-control variant will
+   * gradually increase to 100% when conditions are met, and eventually
+   * replace the control variant to become the default version of the flow.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutConfig rollout_config = 14; + */ + com.google.cloud.dialogflow.cx.v3.RolloutConfigOrBuilder getRolloutConfigOrBuilder(); + + /** + * + * + *
+   * State of the auto rollout process.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * + * @return Whether the rolloutState field is set. + */ + boolean hasRolloutState(); + /** + * + * + *
+   * State of the auto rollout process.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + * + * @return The rolloutState. + */ + com.google.cloud.dialogflow.cx.v3.RolloutState getRolloutState(); + /** + * + * + *
+   * State of the auto rollout process.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.RolloutState rollout_state = 15; + */ + com.google.cloud.dialogflow.cx.v3.RolloutStateOrBuilder getRolloutStateOrBuilder(); + + /** + * + * + *
+   * The reason why rollout has failed. Should only be set when state is
+   * ROLLOUT_FAILED.
+   * 
+ * + * string rollout_failure_reason = 16; + * + * @return The rolloutFailureReason. + */ + java.lang.String getRolloutFailureReason(); + /** + * + * + *
+   * The reason why rollout has failed. Should only be set when state is
+   * ROLLOUT_FAILED.
+   * 
+ * + * string rollout_failure_reason = 16; + * + * @return The bytes for rolloutFailureReason. + */ + com.google.protobuf.ByteString getRolloutFailureReasonBytes(); + /** * * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java index 44437e444..9bc219323 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExperimentProto.java @@ -63,6 +63,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_VariantsHistory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_RolloutState_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_RolloutState_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -112,133 +124,146 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "le/protobuf/duration.proto\032\033google/proto" + "buf/empty.proto\032 google/protobuf/field_m" + "ask.proto\032\037google/protobuf/timestamp.pro" - + "to\"\275\017\n\nExperiment\022\014\n\004name\030\001 \001(\t\022\031\n\014displ" + + "to\"\373\020\n\nExperiment\022\014\n\004name\030\001 \001(\t\022\031\n\014displ" + "ay_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t\022" + ">\n\005state\030\004 \001(\0162/.google.cloud.dialogflow" + ".cx.v3.Experiment.State\022H\n\ndefinition\030\005 " + "\001(\01324.google.cloud.dialogflow.cx.v3.Expe" - + "riment.Definition\022@\n\006result\030\006 \001(\01320.goog" - + "le.cloud.dialogflow.cx.v3.Experiment.Res" - + "ult\022/\n\013create_time\030\007 \001(\0132\032.google.protob" - + "uf.Timestamp\022.\n\nstart_time\030\010 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022,\n\010end_time\030\t \001(\0132\032" - + ".google.protobuf.Timestamp\0224\n\020last_updat" - + "e_time\030\n \001(\0132\032.google.protobuf.Timestamp" - + "\0224\n\021experiment_length\030\013 \001(\0132\031.google.pro" - + "tobuf.Duration\022H\n\020variants_history\030\014 \003(\013" - + "2..google.cloud.dialogflow.cx.v3.Variant" - + "sHistory\032w\n\nDefinition\022\021\n\tcondition\030\001 \001(" - + "\t\022J\n\020version_variants\030\002 \001(\0132..google.clo" - + "ud.dialogflow.cx.v3.VersionVariantsH\000B\n\n" - + "\010variants\032\213\010\n\006Result\022X\n\017version_metrics\030" - + "\001 \003(\0132?.google.cloud.dialogflow.cx.v3.Ex" - + "periment.Result.VersionMetrics\0224\n\020last_u" - + "pdate_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tamp\032g\n\022ConfidenceInterval\022\030\n\020confidence" - + "_level\030\001 \001(\001\022\r\n\005ratio\030\002 \001(\001\022\023\n\013lower_bou" - + "nd\030\003 \001(\001\022\023\n\013upper_bound\030\004 \001(\001\032\260\002\n\006Metric" - + "\022I\n\004type\030\001 \001(\0162;.google.cloud.dialogflow" - + ".cx.v3.Experiment.Result.MetricType\022N\n\nc" - + "ount_type\030\005 \001(\0162:.google.cloud.dialogflo" - + "w.cx.v3.Experiment.Result.CountType\022\017\n\005r" - + "atio\030\002 \001(\001H\000\022\017\n\005count\030\004 \001(\001H\000\022`\n\023confide" - + "nce_interval\030\003 \001(\0132C.google.cloud.dialog" - + "flow.cx.v3.Experiment.Result.ConfidenceI" - + "ntervalB\007\n\005value\032\252\001\n\016VersionMetrics\0227\n\007v" - + "ersion\030\001 \001(\tB&\372A#\n!dialogflow.googleapis" - + ".com/Version\022H\n\007metrics\030\002 \003(\01327.google.c" - + "loud.dialogflow.cx.v3.Experiment.Result." - + "Metric\022\025\n\rsession_count\030\003 \001(\005\"\266\001\n\nMetric" - + "Type\022\026\n\022METRIC_UNSPECIFIED\020\000\022&\n\"CONTAINE" - + "D_SESSION_NO_CALLBACK_RATE\020\001\022\033\n\027LIVE_AGE" - + "NT_HANDOFF_RATE\020\002\022\031\n\025CALLBACK_SESSION_RA" - + "TE\020\003\022\032\n\026ABANDONED_SESSION_RATE\020\004\022\024\n\020SESS" - + "ION_END_RATE\020\005\"o\n\tCountType\022\032\n\026COUNT_TYP" - + "E_UNSPECIFIED\020\000\022\030\n\024TOTAL_NO_MATCH_COUNT\020" - + "\001\022\024\n\020TOTAL_TURN_COUNT\020\002\022\026\n\022AVERAGE_TURN_" - + "COUNT\020\003\"@\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" - + "\t\n\005DRAFT\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003:\226\001\352A\222\001" - + "\n$dialogflow.googleapis.com/Experiment\022j" - + "projects/{project}/locations/{location}/" - + "agents/{agent}/environments/{environment" - + "}/experiments/{experiment}\"\255\001\n\017VersionVa" - + "riants\022H\n\010variants\030\001 \003(\01326.google.cloud." - + "dialogflow.cx.v3.VersionVariants.Variant" - + "\032P\n\007Variant\022\017\n\007version\030\001 \001(\t\022\032\n\022traffic_" - + "allocation\030\002 \001(\002\022\030\n\020is_control_group\030\003 \001" - + "(\010\"\232\001\n\017VariantsHistory\022J\n\020version_varian" - + "ts\030\001 \001(\0132..google.cloud.dialogflow.cx.v3" - + ".VersionVariantsH\000\022/\n\013update_time\030\002 \001(\0132" - + "\032.google.protobuf.TimestampB\n\n\010variants\"" - + "}\n\026ListExperimentsRequest\022<\n\006parent\030\001 \001(" - + "\tB,\340A\002\372A&\022$dialogflow.googleapis.com/Exp" - + "eriment\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" - + "\030\003 \001(\t\"r\n\027ListExperimentsResponse\022>\n\013exp" - + "eriments\030\001 \003(\0132).google.cloud.dialogflow" - + ".cx.v3.Experiment\022\027\n\017next_page_token\030\002 \001" - + "(\t\"R\n\024GetExperimentRequest\022:\n\004name\030\001 \001(\t" - + "B,\340A\002\372A&\n$dialogflow.googleapis.com/Expe" - + "riment\"\233\001\n\027CreateExperimentRequest\022<\n\006pa" - + "rent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.googleapi" - + "s.com/Experiment\022B\n\nexperiment\030\002 \001(\0132).g" - + "oogle.cloud.dialogflow.cx.v3.ExperimentB" - + "\003\340A\002\"\223\001\n\027UpdateExperimentRequest\022B\n\nexpe" - + "riment\030\001 \001(\0132).google.cloud.dialogflow.c" - + "x.v3.ExperimentB\003\340A\002\0224\n\013update_mask\030\002 \001(" - + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\"U\n\027De" - + "leteExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002" - + "\372A&\n$dialogflow.googleapis.com/Experimen" - + "t\"T\n\026StartExperimentRequest\022:\n\004name\030\001 \001(" - + "\tB,\340A\002\372A&\n$dialogflow.googleapis.com/Exp" - + "eriment\"S\n\025StopExperimentRequest\022:\n\004name" - + "\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.googleapis.co" - + "m/Experiment2\370\014\n\013Experiments\022\332\001\n\017ListExp" - + "eriments\0225.google.cloud.dialogflow.cx.v3" - + ".ListExperimentsRequest\0326.google.cloud.d" - + "ialogflow.cx.v3.ListExperimentsResponse\"" - + "X\202\323\344\223\002I\022G/v3/{parent=projects/*/location" - + "s/*/agents/*/environments/*}/experiments" - + "\332A\006parent\022\307\001\n\rGetExperiment\0223.google.clo" - + "ud.dialogflow.cx.v3.GetExperimentRequest" + + "riment.Definition\022D\n\016rollout_config\030\016 \001(" + + "\0132,.google.cloud.dialogflow.cx.v3.Rollou" + + "tConfig\022B\n\rrollout_state\030\017 \001(\0132+.google." + + "cloud.dialogflow.cx.v3.RolloutState\022\036\n\026r" + + "ollout_failure_reason\030\020 \001(\t\022@\n\006result\030\006 " + + "\001(\01320.google.cloud.dialogflow.cx.v3.Expe" + + "riment.Result\022/\n\013create_time\030\007 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022.\n\nstart_time\030\010 \001" + + "(\0132\032.google.protobuf.Timestamp\022,\n\010end_ti" + + "me\030\t \001(\0132\032.google.protobuf.Timestamp\0224\n\020" + + "last_update_time\030\n \001(\0132\032.google.protobuf" + + ".Timestamp\0224\n\021experiment_length\030\013 \001(\0132\031." + + "google.protobuf.Duration\022H\n\020variants_his" + + "tory\030\014 \003(\0132..google.cloud.dialogflow.cx." + + "v3.VariantsHistory\032w\n\nDefinition\022\021\n\tcond" + + "ition\030\001 \001(\t\022J\n\020version_variants\030\002 \001(\0132.." + + "google.cloud.dialogflow.cx.v3.VersionVar" + + "iantsH\000B\n\n\010variants\032\213\010\n\006Result\022X\n\017versio" + + "n_metrics\030\001 \003(\0132?.google.cloud.dialogflo" + + "w.cx.v3.Experiment.Result.VersionMetrics" + + "\0224\n\020last_update_time\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\032g\n\022ConfidenceInterval\022\030\n\020" + + "confidence_level\030\001 \001(\001\022\r\n\005ratio\030\002 \001(\001\022\023\n" + + "\013lower_bound\030\003 \001(\001\022\023\n\013upper_bound\030\004 \001(\001\032" + + "\260\002\n\006Metric\022I\n\004type\030\001 \001(\0162;.google.cloud." + + "dialogflow.cx.v3.Experiment.Result.Metri" + + "cType\022N\n\ncount_type\030\005 \001(\0162:.google.cloud" + + ".dialogflow.cx.v3.Experiment.Result.Coun" + + "tType\022\017\n\005ratio\030\002 \001(\001H\000\022\017\n\005count\030\004 \001(\001H\000\022" + + "`\n\023confidence_interval\030\003 \001(\0132C.google.cl" + + "oud.dialogflow.cx.v3.Experiment.Result.C" + + "onfidenceIntervalB\007\n\005value\032\252\001\n\016VersionMe" + + "trics\0227\n\007version\030\001 \001(\tB&\372A#\n!dialogflow." + + "googleapis.com/Version\022H\n\007metrics\030\002 \003(\0132" + + "7.google.cloud.dialogflow.cx.v3.Experime" + + "nt.Result.Metric\022\025\n\rsession_count\030\003 \001(\005\"" + + "\266\001\n\nMetricType\022\026\n\022METRIC_UNSPECIFIED\020\000\022&" + + "\n\"CONTAINED_SESSION_NO_CALLBACK_RATE\020\001\022\033" + + "\n\027LIVE_AGENT_HANDOFF_RATE\020\002\022\031\n\025CALLBACK_" + + "SESSION_RATE\020\003\022\032\n\026ABANDONED_SESSION_RATE" + + "\020\004\022\024\n\020SESSION_END_RATE\020\005\"o\n\tCountType\022\032\n" + + "\026COUNT_TYPE_UNSPECIFIED\020\000\022\030\n\024TOTAL_NO_MA" + + "TCH_COUNT\020\001\022\024\n\020TOTAL_TURN_COUNT\020\002\022\026\n\022AVE" + + "RAGE_TURN_COUNT\020\003\"T\n\005State\022\025\n\021STATE_UNSP" + + "ECIFIED\020\000\022\t\n\005DRAFT\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DON" + + "E\020\003\022\022\n\016ROLLOUT_FAILED\020\004:\226\001\352A\222\001\n$dialogfl" + + "ow.googleapis.com/Experiment\022jprojects/{" + + "project}/locations/{location}/agents/{ag" + + "ent}/environments/{environment}/experime" + + "nts/{experiment}\"\255\001\n\017VersionVariants\022H\n\010" + + "variants\030\001 \003(\01326.google.cloud.dialogflow" + + ".cx.v3.VersionVariants.Variant\032P\n\007Varian" + + "t\022\017\n\007version\030\001 \001(\t\022\032\n\022traffic_allocation" + + "\030\002 \001(\002\022\030\n\020is_control_group\030\003 \001(\010\"\232\001\n\017Var" + + "iantsHistory\022J\n\020version_variants\030\001 \001(\0132." + + ".google.cloud.dialogflow.cx.v3.VersionVa" + + "riantsH\000\022/\n\013update_time\030\002 \001(\0132\032.google.p" + + "rotobuf.TimestampB\n\n\010variants\"\205\002\n\rRollou" + + "tConfig\022O\n\rrollout_steps\030\001 \003(\01328.google." + + "cloud.dialogflow.cx.v3.RolloutConfig.Rol" + + "loutStep\022\031\n\021rollout_condition\030\002 \001(\t\022\031\n\021f" + + "ailure_condition\030\003 \001(\t\032m\n\013RolloutStep\022\024\n" + + "\014display_name\030\001 \001(\t\022\027\n\017traffic_percent\030\002" + + " \001(\005\022/\n\014min_duration\030\003 \001(\0132\031.google.prot" + + "obuf.Duration\"`\n\014RolloutState\022\014\n\004step\030\001 " + + "\001(\t\022\022\n\nstep_index\030\003 \001(\005\022.\n\nstart_time\030\002 " + + "\001(\0132\032.google.protobuf.Timestamp\"}\n\026ListE" + + "xperimentsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A" + + "&\022$dialogflow.googleapis.com/Experiment\022" + + "\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"r" + + "\n\027ListExperimentsResponse\022>\n\013experiments" + + "\030\001 \003(\0132).google.cloud.dialogflow.cx.v3.E" + + "xperiment\022\027\n\017next_page_token\030\002 \001(\t\"R\n\024Ge" + + "tExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&" + + "\n$dialogflow.googleapis.com/Experiment\"\233" + + "\001\n\027CreateExperimentRequest\022<\n\006parent\030\001 \001" + + "(\tB,\340A\002\372A&\022$dialogflow.googleapis.com/Ex" + + "periment\022B\n\nexperiment\030\002 \001(\0132).google.cl" + + "oud.dialogflow.cx.v3.ExperimentB\003\340A\002\"\223\001\n" + + "\027UpdateExperimentRequest\022B\n\nexperiment\030\001" + + " \001(\0132).google.cloud.dialogflow.cx.v3.Exp" + + "erimentB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMaskB\003\340A\002\"U\n\027DeleteExpe" + + "rimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dia" + + "logflow.googleapis.com/Experiment\"T\n\026Sta" + + "rtExperimentRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A" + + "&\n$dialogflow.googleapis.com/Experiment\"" + + "S\n\025StopExperimentRequest\022:\n\004name\030\001 \001(\tB," + + "\340A\002\372A&\n$dialogflow.googleapis.com/Experi" + + "ment2\370\014\n\013Experiments\022\332\001\n\017ListExperiments" + + "\0225.google.cloud.dialogflow.cx.v3.ListExp" + + "erimentsRequest\0326.google.cloud.dialogflo" + + "w.cx.v3.ListExperimentsResponse\"X\202\323\344\223\002I\022" + + "G/v3/{parent=projects/*/locations/*/agen" + + "ts/*/environments/*}/experiments\332A\006paren" + + "t\022\307\001\n\rGetExperiment\0223.google.cloud.dialo" + + "gflow.cx.v3.GetExperimentRequest\032).googl" + + "e.cloud.dialogflow.cx.v3.Experiment\"V\202\323\344" + + "\223\002I\022G/v3/{name=projects/*/locations/*/ag" + + "ents/*/environments/*/experiments/*}\332A\004n" + + "ame\022\346\001\n\020CreateExperiment\0226.google.cloud." + + "dialogflow.cx.v3.CreateExperimentRequest" + "\032).google.cloud.dialogflow.cx.v3.Experim" - + "ent\"V\202\323\344\223\002I\022G/v3/{name=projects/*/locati" - + "ons/*/agents/*/environments/*/experiment" - + "s/*}\332A\004name\022\346\001\n\020CreateExperiment\0226.googl" - + "e.cloud.dialogflow.cx.v3.CreateExperimen" - + "tRequest\032).google.cloud.dialogflow.cx.v3" - + ".Experiment\"o\202\323\344\223\002U\"G/v3/{parent=project" - + "s/*/locations/*/agents/*/environments/*}" - + "/experiments:\nexperiment\332A\021parent,experi" - + "ment\022\366\001\n\020UpdateExperiment\0226.google.cloud" - + ".dialogflow.cx.v3.UpdateExperimentReques" - + "t\032).google.cloud.dialogflow.cx.v3.Experi" - + "ment\"\177\202\323\344\223\002`2R/v3/{experiment.name=proje" - + "cts/*/locations/*/agents/*/environments/" - + "*/experiments/*}:\nexperiment\332A\026experimen" - + "t,update_mask\022\272\001\n\020DeleteExperiment\0226.goo" - + "gle.cloud.dialogflow.cx.v3.DeleteExperim" - + "entRequest\032\026.google.protobuf.Empty\"V\202\323\344\223" - + "\002I*G/v3/{name=projects/*/locations/*/age" - + "nts/*/environments/*/experiments/*}\332A\004na" - + "me\022\324\001\n\017StartExperiment\0225.google.cloud.di" - + "alogflow.cx.v3.StartExperimentRequest\032)." - + "google.cloud.dialogflow.cx.v3.Experiment" - + "\"_\202\323\344\223\002R\"M/v3/{name=projects/*/locations" - + "/*/agents/*/environments/*/experiments/*" - + "}:start:\001*\332A\004name\022\321\001\n\016StopExperiment\0224.g" - + "oogle.cloud.dialogflow.cx.v3.StopExperim" - + "entRequest\032).google.cloud.dialogflow.cx." - + "v3.Experiment\"^\202\323\344\223\002Q\"L/v3/{name=project" - + "s/*/locations/*/agents/*/environments/*/" - + "experiments/*}:stop:\001*\332A\004name\032x\312A\031dialog" - + "flow.googleapis.com\322AYhttps://www.google" - + "apis.com/auth/cloud-platform,https://www" - + ".googleapis.com/auth/dialogflowB\237\001\n!com." - + "google.cloud.dialogflow.cx.v3B\017Experimen" - + "tProtoP\001Z?google.golang.org/genproto/goo" - + "gleapis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002D" - + "F\252\002\035Google.Cloud.Dialogflow.Cx.V3b\006proto" - + "3" + + "ent\"o\202\323\344\223\002U\"G/v3/{parent=projects/*/loca" + + "tions/*/agents/*/environments/*}/experim" + + "ents:\nexperiment\332A\021parent,experiment\022\366\001\n" + + "\020UpdateExperiment\0226.google.cloud.dialogf" + + "low.cx.v3.UpdateExperimentRequest\032).goog" + + "le.cloud.dialogflow.cx.v3.Experiment\"\177\202\323" + + "\344\223\002`2R/v3/{experiment.name=projects/*/lo" + + "cations/*/agents/*/environments/*/experi" + + "ments/*}:\nexperiment\332A\026experiment,update" + + "_mask\022\272\001\n\020DeleteExperiment\0226.google.clou" + + "d.dialogflow.cx.v3.DeleteExperimentReque" + + "st\032\026.google.protobuf.Empty\"V\202\323\344\223\002I*G/v3/" + + "{name=projects/*/locations/*/agents/*/en" + + "vironments/*/experiments/*}\332A\004name\022\324\001\n\017S" + + "tartExperiment\0225.google.cloud.dialogflow" + + ".cx.v3.StartExperimentRequest\032).google.c" + + "loud.dialogflow.cx.v3.Experiment\"_\202\323\344\223\002R" + + "\"M/v3/{name=projects/*/locations/*/agent" + + "s/*/environments/*/experiments/*}:start:" + + "\001*\332A\004name\022\321\001\n\016StopExperiment\0224.google.cl" + + "oud.dialogflow.cx.v3.StopExperimentReque" + + "st\032).google.cloud.dialogflow.cx.v3.Exper" + + "iment\"^\202\323\344\223\002Q\"L/v3/{name=projects/*/loca" + + "tions/*/agents/*/environments/*/experime" + + "nts/*}:stop:\001*\332A\004name\032x\312A\031dialogflow.goo" + + "gleapis.com\322AYhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/dialogflowB\237\001\n!com.google.c" + + "loud.dialogflow.cx.v3B\017ExperimentProtoP\001" + + "Z?google.golang.org/genproto/googleapis/" + + "cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Goog" + + "le.Cloud.Dialogflow.Cx.V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -264,6 +289,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Description", "State", "Definition", + "RolloutConfig", + "RolloutState", + "RolloutFailureReason", "Result", "CreateTime", "StartTime", @@ -344,8 +372,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "VersionVariants", "UpdateTime", "Variants", }); - internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_descriptor, + new java.lang.String[] { + "RolloutSteps", "RolloutCondition", "FailureCondition", + }); + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_descriptor, + new java.lang.String[] { + "DisplayName", "TrafficPercent", "MinDuration", + }); + internal_static_google_cloud_dialogflow_cx_v3_RolloutState_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_RolloutState_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_RolloutState_descriptor, + new java.lang.String[] { + "Step", "StepIndex", "StartTime", + }); + internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsRequest_descriptor, @@ -353,7 +407,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListExperimentsResponse_descriptor, @@ -361,7 +415,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Experiments", "NextPageToken", }); internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_GetExperimentRequest_descriptor, @@ -369,7 +423,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_CreateExperimentRequest_descriptor, @@ -377,7 +431,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Experiment", }); internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_UpdateExperimentRequest_descriptor, @@ -385,7 +439,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Experiment", "UpdateMask", }); internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_DeleteExperimentRequest_descriptor, @@ -393,7 +447,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_StartExperimentRequest_descriptor, @@ -401,7 +455,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_StopExperimentRequest_descriptor, diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java index 7b60a6fbc..0051de387 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowProto.java @@ -104,139 +104,141 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\022\035google.cloud.dialogflow.cx.v3\032\034googl" + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032(google/clo" - + "ud/dialogflow/cx/v3/page.proto\0326google/c" - + "loud/dialogflow/cx/v3/validation_message" - + ".proto\032#google/longrunning/operations.pr" - + "oto\032\033google/protobuf/empty.proto\032 google" - + "/protobuf/field_mask.proto\032\037google/proto" - + "buf/timestamp.proto\"\254\003\n\013NluSettings\022H\n\nm" - + "odel_type\030\001 \001(\01624.google.cloud.dialogflo" - + "w.cx.v3.NluSettings.ModelType\022 \n\030classif" - + "ication_threshold\030\003 \001(\002\022Y\n\023model_trainin" - + "g_mode\030\004 \001(\0162<.google.cloud.dialogflow.c" - + "x.v3.NluSettings.ModelTrainingMode\"Y\n\tMo" - + "delType\022\032\n\026MODEL_TYPE_UNSPECIFIED\020\000\022\027\n\023M" - + "ODEL_TYPE_STANDARD\020\001\022\027\n\023MODEL_TYPE_ADVAN" - + "CED\020\003\"{\n\021ModelTrainingMode\022#\n\037MODEL_TRAI" - + "NING_MODE_UNSPECIFIED\020\000\022!\n\035MODEL_TRAININ" - + "G_MODE_AUTOMATIC\020\001\022\036\n\032MODEL_TRAINING_MOD" - + "E_MANUAL\020\002\"\326\003\n\004Flow\022\014\n\004name\030\001 \001(\t\022\031\n\014dis" - + "play_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(" - + "\t\022I\n\021transition_routes\030\004 \003(\0132..google.cl" - + "oud.dialogflow.cx.v3.TransitionRoute\022C\n\016" - + "event_handlers\030\n \003(\0132+.google.cloud.dial" - + "ogflow.cx.v3.EventHandler\022T\n\027transition_" - + "route_groups\030\017 \003(\tB3\372A0\n.dialogflow.goog" - + "leapis.com/TransitionRouteGroup\022@\n\014nlu_s" - + "ettings\030\013 \001(\0132*.google.cloud.dialogflow." - + "cx.v3.NluSettings:h\352Ae\n\036dialogflow.googl" - + "eapis.com/Flow\022Cprojects/{project}/locat" - + "ions/{location}/agents/{agent}/flows/{fl" - + "ow}\"\232\001\n\021CreateFlowRequest\0226\n\006parent\030\001 \001(" - + "\tB&\340A\002\372A \022\036dialogflow.googleapis.com/Flo" - + "w\0226\n\004flow\030\002 \001(\0132#.google.cloud.dialogflo" - + "w.cx.v3.FlowB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t" - + "\"X\n\021DeleteFlowRequest\0224\n\004name\030\001 \001(\tB&\340A\002" - + "\372A \n\036dialogflow.googleapis.com/Flow\022\r\n\005f" - + "orce\030\002 \001(\010\"\210\001\n\020ListFlowsRequest\0226\n\006paren" - + "t\030\001 \001(\tB&\340A\002\372A \022\036dialogflow.googleapis.c" - + "om/Flow\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" - + "\030\003 \001(\t\022\025\n\rlanguage_code\030\004 \001(\t\"`\n\021ListFlo" - + "wsResponse\0222\n\005flows\030\001 \003(\0132#.google.cloud" - + ".dialogflow.cx.v3.Flow\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\"]\n\016GetFlowRequest\0224\n\004name\030\001 \001(\tB" - + "&\340A\002\372A \n\036dialogflow.googleapis.com/Flow\022" - + "\025\n\rlanguage_code\030\002 \001(\t\"\230\001\n\021UpdateFlowReq" - + "uest\0226\n\004flow\030\001 \001(\0132#.google.cloud.dialog" - + "flow.cx.v3.FlowB\003\340A\002\0224\n\013update_mask\030\002 \001(" - + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\025\n\rla" - + "nguage_code\030\003 \001(\t\"H\n\020TrainFlowRequest\0224\n" - + "\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleap" - + "is.com/Flow\"b\n\023ValidateFlowRequest\0224\n\004na" - + "me\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleapis." - + "com/Flow\022\025\n\rlanguage_code\030\002 \001(\t\"}\n\036GetFl" - + "owValidationResultRequest\022D\n\004name\030\001 \001(\tB" - + "6\340A\002\372A0\n.dialogflow.googleapis.com/FlowV" - + "alidationResult\022\025\n\rlanguage_code\030\002 \001(\t\"\261" - + "\002\n\024FlowValidationResult\022\014\n\004name\030\001 \001(\t\022M\n" - + "\023validation_messages\030\002 \003(\01320.google.clou" - + "d.dialogflow.cx.v3.ValidationMessage\022/\n\013" - + "update_time\030\003 \001(\0132\032.google.protobuf.Time" - + "stamp:\212\001\352A\206\001\n.dialogflow.googleapis.com/" - + "FlowValidationResult\022Tprojects/{project}" - + "/locations/{location}/agents/{agent}/flo" - + "ws/{flow}/validationResult\"\234\002\n\021ImportFlo" - + "wRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialog" - + "flow.googleapis.com/Flow\022\022\n\010flow_uri\030\002 \001" - + "(\tH\000\022\026\n\014flow_content\030\003 \001(\014H\000\022T\n\rimport_o" - + "ption\030\004 \001(\0162=.google.cloud.dialogflow.cx" - + ".v3.ImportFlowRequest.ImportOption\"E\n\014Im" - + "portOption\022\035\n\031IMPORT_OPTION_UNSPECIFIED\020" - + "\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\006\n\004flow\"G\n\022Imp" - + "ortFlowResponse\0221\n\004flow\030\001 \001(\tB#\372A \n\036dial" - + "ogflow.googleapis.com/Flow\"\207\001\n\021ExportFlo" - + "wRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogfl" - + "ow.googleapis.com/Flow\022\025\n\010flow_uri\030\002 \001(\t" - + "B\003\340A\001\022%\n\030include_referenced_flows\030\004 \001(\010B" - + "\003\340A\001\"H\n\022ExportFlowResponse\022\022\n\010flow_uri\030\001" - + " \001(\tH\000\022\026\n\014flow_content\030\002 \001(\014H\000B\006\n\004flow2\230" - + "\020\n\005Flows\022\263\001\n\nCreateFlow\0220.google.cloud.d" - + "ialogflow.cx.v3.CreateFlowRequest\032#.goog" - + "le.cloud.dialogflow.cx.v3.Flow\"N\202\323\344\223\002:\"2" - + "/v3/{parent=projects/*/locations/*/agent" - + "s/*}/flows:\004flow\332A\013parent,flow\022\231\001\n\nDelet" - + "eFlow\0220.google.cloud.dialogflow.cx.v3.De" - + "leteFlowRequest\032\026.google.protobuf.Empty\"" - + "A\202\323\344\223\0024*2/v3/{name=projects/*/locations/" - + "*/agents/*/flows/*}\332A\004name\022\263\001\n\tListFlows" - + "\022/.google.cloud.dialogflow.cx.v3.ListFlo" - + "wsRequest\0320.google.cloud.dialogflow.cx.v" - + "3.ListFlowsResponse\"C\202\323\344\223\0024\0222/v3/{parent" - + "=projects/*/locations/*/agents/*}/flows\332" - + "A\006parent\022\240\001\n\007GetFlow\022-.google.cloud.dial" - + "ogflow.cx.v3.GetFlowRequest\032#.google.clo" - + "ud.dialogflow.cx.v3.Flow\"A\202\323\344\223\0024\0222/v3/{n" - + "ame=projects/*/locations/*/agents/*/flow" - + "s/*}\332A\004name\022\275\001\n\nUpdateFlow\0220.google.clou" - + "d.dialogflow.cx.v3.UpdateFlowRequest\032#.g" - + "oogle.cloud.dialogflow.cx.v3.Flow\"X\202\323\344\223\002" - + "?27/v3/{flow.name=projects/*/locations/*" - + "/agents/*/flows/*}:\004flow\332A\020flow,update_m" - + "ask\022\331\001\n\tTrainFlow\022/.google.cloud.dialogf" - + "low.cx.v3.TrainFlowRequest\032\035.google.long" - + "running.Operation\"|\202\323\344\223\002=\"8/v3/{name=pro" - + "jects/*/locations/*/agents/*/flows/*}:tr" - + "ain:\001*\332A\004name\312A/\n\025google.protobuf.Empty\022" - + "\026google.protobuf.Struct\022\277\001\n\014ValidateFlow" - + "\0222.google.cloud.dialogflow.cx.v3.Validat" - + "eFlowRequest\0323.google.cloud.dialogflow.c" - + "x.v3.FlowValidationResult\"F\202\323\344\223\002@\";/v3/{" - + "name=projects/*/locations/*/agents/*/flo" - + "ws/*}:validate:\001*\022\341\001\n\027GetFlowValidationR" - + "esult\022=.google.cloud.dialogflow.cx.v3.Ge" - + "tFlowValidationResultRequest\0323.google.cl" - + "oud.dialogflow.cx.v3.FlowValidationResul" - + "t\"R\202\323\344\223\002E\022C/v3/{name=projects/*/location" - + "s/*/agents/*/flows/*/validationResult}\332A" - + "\004name\022\322\001\n\nImportFlow\0220.google.cloud.dial" - + "ogflow.cx.v3.ImportFlowRequest\032\035.google." - + "longrunning.Operation\"s\202\323\344\223\002>\"9/v3/{pare" - + "nt=projects/*/locations/*/agents/*}/flow" - + "s:import:\001*\312A,\n\022ImportFlowResponse\022\026goog" - + "le.protobuf.Struct\022\322\001\n\nExportFlow\0220.goog" - + "le.cloud.dialogflow.cx.v3.ExportFlowRequ" - + "est\032\035.google.longrunning.Operation\"s\202\323\344\223" - + "\002>\"9/v3/{name=projects/*/locations/*/age" - + "nts/*/flows/*}:export:\001*\312A,\n\022ExportFlowR" - + "esponse\022\026google.protobuf.Struct\032x\312A\031dial" - + "ogflow.googleapis.com\322AYhttps://www.goog" - + "leapis.com/auth/cloud-platform,https://w" - + "ww.googleapis.com/auth/dialogflowB\231\001\n!co" - + "m.google.cloud.dialogflow.cx.v3B\tFlowPro" - + "toP\001Z?google.golang.org/genproto/googlea" - + "pis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035" - + "Google.Cloud.Dialogflow.Cx.V3b\006proto3" + + "o\032\031google/api/resource.proto\0325google/clo" + + "ud/dialogflow/cx/v3/advanced_settings.pr" + + "oto\032(google/cloud/dialogflow/cx/v3/page." + + "proto\0326google/cloud/dialogflow/cx/v3/val" + + "idation_message.proto\032#google/longrunnin" + + "g/operations.proto\032\033google/protobuf/empt" + + "y.proto\032 google/protobuf/field_mask.prot" + + "o\032\037google/protobuf/timestamp.proto\"\254\003\n\013N" + + "luSettings\022H\n\nmodel_type\030\001 \001(\01624.google." + + "cloud.dialogflow.cx.v3.NluSettings.Model" + + "Type\022 \n\030classification_threshold\030\003 \001(\002\022Y" + + "\n\023model_training_mode\030\004 \001(\0162<.google.clo" + + "ud.dialogflow.cx.v3.NluSettings.ModelTra" + + "iningMode\"Y\n\tModelType\022\032\n\026MODEL_TYPE_UNS" + + "PECIFIED\020\000\022\027\n\023MODEL_TYPE_STANDARD\020\001\022\027\n\023M" + + "ODEL_TYPE_ADVANCED\020\003\"{\n\021ModelTrainingMod" + + "e\022#\n\037MODEL_TRAINING_MODE_UNSPECIFIED\020\000\022!" + + "\n\035MODEL_TRAINING_MODE_AUTOMATIC\020\001\022\036\n\032MOD" + + "EL_TRAINING_MODE_MANUAL\020\002\"\326\003\n\004Flow\022\014\n\004na" + + "me\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013d" + + "escription\030\003 \001(\t\022I\n\021transition_routes\030\004 " + + "\003(\0132..google.cloud.dialogflow.cx.v3.Tran" + + "sitionRoute\022C\n\016event_handlers\030\n \003(\0132+.go" + + "ogle.cloud.dialogflow.cx.v3.EventHandler" + + "\022T\n\027transition_route_groups\030\017 \003(\tB3\372A0\n." + + "dialogflow.googleapis.com/TransitionRout" + + "eGroup\022@\n\014nlu_settings\030\013 \001(\0132*.google.cl" + + "oud.dialogflow.cx.v3.NluSettings:h\352Ae\n\036d" + + "ialogflow.googleapis.com/Flow\022Cprojects/" + + "{project}/locations/{location}/agents/{a" + + "gent}/flows/{flow}\"\232\001\n\021CreateFlowRequest" + + "\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow.goo" + + "gleapis.com/Flow\0226\n\004flow\030\002 \001(\0132#.google." + + "cloud.dialogflow.cx.v3.FlowB\003\340A\002\022\025\n\rlang" + + "uage_code\030\003 \001(\t\"X\n\021DeleteFlowRequest\0224\n\004" + + "name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleapi" + + "s.com/Flow\022\r\n\005force\030\002 \001(\010\"\210\001\n\020ListFlowsR" + + "equest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogfl" + + "ow.googleapis.com/Flow\022\021\n\tpage_size\030\002 \001(" + + "\005\022\022\n\npage_token\030\003 \001(\t\022\025\n\rlanguage_code\030\004" + + " \001(\t\"`\n\021ListFlowsResponse\0222\n\005flows\030\001 \003(\013" + + "2#.google.cloud.dialogflow.cx.v3.Flow\022\027\n" + + "\017next_page_token\030\002 \001(\t\"]\n\016GetFlowRequest" + + "\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googl" + + "eapis.com/Flow\022\025\n\rlanguage_code\030\002 \001(\t\"\230\001" + + "\n\021UpdateFlowRequest\0226\n\004flow\030\001 \001(\0132#.goog" + + "le.cloud.dialogflow.cx.v3.FlowB\003\340A\002\0224\n\013u" + + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" + + "MaskB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t\"H\n\020Trai" + + "nFlowRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dial" + + "ogflow.googleapis.com/Flow\"b\n\023ValidateFl" + + "owRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogf" + + "low.googleapis.com/Flow\022\025\n\rlanguage_code" + + "\030\002 \001(\t\"}\n\036GetFlowValidationResultRequest" + + "\022D\n\004name\030\001 \001(\tB6\340A\002\372A0\n.dialogflow.googl" + + "eapis.com/FlowValidationResult\022\025\n\rlangua" + + "ge_code\030\002 \001(\t\"\261\002\n\024FlowValidationResult\022\014" + + "\n\004name\030\001 \001(\t\022M\n\023validation_messages\030\002 \003(" + + "\01320.google.cloud.dialogflow.cx.v3.Valida" + + "tionMessage\022/\n\013update_time\030\003 \001(\0132\032.googl" + + "e.protobuf.Timestamp:\212\001\352A\206\001\n.dialogflow." + + "googleapis.com/FlowValidationResult\022Tpro" + + "jects/{project}/locations/{location}/age" + + "nts/{agent}/flows/{flow}/validationResul" + + "t\"\234\002\n\021ImportFlowRequest\0226\n\006parent\030\001 \001(\tB" + + "&\340A\002\372A \022\036dialogflow.googleapis.com/Flow\022" + + "\022\n\010flow_uri\030\002 \001(\tH\000\022\026\n\014flow_content\030\003 \001(" + + "\014H\000\022T\n\rimport_option\030\004 \001(\0162=.google.clou" + + "d.dialogflow.cx.v3.ImportFlowRequest.Imp" + + "ortOption\"E\n\014ImportOption\022\035\n\031IMPORT_OPTI" + + "ON_UNSPECIFIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002" + + "B\006\n\004flow\"G\n\022ImportFlowResponse\0221\n\004flow\030\001" + + " \001(\tB#\372A \n\036dialogflow.googleapis.com/Flo" + + "w\"\207\001\n\021ExportFlowRequest\0224\n\004name\030\001 \001(\tB&\340" + + "A\002\372A \n\036dialogflow.googleapis.com/Flow\022\025\n" + + "\010flow_uri\030\002 \001(\tB\003\340A\001\022%\n\030include_referenc" + + "ed_flows\030\004 \001(\010B\003\340A\001\"H\n\022ExportFlowRespons" + + "e\022\022\n\010flow_uri\030\001 \001(\tH\000\022\026\n\014flow_content\030\002 " + + "\001(\014H\000B\006\n\004flow2\230\020\n\005Flows\022\263\001\n\nCreateFlow\0220" + + ".google.cloud.dialogflow.cx.v3.CreateFlo" + + "wRequest\032#.google.cloud.dialogflow.cx.v3" + + ".Flow\"N\202\323\344\223\002:\"2/v3/{parent=projects/*/lo" + + "cations/*/agents/*}/flows:\004flow\332A\013parent" + + ",flow\022\231\001\n\nDeleteFlow\0220.google.cloud.dial" + + "ogflow.cx.v3.DeleteFlowRequest\032\026.google." + + "protobuf.Empty\"A\202\323\344\223\0024*2/v3/{name=projec" + + "ts/*/locations/*/agents/*/flows/*}\332A\004nam" + + "e\022\263\001\n\tListFlows\022/.google.cloud.dialogflo" + + "w.cx.v3.ListFlowsRequest\0320.google.cloud." + + "dialogflow.cx.v3.ListFlowsResponse\"C\202\323\344\223" + + "\0024\0222/v3/{parent=projects/*/locations/*/a" + + "gents/*}/flows\332A\006parent\022\240\001\n\007GetFlow\022-.go" + + "ogle.cloud.dialogflow.cx.v3.GetFlowReque" + + "st\032#.google.cloud.dialogflow.cx.v3.Flow\"" + + "A\202\323\344\223\0024\0222/v3/{name=projects/*/locations/" + + "*/agents/*/flows/*}\332A\004name\022\275\001\n\nUpdateFlo" + + "w\0220.google.cloud.dialogflow.cx.v3.Update" + + "FlowRequest\032#.google.cloud.dialogflow.cx" + + ".v3.Flow\"X\202\323\344\223\002?27/v3/{flow.name=project" + + "s/*/locations/*/agents/*/flows/*}:\004flow\332" + + "A\020flow,update_mask\022\331\001\n\tTrainFlow\022/.googl" + + "e.cloud.dialogflow.cx.v3.TrainFlowReques" + + "t\032\035.google.longrunning.Operation\"|\202\323\344\223\002=" + + "\"8/v3/{name=projects/*/locations/*/agent" + + "s/*/flows/*}:train:\001*\332A\004name\312A/\n\025google." + + "protobuf.Empty\022\026google.protobuf.Struct\022\277" + + "\001\n\014ValidateFlow\0222.google.cloud.dialogflo" + + "w.cx.v3.ValidateFlowRequest\0323.google.clo" + + "ud.dialogflow.cx.v3.FlowValidationResult" + + "\"F\202\323\344\223\002@\";/v3/{name=projects/*/locations" + + "/*/agents/*/flows/*}:validate:\001*\022\341\001\n\027Get" + + "FlowValidationResult\022=.google.cloud.dial" + + "ogflow.cx.v3.GetFlowValidationResultRequ" + + "est\0323.google.cloud.dialogflow.cx.v3.Flow" + + "ValidationResult\"R\202\323\344\223\002E\022C/v3/{name=proj" + + "ects/*/locations/*/agents/*/flows/*/vali" + + "dationResult}\332A\004name\022\322\001\n\nImportFlow\0220.go" + + "ogle.cloud.dialogflow.cx.v3.ImportFlowRe" + + "quest\032\035.google.longrunning.Operation\"s\202\323" + + "\344\223\002>\"9/v3/{parent=projects/*/locations/*" + + "/agents/*}/flows:import:\001*\312A,\n\022ImportFlo" + + "wResponse\022\026google.protobuf.Struct\022\322\001\n\nEx" + + "portFlow\0220.google.cloud.dialogflow.cx.v3" + + ".ExportFlowRequest\032\035.google.longrunning." + + "Operation\"s\202\323\344\223\002>\"9/v3/{name=projects/*/" + + "locations/*/agents/*/flows/*}:export:\001*\312" + + "A,\n\022ExportFlowResponse\022\026google.protobuf." + + "Struct\032x\312A\031dialogflow.googleapis.com\322AYh" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform,https://www.googleapis.com/auth/di" + + "alogflowB\231\001\n!com.google.cloud.dialogflow" + + ".cx.v3B\tFlowProtoP\001Z?google.golang.org/g" + + "enproto/googleapis/cloud/dialogflow/cx/v" + + "3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.C" + + "x.V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -246,6 +248,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), @@ -403,6 +406,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ValidationMessageProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FulfillmentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FulfillmentProto.java index 1c623ba79..f5f142551 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FulfillmentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/FulfillmentProto.java @@ -58,42 +58,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n/google/cloud/dialogflow/cx/v3/fulfillm" + "ent.proto\022\035google.cloud.dialogflow.cx.v3" - + "\032\031google/api/resource.proto\0324google/clou" - + "d/dialogflow/cx/v3/response_message.prot" - + "o\032\034google/protobuf/struct.proto\032\034google/" - + "api/annotations.proto\"\343\006\n\013Fulfillment\022@\n" - + "\010messages\030\001 \003(\0132..google.cloud.dialogflo" - + "w.cx.v3.ResponseMessage\0227\n\007webhook\030\002 \001(\t" - + "B&\372A#\n!dialogflow.googleapis.com/Webhook" - + "\022 \n\030return_partial_responses\030\010 \001(\010\022\013\n\003ta" - + "g\030\003 \001(\t\022\\\n\025set_parameter_actions\030\004 \003(\0132=" - + ".google.cloud.dialogflow.cx.v3.Fulfillme" - + "nt.SetParameterAction\022V\n\021conditional_cas" - + "es\030\005 \003(\0132;.google.cloud.dialogflow.cx.v3" - + ".Fulfillment.ConditionalCases\032N\n\022SetPara" - + "meterAction\022\021\n\tparameter\030\001 \001(\t\022%\n\005value\030" - + "\002 \001(\0132\026.google.protobuf.Value\032\243\003\n\020Condit" - + "ionalCases\022O\n\005cases\030\001 \003(\0132@.google.cloud" - + ".dialogflow.cx.v3.Fulfillment.Conditiona" - + "lCases.Case\032\275\002\n\004Case\022\021\n\tcondition\030\001 \001(\t\022" - + "b\n\014case_content\030\002 \003(\0132L.google.cloud.dia" - + "logflow.cx.v3.Fulfillment.ConditionalCas" - + "es.Case.CaseContent\032\275\001\n\013CaseContent\022A\n\007m" - + "essage\030\001 \001(\0132..google.cloud.dialogflow.c" - + "x.v3.ResponseMessageH\000\022W\n\020additional_cas" - + "es\030\002 \001(\0132;.google.cloud.dialogflow.cx.v3" - + ".Fulfillment.ConditionalCasesH\000B\022\n\020cases" - + "_or_messageB\240\001\n!com.google.cloud.dialogf" - + "low.cx.v3B\020FulfillmentProtoP\001Z?google.go" - + "lang.org/genproto/googleapis/cloud/dialo" - + "gflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Di" - + "alogflow.Cx.V3b\006proto3" + + "\032\031google/api/resource.proto\0325google/clou" + + "d/dialogflow/cx/v3/advanced_settings.pro" + + "to\0324google/cloud/dialogflow/cx/v3/respon" + + "se_message.proto\032\034google/protobuf/struct" + + ".proto\032\034google/api/annotations.proto\"\343\006\n" + + "\013Fulfillment\022@\n\010messages\030\001 \003(\0132..google." + + "cloud.dialogflow.cx.v3.ResponseMessage\0227" + + "\n\007webhook\030\002 \001(\tB&\372A#\n!dialogflow.googlea" + + "pis.com/Webhook\022 \n\030return_partial_respon" + + "ses\030\010 \001(\010\022\013\n\003tag\030\003 \001(\t\022\\\n\025set_parameter_" + + "actions\030\004 \003(\0132=.google.cloud.dialogflow." + + "cx.v3.Fulfillment.SetParameterAction\022V\n\021" + + "conditional_cases\030\005 \003(\0132;.google.cloud.d" + + "ialogflow.cx.v3.Fulfillment.ConditionalC" + + "ases\032N\n\022SetParameterAction\022\021\n\tparameter\030" + + "\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.V" + + "alue\032\243\003\n\020ConditionalCases\022O\n\005cases\030\001 \003(\013" + + "2@.google.cloud.dialogflow.cx.v3.Fulfill" + + "ment.ConditionalCases.Case\032\275\002\n\004Case\022\021\n\tc" + + "ondition\030\001 \001(\t\022b\n\014case_content\030\002 \003(\0132L.g" + + "oogle.cloud.dialogflow.cx.v3.Fulfillment" + + ".ConditionalCases.Case.CaseContent\032\275\001\n\013C" + + "aseContent\022A\n\007message\030\001 \001(\0132..google.clo" + + "ud.dialogflow.cx.v3.ResponseMessageH\000\022W\n" + + "\020additional_cases\030\002 \001(\0132;.google.cloud.d" + + "ialogflow.cx.v3.Fulfillment.ConditionalC" + + "asesH\000B\022\n\020cases_or_messageB\240\001\n!com.googl" + + "e.cloud.dialogflow.cx.v3B\020FulfillmentPro" + + "toP\001Z?google.golang.org/genproto/googlea" + + "pis/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035" + + "Google.Cloud.Dialogflow.Cx.V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), @@ -157,6 +159,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentProto.java index 28a540ffc..5c3463891 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/IntentProto.java @@ -84,83 +84,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "roto\022\035google.cloud.dialogflow.cx.v3\032\034goo" + "gle/api/annotations.proto\032\027google/api/cl" + "ient.proto\032\037google/api/field_behavior.pr" - + "oto\032\031google/api/resource.proto\032\033google/p" - + "rotobuf/empty.proto\032 google/protobuf/fie" - + "ld_mask.proto\032\037google/protobuf/timestamp" - + ".proto\"\234\006\n\006Intent\022\014\n\004name\030\001 \001(\t\022\031\n\014displ" - + "ay_name\030\002 \001(\tB\003\340A\002\022N\n\020training_phrases\030\003" - + " \003(\01324.google.cloud.dialogflow.cx.v3.Int" - + "ent.TrainingPhrase\022C\n\nparameters\030\004 \003(\0132/" - + ".google.cloud.dialogflow.cx.v3.Intent.Pa" - + "rameter\022\020\n\010priority\030\005 \001(\005\022\023\n\013is_fallback" - + "\030\006 \001(\010\022A\n\006labels\030\007 \003(\01321.google.cloud.di" - + "alogflow.cx.v3.Intent.LabelsEntry\022\023\n\013des" - + "cription\030\010 \001(\t\032\262\001\n\016TrainingPhrase\022\n\n\002id\030" - + "\001 \001(\t\022M\n\005parts\030\002 \003(\01329.google.cloud.dial" - + "ogflow.cx.v3.Intent.TrainingPhrase.PartB" - + "\003\340A\002\022\024\n\014repeat_count\030\003 \001(\005\032/\n\004Part\022\021\n\004te" - + "xt\030\001 \001(\tB\003\340A\002\022\024\n\014parameter_id\030\002 \001(\t\032\200\001\n\t" - + "Parameter\022\017\n\002id\030\001 \001(\tB\003\340A\002\022A\n\013entity_typ" - + "e\030\002 \001(\tB,\340A\002\372A&\n$dialogflow.googleapis.c" - + "om/EntityType\022\017\n\007is_list\030\003 \001(\010\022\016\n\006redact" - + "\030\004 \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\030\002 \001(\t:\0028\001:n\352Ak\n dialogflow.googleapi" - + "s.com/Intent\022Gprojects/{project}/locatio" - + "ns/{location}/agents/{agent}/intents/{in" - + "tent}\"\314\001\n\022ListIntentsRequest\0228\n\006parent\030\001" - + " \001(\tB(\340A\002\372A\"\022 dialogflow.googleapis.com/" - + "Intent\022\025\n\rlanguage_code\030\002 \001(\t\022>\n\013intent_" - + "view\030\005 \001(\0162).google.cloud.dialogflow.cx." - + "v3.IntentView\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage" - + "_token\030\004 \001(\t\"f\n\023ListIntentsResponse\0226\n\007i" - + "ntents\030\001 \003(\0132%.google.cloud.dialogflow.c" - + "x.v3.Intent\022\027\n\017next_page_token\030\002 \001(\t\"a\n\020" - + "GetIntentRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n " - + "dialogflow.googleapis.com/Intent\022\025\n\rlang" - + "uage_code\030\002 \001(\t\"\242\001\n\023CreateIntentRequest\022" - + "8\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 dialogflow.goog" - + "leapis.com/Intent\022:\n\006intent\030\002 \001(\0132%.goog" - + "le.cloud.dialogflow.cx.v3.IntentB\003\340A\002\022\025\n" - + "\rlanguage_code\030\003 \001(\t\"\231\001\n\023UpdateIntentReq" - + "uest\022:\n\006intent\030\001 \001(\0132%.google.cloud.dial" - + "ogflow.cx.v3.IntentB\003\340A\002\022\025\n\rlanguage_cod" - + "e\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.google.pr" - + "otobuf.FieldMask\"M\n\023DeleteIntentRequest\022" - + "6\n\004name\030\001 \001(\tB(\340A\002\372A\"\n dialogflow.google" - + "apis.com/Intent*X\n\nIntentView\022\033\n\027INTENT_" - + "VIEW_UNSPECIFIED\020\000\022\027\n\023INTENT_VIEW_PARTIA" - + "L\020\001\022\024\n\020INTENT_VIEW_FULL\020\0022\236\010\n\007Intents\022\273\001" - + "\n\013ListIntents\0221.google.cloud.dialogflow." - + "cx.v3.ListIntentsRequest\0322.google.cloud." - + "dialogflow.cx.v3.ListIntentsResponse\"E\202\323" - + "\344\223\0026\0224/v3/{parent=projects/*/locations/*" - + "/agents/*}/intents\332A\006parent\022\250\001\n\tGetInten" - + "t\022/.google.cloud.dialogflow.cx.v3.GetInt" - + "entRequest\032%.google.cloud.dialogflow.cx." - + "v3.Intent\"C\202\323\344\223\0026\0224/v3/{name=projects/*/" - + "locations/*/agents/*/intents/*}\332A\004name\022\277" - + "\001\n\014CreateIntent\0222.google.cloud.dialogflo" - + "w.cx.v3.CreateIntentRequest\032%.google.clo" - + "ud.dialogflow.cx.v3.Intent\"T\202\323\344\223\002>\"4/v3/" - + "{parent=projects/*/locations/*/agents/*}" - + "/intents:\006intent\332A\rparent,intent\022\313\001\n\014Upd" - + "ateIntent\0222.google.cloud.dialogflow.cx.v" - + "3.UpdateIntentRequest\032%.google.cloud.dia" - + "logflow.cx.v3.Intent\"`\202\323\344\223\002E2;/v3/{inten" - + "t.name=projects/*/locations/*/agents/*/i" - + "ntents/*}:\006intent\332A\022intent,update_mask\022\237" - + "\001\n\014DeleteIntent\0222.google.cloud.dialogflo" - + "w.cx.v3.DeleteIntentRequest\032\026.google.pro" - + "tobuf.Empty\"C\202\323\344\223\0026*4/v3/{name=projects/" - + "*/locations/*/agents/*/intents/*}\332A\004name" - + "\032x\312A\031dialogflow.googleapis.com\322AYhttps:/" - + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/dialogfl" - + "owB\233\001\n!com.google.cloud.dialogflow.cx.v3" - + "B\013IntentProtoP\001Z?google.golang.org/genpr" - + "oto/googleapis/cloud/dialogflow/cx/v3;cx" - + "\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3" - + "b\006proto3" + + "oto\032\031google/api/resource.proto\032#google/l" + + "ongrunning/operations.proto\032\033google/prot" + + "obuf/empty.proto\032 google/protobuf/field_" + + "mask.proto\032\037google/protobuf/timestamp.pr" + + "oto\"\234\006\n\006Intent\022\014\n\004name\030\001 \001(\t\022\031\n\014display_" + + "name\030\002 \001(\tB\003\340A\002\022N\n\020training_phrases\030\003 \003(" + + "\01324.google.cloud.dialogflow.cx.v3.Intent" + + ".TrainingPhrase\022C\n\nparameters\030\004 \003(\0132/.go" + + "ogle.cloud.dialogflow.cx.v3.Intent.Param" + + "eter\022\020\n\010priority\030\005 \001(\005\022\023\n\013is_fallback\030\006 " + + "\001(\010\022A\n\006labels\030\007 \003(\01321.google.cloud.dialo" + + "gflow.cx.v3.Intent.LabelsEntry\022\023\n\013descri" + + "ption\030\010 \001(\t\032\262\001\n\016TrainingPhrase\022\n\n\002id\030\001 \001" + + "(\t\022M\n\005parts\030\002 \003(\01329.google.cloud.dialogf" + + "low.cx.v3.Intent.TrainingPhrase.PartB\003\340A" + + "\002\022\024\n\014repeat_count\030\003 \001(\005\032/\n\004Part\022\021\n\004text\030" + + "\001 \001(\tB\003\340A\002\022\024\n\014parameter_id\030\002 \001(\t\032\200\001\n\tPar" + + "ameter\022\017\n\002id\030\001 \001(\tB\003\340A\002\022A\n\013entity_type\030\002" + + " \001(\tB,\340A\002\372A&\n$dialogflow.googleapis.com/" + + "EntityType\022\017\n\007is_list\030\003 \001(\010\022\016\n\006redact\030\004 " + + "\001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001:n\352Ak\n dialogflow.googleapis.c" + + "om/Intent\022Gprojects/{project}/locations/" + + "{location}/agents/{agent}/intents/{inten" + + "t}\"\314\001\n\022ListIntentsRequest\0228\n\006parent\030\001 \001(" + + "\tB(\340A\002\372A\"\022 dialogflow.googleapis.com/Int" + + "ent\022\025\n\rlanguage_code\030\002 \001(\t\022>\n\013intent_vie" + + "w\030\005 \001(\0162).google.cloud.dialogflow.cx.v3." + + "IntentView\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_to" + + "ken\030\004 \001(\t\"f\n\023ListIntentsResponse\0226\n\007inte" + + "nts\030\001 \003(\0132%.google.cloud.dialogflow.cx.v" + + "3.Intent\022\027\n\017next_page_token\030\002 \001(\t\"a\n\020Get" + + "IntentRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n dia" + + "logflow.googleapis.com/Intent\022\025\n\rlanguag" + + "e_code\030\002 \001(\t\"\242\001\n\023CreateIntentRequest\0228\n\006" + + "parent\030\001 \001(\tB(\340A\002\372A\"\022 dialogflow.googlea" + + "pis.com/Intent\022:\n\006intent\030\002 \001(\0132%.google." + + "cloud.dialogflow.cx.v3.IntentB\003\340A\002\022\025\n\rla" + + "nguage_code\030\003 \001(\t\"\231\001\n\023UpdateIntentReques" + + "t\022:\n\006intent\030\001 \001(\0132%.google.cloud.dialogf" + + "low.cx.v3.IntentB\003\340A\002\022\025\n\rlanguage_code\030\002" + + " \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.google.proto" + + "buf.FieldMask\"M\n\023DeleteIntentRequest\0226\n\004" + + "name\030\001 \001(\tB(\340A\002\372A\"\n dialogflow.googleapi" + + "s.com/Intent*X\n\nIntentView\022\033\n\027INTENT_VIE" + + "W_UNSPECIFIED\020\000\022\027\n\023INTENT_VIEW_PARTIAL\020\001" + + "\022\024\n\020INTENT_VIEW_FULL\020\0022\236\010\n\007Intents\022\273\001\n\013L" + + "istIntents\0221.google.cloud.dialogflow.cx." + + "v3.ListIntentsRequest\0322.google.cloud.dia" + + "logflow.cx.v3.ListIntentsResponse\"E\202\323\344\223\002" + + "6\0224/v3/{parent=projects/*/locations/*/ag" + + "ents/*}/intents\332A\006parent\022\250\001\n\tGetIntent\022/" + + ".google.cloud.dialogflow.cx.v3.GetIntent" + + "Request\032%.google.cloud.dialogflow.cx.v3." + + "Intent\"C\202\323\344\223\0026\0224/v3/{name=projects/*/loc" + + "ations/*/agents/*/intents/*}\332A\004name\022\277\001\n\014" + + "CreateIntent\0222.google.cloud.dialogflow.c" + + "x.v3.CreateIntentRequest\032%.google.cloud." + + "dialogflow.cx.v3.Intent\"T\202\323\344\223\002>\"4/v3/{pa" + + "rent=projects/*/locations/*/agents/*}/in" + + "tents:\006intent\332A\rparent,intent\022\313\001\n\014Update" + + "Intent\0222.google.cloud.dialogflow.cx.v3.U" + + "pdateIntentRequest\032%.google.cloud.dialog" + + "flow.cx.v3.Intent\"`\202\323\344\223\002E2;/v3/{intent.n" + + "ame=projects/*/locations/*/agents/*/inte" + + "nts/*}:\006intent\332A\022intent,update_mask\022\237\001\n\014" + + "DeleteIntent\0222.google.cloud.dialogflow.c" + + "x.v3.DeleteIntentRequest\032\026.google.protob" + + "uf.Empty\"C\202\323\344\223\0026*4/v3/{name=projects/*/l" + + "ocations/*/agents/*/intents/*}\332A\004name\032x\312" + + "A\031dialogflow.googleapis.com\322AYhttps://ww" + + "w.googleapis.com/auth/cloud-platform,htt" + + "ps://www.googleapis.com/auth/dialogflowB" + + "\233\001\n!com.google.cloud.dialogflow.cx.v3B\013I" + + "ntentProtoP\001Z?google.golang.org/genproto" + + "/googleapis/cloud/dialogflow/cx/v3;cx\370\001\001" + + "\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -170,6 +171,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -286,6 +288,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java index 5d3afd11b..0e299c67d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java @@ -88,100 +88,102 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\022\035google.cloud.dialogflow.cx.v3\032\034googl" + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032/google/clo" - + "ud/dialogflow/cx/v3/fulfillment.proto\032\033g" - + "oogle/protobuf/empty.proto\032 google/proto" - + "buf/field_mask.proto\032\034google/protobuf/st" - + "ruct.proto\"\206\004\n\004Page\022\014\n\004name\030\001 \001(\t\022\031\n\014dis" - + "play_name\030\002 \001(\tB\003\340A\002\022E\n\021entry_fulfillmen" - + "t\030\007 \001(\0132*.google.cloud.dialogflow.cx.v3." - + "Fulfillment\0221\n\004form\030\004 \001(\0132#.google.cloud" - + ".dialogflow.cx.v3.Form\022T\n\027transition_rou" - + "te_groups\030\013 \003(\tB3\372A0\n.dialogflow.googlea" - + "pis.com/TransitionRouteGroup\022I\n\021transiti" - + "on_routes\030\t \003(\0132..google.cloud.dialogflo" - + "w.cx.v3.TransitionRoute\022C\n\016event_handler" - + "s\030\n \003(\0132+.google.cloud.dialogflow.cx.v3." - + "EventHandler:u\352Ar\n\036dialogflow.googleapis" - + ".com/Page\022Pprojects/{project}/locations/" - + "{location}/agents/{agent}/flows/{flow}/p" - + "ages/{page}\"\243\004\n\004Form\022A\n\nparameters\030\001 \003(\013" - + "2-.google.cloud.dialogflow.cx.v3.Form.Pa" - + "rameter\032\327\003\n\tParameter\022\031\n\014display_name\030\001 " - + "\001(\tB\003\340A\002\022\020\n\010required\030\002 \001(\010\022A\n\013entity_typ" - + "e\030\003 \001(\tB,\340A\002\372A&\n$dialogflow.googleapis.c" - + "om/EntityType\022\017\n\007is_list\030\004 \001(\010\022V\n\rfill_b" - + "ehavior\030\007 \001(\0132:.google.cloud.dialogflow." - + "cx.v3.Form.Parameter.FillBehaviorB\003\340A\002\022-" - + "\n\rdefault_value\030\t \001(\0132\026.google.protobuf." - + "Value\022\016\n\006redact\030\013 \001(\010\032\261\001\n\014FillBehavior\022S" - + "\n\032initial_prompt_fulfillment\030\003 \001(\0132*.goo" - + "gle.cloud.dialogflow.cx.v3.FulfillmentB\003" - + "\340A\002\022L\n\027reprompt_event_handlers\030\005 \003(\0132+.g" - + "oogle.cloud.dialogflow.cx.v3.EventHandle" - + "r\"\200\002\n\014EventHandler\022\021\n\004name\030\006 \001(\tB\003\340A\003\022\022\n" - + "\005event\030\004 \001(\tB\003\340A\002\022G\n\023trigger_fulfillment" - + "\030\005 \001(\0132*.google.cloud.dialogflow.cx.v3.F" - + "ulfillment\022:\n\013target_page\030\002 \001(\tB#\372A \n\036di" - + "alogflow.googleapis.com/PageH\000\022:\n\013target" - + "_flow\030\003 \001(\tB#\372A \n\036dialogflow.googleapis." - + "com/FlowH\000B\010\n\006target\"\271\002\n\017TransitionRoute" - + "\022\021\n\004name\030\006 \001(\tB\003\340A\003\0225\n\006intent\030\001 \001(\tB%\372A\"" - + "\n dialogflow.googleapis.com/Intent\022\021\n\tco" - + "ndition\030\002 \001(\t\022G\n\023trigger_fulfillment\030\003 \001" - + "(\0132*.google.cloud.dialogflow.cx.v3.Fulfi" - + "llment\022:\n\013target_page\030\004 \001(\tB#\372A \n\036dialog" - + "flow.googleapis.com/PageH\000\022:\n\013target_flo" - + "w\030\005 \001(\tB#\372A \n\036dialogflow.googleapis.com/" - + "FlowH\000B\010\n\006target\"\210\001\n\020ListPagesRequest\0226\n" - + "\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow.google" - + "apis.com/Page\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n\t" - + "page_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"`\n\021L" - + "istPagesResponse\0222\n\005pages\030\001 \003(\0132#.google" - + ".cloud.dialogflow.cx.v3.Page\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"]\n\016GetPageRequest\0224\n\004name\030" - + "\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleapis.com" - + "/Page\022\025\n\rlanguage_code\030\002 \001(\t\"\232\001\n\021CreateP" - + "ageRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dial" - + "ogflow.googleapis.com/Page\0226\n\004page\030\002 \001(\013" - + "2#.google.cloud.dialogflow.cx.v3.PageB\003\340" - + "A\002\022\025\n\rlanguage_code\030\003 \001(\t\"\223\001\n\021UpdatePage" - + "Request\0226\n\004page\030\001 \001(\0132#.google.cloud.dia" - + "logflow.cx.v3.PageB\003\340A\002\022\025\n\rlanguage_code" - + "\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.google.pro" - + "tobuf.FieldMask\"X\n\021DeletePageRequest\0224\n\004" - + "name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleapi" - + "s.com/Page\022\r\n\005force\030\002 \001(\0102\224\010\n\005Pages\022\273\001\n\t" - + "ListPages\022/.google.cloud.dialogflow.cx.v" - + "3.ListPagesRequest\0320.google.cloud.dialog" - + "flow.cx.v3.ListPagesResponse\"K\202\323\344\223\002<\022:/v" - + "3/{parent=projects/*/locations/*/agents/" - + "*/flows/*}/pages\332A\006parent\022\250\001\n\007GetPage\022-." - + "google.cloud.dialogflow.cx.v3.GetPageReq" - + "uest\032#.google.cloud.dialogflow.cx.v3.Pag" - + "e\"I\202\323\344\223\002<\022:/v3/{name=projects/*/location" - + "s/*/agents/*/flows/*/pages/*}\332A\004name\022\273\001\n" - + "\nCreatePage\0220.google.cloud.dialogflow.cx" - + ".v3.CreatePageRequest\032#.google.cloud.dia" - + "logflow.cx.v3.Page\"V\202\323\344\223\002B\":/v3/{parent=" - + "projects/*/locations/*/agents/*/flows/*}" - + "/pages:\004page\332A\013parent,page\022\305\001\n\nUpdatePag" - + "e\0220.google.cloud.dialogflow.cx.v3.Update" - + "PageRequest\032#.google.cloud.dialogflow.cx" - + ".v3.Page\"`\202\323\344\223\002G2?/v3/{page.name=project" - + "s/*/locations/*/agents/*/flows/*/pages/*" - + "}:\004page\332A\020page,update_mask\022\241\001\n\nDeletePag" - + "e\0220.google.cloud.dialogflow.cx.v3.Delete" - + "PageRequest\032\026.google.protobuf.Empty\"I\202\323\344" - + "\223\002<*:/v3/{name=projects/*/locations/*/ag" - + "ents/*/flows/*/pages/*}\332A\004name\032x\312A\031dialo" - + "gflow.googleapis.com\322AYhttps://www.googl" - + "eapis.com/auth/cloud-platform,https://ww" - + "w.googleapis.com/auth/dialogflowB\231\001\n!com" - + ".google.cloud.dialogflow.cx.v3B\tPageProt" - + "oP\001Z?google.golang.org/genproto/googleap" - + "is/cloud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035G" - + "oogle.Cloud.Dialogflow.Cx.V3b\006proto3" + + "o\032\031google/api/resource.proto\0325google/clo" + + "ud/dialogflow/cx/v3/advanced_settings.pr" + + "oto\032/google/cloud/dialogflow/cx/v3/fulfi" + + "llment.proto\032\033google/protobuf/empty.prot" + + "o\032 google/protobuf/field_mask.proto\032\034goo" + + "gle/protobuf/struct.proto\"\206\004\n\004Page\022\014\n\004na" + + "me\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022E\n\021e" + + "ntry_fulfillment\030\007 \001(\0132*.google.cloud.di" + + "alogflow.cx.v3.Fulfillment\0221\n\004form\030\004 \001(\013" + + "2#.google.cloud.dialogflow.cx.v3.Form\022T\n" + + "\027transition_route_groups\030\013 \003(\tB3\372A0\n.dia" + + "logflow.googleapis.com/TransitionRouteGr" + + "oup\022I\n\021transition_routes\030\t \003(\0132..google." + + "cloud.dialogflow.cx.v3.TransitionRoute\022C" + + "\n\016event_handlers\030\n \003(\0132+.google.cloud.di" + + "alogflow.cx.v3.EventHandler:u\352Ar\n\036dialog" + + "flow.googleapis.com/Page\022Pprojects/{proj" + + "ect}/locations/{location}/agents/{agent}" + + "/flows/{flow}/pages/{page}\"\243\004\n\004Form\022A\n\np" + + "arameters\030\001 \003(\0132-.google.cloud.dialogflo" + + "w.cx.v3.Form.Parameter\032\327\003\n\tParameter\022\031\n\014" + + "display_name\030\001 \001(\tB\003\340A\002\022\020\n\010required\030\002 \001(" + + "\010\022A\n\013entity_type\030\003 \001(\tB,\340A\002\372A&\n$dialogfl" + + "ow.googleapis.com/EntityType\022\017\n\007is_list\030" + + "\004 \001(\010\022V\n\rfill_behavior\030\007 \001(\0132:.google.cl" + + "oud.dialogflow.cx.v3.Form.Parameter.Fill" + + "BehaviorB\003\340A\002\022-\n\rdefault_value\030\t \001(\0132\026.g" + + "oogle.protobuf.Value\022\016\n\006redact\030\013 \001(\010\032\261\001\n" + + "\014FillBehavior\022S\n\032initial_prompt_fulfillm" + + "ent\030\003 \001(\0132*.google.cloud.dialogflow.cx.v" + + "3.FulfillmentB\003\340A\002\022L\n\027reprompt_event_han" + + "dlers\030\005 \003(\0132+.google.cloud.dialogflow.cx" + + ".v3.EventHandler\"\200\002\n\014EventHandler\022\021\n\004nam" + + "e\030\006 \001(\tB\003\340A\003\022\022\n\005event\030\004 \001(\tB\003\340A\002\022G\n\023trig" + + "ger_fulfillment\030\005 \001(\0132*.google.cloud.dia" + + "logflow.cx.v3.Fulfillment\022:\n\013target_page" + + "\030\002 \001(\tB#\372A \n\036dialogflow.googleapis.com/P" + + "ageH\000\022:\n\013target_flow\030\003 \001(\tB#\372A \n\036dialogf" + + "low.googleapis.com/FlowH\000B\010\n\006target\"\271\002\n\017" + + "TransitionRoute\022\021\n\004name\030\006 \001(\tB\003\340A\003\0225\n\006in" + + "tent\030\001 \001(\tB%\372A\"\n dialogflow.googleapis.c" + + "om/Intent\022\021\n\tcondition\030\002 \001(\t\022G\n\023trigger_" + + "fulfillment\030\003 \001(\0132*.google.cloud.dialogf" + + "low.cx.v3.Fulfillment\022:\n\013target_page\030\004 \001" + + "(\tB#\372A \n\036dialogflow.googleapis.com/PageH" + + "\000\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036dialogflow." + + "googleapis.com/FlowH\000B\010\n\006target\"\210\001\n\020List" + + "PagesRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036di" + + "alogflow.googleapis.com/Page\022\025\n\rlanguage" + + "_code\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_t" + + "oken\030\004 \001(\t\"`\n\021ListPagesResponse\0222\n\005pages" + + "\030\001 \003(\0132#.google.cloud.dialogflow.cx.v3.P" + + "age\022\027\n\017next_page_token\030\002 \001(\t\"]\n\016GetPageR" + + "equest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow" + + ".googleapis.com/Page\022\025\n\rlanguage_code\030\002 " + + "\001(\t\"\232\001\n\021CreatePageRequest\0226\n\006parent\030\001 \001(" + + "\tB&\340A\002\372A \022\036dialogflow.googleapis.com/Pag" + + "e\0226\n\004page\030\002 \001(\0132#.google.cloud.dialogflo" + + "w.cx.v3.PageB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t" + + "\"\223\001\n\021UpdatePageRequest\0226\n\004page\030\001 \001(\0132#.g" + + "oogle.cloud.dialogflow.cx.v3.PageB\003\340A\002\022\025" + + "\n\rlanguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001" + + "(\0132\032.google.protobuf.FieldMask\"X\n\021Delete" + + "PageRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialo" + + "gflow.googleapis.com/Page\022\r\n\005force\030\002 \001(\010" + + "2\224\010\n\005Pages\022\273\001\n\tListPages\022/.google.cloud." + + "dialogflow.cx.v3.ListPagesRequest\0320.goog" + + "le.cloud.dialogflow.cx.v3.ListPagesRespo" + + "nse\"K\202\323\344\223\002<\022:/v3/{parent=projects/*/loca" + + "tions/*/agents/*/flows/*}/pages\332A\006parent" + + "\022\250\001\n\007GetPage\022-.google.cloud.dialogflow.c" + + "x.v3.GetPageRequest\032#.google.cloud.dialo" + + "gflow.cx.v3.Page\"I\202\323\344\223\002<\022:/v3/{name=proj" + + "ects/*/locations/*/agents/*/flows/*/page" + + "s/*}\332A\004name\022\273\001\n\nCreatePage\0220.google.clou" + + "d.dialogflow.cx.v3.CreatePageRequest\032#.g" + + "oogle.cloud.dialogflow.cx.v3.Page\"V\202\323\344\223\002" + + "B\":/v3/{parent=projects/*/locations/*/ag" + + "ents/*/flows/*}/pages:\004page\332A\013parent,pag" + + "e\022\305\001\n\nUpdatePage\0220.google.cloud.dialogfl" + + "ow.cx.v3.UpdatePageRequest\032#.google.clou" + + "d.dialogflow.cx.v3.Page\"`\202\323\344\223\002G2?/v3/{pa" + + "ge.name=projects/*/locations/*/agents/*/" + + "flows/*/pages/*}:\004page\332A\020page,update_mas" + + "k\022\241\001\n\nDeletePage\0220.google.cloud.dialogfl" + + "ow.cx.v3.DeletePageRequest\032\026.google.prot" + + "obuf.Empty\"I\202\323\344\223\002<*:/v3/{name=projects/*" + + "/locations/*/agents/*/flows/*/pages/*}\332A" + + "\004name\032x\312A\031dialogflow.googleapis.com\322AYht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "form,https://www.googleapis.com/auth/dia" + + "logflowB\231\001\n!com.google.cloud.dialogflow." + + "cx.v3B\tPageProtoP\001Z?google.golang.org/ge" + + "nproto/googleapis/cloud/dialogflow/cx/v3" + + ";cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx" + + ".V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -191,6 +193,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.FulfillmentProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -327,6 +330,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.FulfillmentProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java index 1c98de572..b627f50eb 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java @@ -41,6 +41,7 @@ private QueryParameters() { timeZone_ = ""; sessionEntityTypes_ = java.util.Collections.emptyList(); currentPage_ = ""; + flowVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -170,6 +171,16 @@ private QueryParameters( .put(webhookHeaders__.getKey(), webhookHeaders__.getValue()); break; } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + flowVersions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + flowVersions_.add(s); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -187,6 +198,9 @@ private QueryParameters( if (((mutable_bitField0_ & 0x00000001) != 0)) { sessionEntityTypes_ = java.util.Collections.unmodifiableList(sessionEntityTypes_); } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + flowVersions_ = flowVersions_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -822,6 +836,91 @@ public java.lang.String getWebhookHeadersOrThrow(java.lang.String key) { return map.get(key); } + public static final int FLOW_VERSIONS_FIELD_NUMBER = 14; + private com.google.protobuf.LazyStringList flowVersions_; + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the flowVersions. + */ + public com.google.protobuf.ProtocolStringList getFlowVersionsList() { + return flowVersions_; + } + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @return The count of flowVersions. + */ + public int getFlowVersionsCount() { + return flowVersions_.size(); + } + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The flowVersions at the given index. + */ + public java.lang.String getFlowVersions(int index) { + return flowVersions_.get(index); + } + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the flowVersions at the given index. + */ + public com.google.protobuf.ByteString getFlowVersionsBytes(int index) { + return flowVersions_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -862,6 +961,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetWebhookHeaders(), WebhookHeadersDefaultEntryHolder.defaultEntry, 10); + for (int i = 0; i < flowVersions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, flowVersions_.getRaw(i)); + } unknownFields.writeTo(output); } @@ -906,6 +1008,14 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, webhookHeaders__); } + { + int dataSize = 0; + for (int i = 0; i < flowVersions_.size(); i++) { + dataSize += computeStringSizeNoTag(flowVersions_.getRaw(i)); + } + size += dataSize; + size += 1 * getFlowVersionsList().size(); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -940,6 +1050,7 @@ public boolean equals(final java.lang.Object obj) { if (getDisableWebhook() != other.getDisableWebhook()) return false; if (getAnalyzeQueryTextSentiment() != other.getAnalyzeQueryTextSentiment()) return false; if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false; + if (!getFlowVersionsList().equals(other.getFlowVersionsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -979,6 +1090,10 @@ public int hashCode() { hash = (37 * hash) + WEBHOOK_HEADERS_FIELD_NUMBER; hash = (53 * hash) + internalGetWebhookHeaders().hashCode(); } + if (getFlowVersionsCount() > 0) { + hash = (37 * hash) + FLOW_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getFlowVersionsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1179,6 +1294,8 @@ public Builder clear() { analyzeQueryTextSentiment_ = false; internalGetMutableWebhookHeaders().clear(); + flowVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -1237,6 +1354,11 @@ public com.google.cloud.dialogflow.cx.v3.QueryParameters buildPartial() { result.analyzeQueryTextSentiment_ = analyzeQueryTextSentiment_; result.webhookHeaders_ = internalGetWebhookHeaders(); result.webhookHeaders_.makeImmutable(); + if (((bitField0_ & 0x00000004) != 0)) { + flowVersions_ = flowVersions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.flowVersions_ = flowVersions_; onBuilt(); return result; } @@ -1338,6 +1460,16 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryParameters other setAnalyzeQueryTextSentiment(other.getAnalyzeQueryTextSentiment()); } internalGetMutableWebhookHeaders().mergeFrom(other.internalGetWebhookHeaders()); + if (!other.flowVersions_.isEmpty()) { + if (flowVersions_.isEmpty()) { + flowVersions_ = other.flowVersions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFlowVersionsIsMutable(); + flowVersions_.addAll(other.flowVersions_); + } + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3184,6 +3316,228 @@ public Builder putAllWebhookHeaders(java.util.Map + * A list of flow versions to override for the request. + * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent + * ID>/flows/<Flow ID>/versions/<Version ID>`. + * If version 1 of flow X is included in this list, the traffic of + * flow X will go through version 1 regardless of the version configuration in + * the environment. Each flow can have at most one version specified in this + * list. + * + * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the flowVersions. + */ + public com.google.protobuf.ProtocolStringList getFlowVersionsList() { + return flowVersions_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @return The count of flowVersions. + */ + public int getFlowVersionsCount() { + return flowVersions_.size(); + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The flowVersions at the given index. + */ + public java.lang.String getFlowVersions(int index) { + return flowVersions_.get(index); + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the flowVersions at the given index. + */ + public com.google.protobuf.ByteString getFlowVersionsBytes(int index) { + return flowVersions_.getByteString(index); + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The flowVersions to set. + * @return This builder for chaining. + */ + public Builder setFlowVersions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowVersionsIsMutable(); + flowVersions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param value The flowVersions to add. + * @return This builder for chaining. + */ + public Builder addFlowVersions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlowVersionsIsMutable(); + flowVersions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param values The flowVersions to add. + * @return This builder for chaining. + */ + public Builder addAllFlowVersions(java.lang.Iterable values) { + ensureFlowVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, flowVersions_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearFlowVersions() { + flowVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of flow versions to override for the request.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/flows/<Flow ID>/versions/<Version ID>`.
+     * If version 1 of flow X is included in this list, the traffic of
+     * flow X will go through version 1 regardless of the version configuration in
+     * the environment. Each flow can have at most one version specified in this
+     * list.
+     * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the flowVersions to add. + * @return This builder for chaining. + */ + public Builder addFlowVersionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFlowVersionsIsMutable(); + flowVersions_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java index b5a58e031..eaa6a8521 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java @@ -477,4 +477,79 @@ com.google.cloud.dialogflow.cx.v3.SessionEntityTypeOrBuilder getSessionEntityTyp * map<string, string> webhook_headers = 10; */ java.lang.String getWebhookHeadersOrThrow(java.lang.String key); + + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the flowVersions. + */ + java.util.List getFlowVersionsList(); + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @return The count of flowVersions. + */ + int getFlowVersionsCount(); + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The flowVersions at the given index. + */ + java.lang.String getFlowVersions(int index); + /** + * + * + *
+   * A list of flow versions to override for the request.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/flows/<Flow ID>/versions/<Version ID>`.
+   * If version 1 of flow X is included in this list, the traffic of
+   * flow X will go through version 1 regardless of the version configuration in
+   * the environment. Each flow can have at most one version specified in this
+   * list.
+   * 
+ * + * repeated string flow_versions = 14 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the flowVersions at the given index. + */ + com.google.protobuf.ByteString getFlowVersionsBytes(int index); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutConfig.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutConfig.java new file mode 100644 index 000000000..a7e14a230 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutConfig.java @@ -0,0 +1,2531 @@ +/* + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The configuration for auto rollout.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RolloutConfig} + */ +public final class RolloutConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RolloutConfig) + RolloutConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RolloutConfig.newBuilder() to construct. + private RolloutConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RolloutConfig() { + rolloutSteps_ = java.util.Collections.emptyList(); + rolloutCondition_ = ""; + failureCondition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RolloutConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RolloutConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + rolloutSteps_ = + new java.util.ArrayList< + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep>(); + mutable_bitField0_ |= 0x00000001; + } + rolloutSteps_.add( + input.readMessage( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + rolloutCondition_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + failureCondition_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + rolloutSteps_ = java.util.Collections.unmodifiableList(rolloutSteps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.class, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder.class); + } + + public interface RolloutStepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the rollout step;
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * The name of the rollout step;
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * The percentage of traffic allocated to the flow version of this rollout
+     * step. (0%, 100%].
+     * 
+ * + * int32 traffic_percent = 2; + * + * @return The trafficPercent. + */ + int getTrafficPercent(); + + /** + * + * + *
+     * The minimum time that this step should last. Should be longer than 1
+     * hour. If not set, the default minimum duration for each step will be 1
+     * hour.
+     * 
+ * + * .google.protobuf.Duration min_duration = 3; + * + * @return Whether the minDuration field is set. + */ + boolean hasMinDuration(); + /** + * + * + *
+     * The minimum time that this step should last. Should be longer than 1
+     * hour. If not set, the default minimum duration for each step will be 1
+     * hour.
+     * 
+ * + * .google.protobuf.Duration min_duration = 3; + * + * @return The minDuration. + */ + com.google.protobuf.Duration getMinDuration(); + /** + * + * + *
+     * The minimum time that this step should last. Should be longer than 1
+     * hour. If not set, the default minimum duration for each step will be 1
+     * hour.
+     * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder(); + } + /** + * + * + *
+   * A single rollout step with specified traffic allocation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} + */ + public static final class RolloutStep extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + RolloutStepOrBuilder { + private static final long serialVersionUID = 0L; + // Use RolloutStep.newBuilder() to construct. + private RolloutStep(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RolloutStep() { + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RolloutStep(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RolloutStep( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 16: + { + trafficPercent_ = input.readInt32(); + break; + } + case 26: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (minDuration_ != null) { + subBuilder = minDuration_.toBuilder(); + } + minDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minDuration_); + minDuration_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.class, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * The name of the rollout step;
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the rollout step;
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAFFIC_PERCENT_FIELD_NUMBER = 2; + private int trafficPercent_; + /** + * + * + *
+     * The percentage of traffic allocated to the flow version of this rollout
+     * step. (0%, 100%].
+     * 
+ * + * int32 traffic_percent = 2; + * + * @return The trafficPercent. + */ + @java.lang.Override + public int getTrafficPercent() { + return trafficPercent_; + } + + public static final int MIN_DURATION_FIELD_NUMBER = 3; + private com.google.protobuf.Duration minDuration_; + /** + * + * + *
+     * The minimum time that this step should last. Should be longer than 1
+     * hour. If not set, the default minimum duration for each step will be 1
+     * hour.
+     * 
+ * + * .google.protobuf.Duration min_duration = 3; + * + * @return Whether the minDuration field is set. + */ + @java.lang.Override + public boolean hasMinDuration() { + return minDuration_ != null; + } + /** + * + * + *
+     * The minimum time that this step should last. Should be longer than 1
+     * hour. If not set, the default minimum duration for each step will be 1
+     * hour.
+     * 
+ * + * .google.protobuf.Duration min_duration = 3; + * + * @return The minDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMinDuration() { + return minDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minDuration_; + } + /** + * + * + *
+     * The minimum time that this step should last. Should be longer than 1
+     * hour. If not set, the default minimum duration for each step will be 1
+     * hour.
+     * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder() { + return getMinDuration(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (trafficPercent_ != 0) { + output.writeInt32(2, trafficPercent_); + } + if (minDuration_ != null) { + output.writeMessage(3, getMinDuration()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (trafficPercent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, trafficPercent_); + } + if (minDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMinDuration()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep other = + (com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (getTrafficPercent() != other.getTrafficPercent()) return false; + if (hasMinDuration() != other.hasMinDuration()) return false; + if (hasMinDuration()) { + if (!getMinDuration().equals(other.getMinDuration())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + TRAFFIC_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getTrafficPercent(); + if (hasMinDuration()) { + hash = (37 * hash) + MIN_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMinDuration().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A single rollout step with specified traffic allocation.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.class, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + trafficPercent_ = 0; + + if (minDurationBuilder_ == null) { + minDuration_ = null; + } else { + minDuration_ = null; + minDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_RolloutStep_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep build() { + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep buildPartial() { + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep result = + new com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep(this); + result.displayName_ = displayName_; + result.trafficPercent_ = trafficPercent_; + if (minDurationBuilder_ == null) { + result.minDuration_ = minDuration_; + } else { + result.minDuration_ = minDurationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep other) { + if (other + == com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.getTrafficPercent() != 0) { + setTrafficPercent(other.getTrafficPercent()); + } + if (other.hasMinDuration()) { + mergeMinDuration(other.getMinDuration()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * The name of the rollout step;
+       * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the rollout step;
+       * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the rollout step;
+       * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the rollout step;
+       * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the rollout step;
+       * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private int trafficPercent_; + /** + * + * + *
+       * The percentage of traffic allocated to the flow version of this rollout
+       * step. (0%, 100%].
+       * 
+ * + * int32 traffic_percent = 2; + * + * @return The trafficPercent. + */ + @java.lang.Override + public int getTrafficPercent() { + return trafficPercent_; + } + /** + * + * + *
+       * The percentage of traffic allocated to the flow version of this rollout
+       * step. (0%, 100%].
+       * 
+ * + * int32 traffic_percent = 2; + * + * @param value The trafficPercent to set. + * @return This builder for chaining. + */ + public Builder setTrafficPercent(int value) { + + trafficPercent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The percentage of traffic allocated to the flow version of this rollout
+       * step. (0%, 100%].
+       * 
+ * + * int32 traffic_percent = 2; + * + * @return This builder for chaining. + */ + public Builder clearTrafficPercent() { + + trafficPercent_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration minDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + minDurationBuilder_; + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + * + * @return Whether the minDuration field is set. + */ + public boolean hasMinDuration() { + return minDurationBuilder_ != null || minDuration_ != null; + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + * + * @return The minDuration. + */ + public com.google.protobuf.Duration getMinDuration() { + if (minDurationBuilder_ == null) { + return minDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minDuration_; + } else { + return minDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + public Builder setMinDuration(com.google.protobuf.Duration value) { + if (minDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minDuration_ = value; + onChanged(); + } else { + minDurationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + public Builder setMinDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (minDurationBuilder_ == null) { + minDuration_ = builderForValue.build(); + onChanged(); + } else { + minDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + public Builder mergeMinDuration(com.google.protobuf.Duration value) { + if (minDurationBuilder_ == null) { + if (minDuration_ != null) { + minDuration_ = + com.google.protobuf.Duration.newBuilder(minDuration_) + .mergeFrom(value) + .buildPartial(); + } else { + minDuration_ = value; + } + onChanged(); + } else { + minDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + public Builder clearMinDuration() { + if (minDurationBuilder_ == null) { + minDuration_ = null; + onChanged(); + } else { + minDuration_ = null; + minDurationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + public com.google.protobuf.Duration.Builder getMinDurationBuilder() { + + onChanged(); + return getMinDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + public com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder() { + if (minDurationBuilder_ != null) { + return minDurationBuilder_.getMessageOrBuilder(); + } else { + return minDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minDuration_; + } + } + /** + * + * + *
+       * The minimum time that this step should last. Should be longer than 1
+       * hour. If not set, the default minimum duration for each step will be 1
+       * hour.
+       * 
+ * + * .google.protobuf.Duration min_duration = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMinDurationFieldBuilder() { + if (minDurationBuilder_ == null) { + minDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMinDuration(), getParentForChildren(), isClean()); + minDuration_ = null; + } + return minDurationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + private static final com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep(); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RolloutStep parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RolloutStep(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ROLLOUT_STEPS_FIELD_NUMBER = 1; + private java.util.List rolloutSteps_; + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + @java.lang.Override + public java.util.List + getRolloutStepsList() { + return rolloutSteps_; + } + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder> + getRolloutStepsOrBuilderList() { + return rolloutSteps_; + } + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + @java.lang.Override + public int getRolloutStepsCount() { + return rolloutSteps_.size(); + } + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep getRolloutSteps(int index) { + return rolloutSteps_.get(index); + } + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder + getRolloutStepsOrBuilder(int index) { + return rolloutSteps_.get(index); + } + + public static final int ROLLOUT_CONDITION_FIELD_NUMBER = 2; + private volatile java.lang.Object rolloutCondition_; + /** + * + * + *
+   * The conditions that are used to evaluate the success of a rollout
+   * step. If not specified, all rollout steps will proceed to the next one
+   * unless failure conditions are met. E.g. "containment_rate > 60% AND
+   * callback_rate < 20%". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string rollout_condition = 2; + * + * @return The rolloutCondition. + */ + @java.lang.Override + public java.lang.String getRolloutCondition() { + java.lang.Object ref = rolloutCondition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutCondition_ = s; + return s; + } + } + /** + * + * + *
+   * The conditions that are used to evaluate the success of a rollout
+   * step. If not specified, all rollout steps will proceed to the next one
+   * unless failure conditions are met. E.g. "containment_rate > 60% AND
+   * callback_rate < 20%". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string rollout_condition = 2; + * + * @return The bytes for rolloutCondition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutConditionBytes() { + java.lang.Object ref = rolloutCondition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutCondition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAILURE_CONDITION_FIELD_NUMBER = 3; + private volatile java.lang.Object failureCondition_; + /** + * + * + *
+   * The conditions that are used to evaluate the failure of a rollout
+   * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+   * < 10% OR average_turn_count < 3". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string failure_condition = 3; + * + * @return The failureCondition. + */ + @java.lang.Override + public java.lang.String getFailureCondition() { + java.lang.Object ref = failureCondition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureCondition_ = s; + return s; + } + } + /** + * + * + *
+   * The conditions that are used to evaluate the failure of a rollout
+   * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+   * < 10% OR average_turn_count < 3". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string failure_condition = 3; + * + * @return The bytes for failureCondition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFailureConditionBytes() { + java.lang.Object ref = failureCondition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureCondition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rolloutSteps_.size(); i++) { + output.writeMessage(1, rolloutSteps_.get(i)); + } + if (!getRolloutConditionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rolloutCondition_); + } + if (!getFailureConditionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, failureCondition_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rolloutSteps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rolloutSteps_.get(i)); + } + if (!getRolloutConditionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rolloutCondition_); + } + if (!getFailureConditionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, failureCondition_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.RolloutConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RolloutConfig other = + (com.google.cloud.dialogflow.cx.v3.RolloutConfig) obj; + + if (!getRolloutStepsList().equals(other.getRolloutStepsList())) return false; + if (!getRolloutCondition().equals(other.getRolloutCondition())) return false; + if (!getFailureCondition().equals(other.getFailureCondition())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRolloutStepsCount() > 0) { + hash = (37 * hash) + ROLLOUT_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getRolloutStepsList().hashCode(); + } + hash = (37 * hash) + ROLLOUT_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getRolloutCondition().hashCode(); + hash = (37 * hash) + FAILURE_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getFailureCondition().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.RolloutConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration for auto rollout.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RolloutConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RolloutConfig) + com.google.cloud.dialogflow.cx.v3.RolloutConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.class, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RolloutConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRolloutStepsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (rolloutStepsBuilder_ == null) { + rolloutSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rolloutStepsBuilder_.clear(); + } + rolloutCondition_ = ""; + + failureCondition_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RolloutConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig build() { + com.google.cloud.dialogflow.cx.v3.RolloutConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3.RolloutConfig result = + new com.google.cloud.dialogflow.cx.v3.RolloutConfig(this); + int from_bitField0_ = bitField0_; + if (rolloutStepsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rolloutSteps_ = java.util.Collections.unmodifiableList(rolloutSteps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rolloutSteps_ = rolloutSteps_; + } else { + result.rolloutSteps_ = rolloutStepsBuilder_.build(); + } + result.rolloutCondition_ = rolloutCondition_; + result.failureCondition_ = failureCondition_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.RolloutConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RolloutConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RolloutConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3.RolloutConfig.getDefaultInstance()) + return this; + if (rolloutStepsBuilder_ == null) { + if (!other.rolloutSteps_.isEmpty()) { + if (rolloutSteps_.isEmpty()) { + rolloutSteps_ = other.rolloutSteps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRolloutStepsIsMutable(); + rolloutSteps_.addAll(other.rolloutSteps_); + } + onChanged(); + } + } else { + if (!other.rolloutSteps_.isEmpty()) { + if (rolloutStepsBuilder_.isEmpty()) { + rolloutStepsBuilder_.dispose(); + rolloutStepsBuilder_ = null; + rolloutSteps_ = other.rolloutSteps_; + bitField0_ = (bitField0_ & ~0x00000001); + rolloutStepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRolloutStepsFieldBuilder() + : null; + } else { + rolloutStepsBuilder_.addAllMessages(other.rolloutSteps_); + } + } + } + if (!other.getRolloutCondition().isEmpty()) { + rolloutCondition_ = other.rolloutCondition_; + onChanged(); + } + if (!other.getFailureCondition().isEmpty()) { + failureCondition_ = other.failureCondition_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.RolloutConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.RolloutConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + rolloutSteps_ = java.util.Collections.emptyList(); + + private void ensureRolloutStepsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rolloutSteps_ = + new java.util.ArrayList( + rolloutSteps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder> + rolloutStepsBuilder_; + + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public java.util.List + getRolloutStepsList() { + if (rolloutStepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rolloutSteps_); + } else { + return rolloutStepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public int getRolloutStepsCount() { + if (rolloutStepsBuilder_ == null) { + return rolloutSteps_.size(); + } else { + return rolloutStepsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep getRolloutSteps(int index) { + if (rolloutStepsBuilder_ == null) { + return rolloutSteps_.get(index); + } else { + return rolloutStepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder setRolloutSteps( + int index, com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep value) { + if (rolloutStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutStepsIsMutable(); + rolloutSteps_.set(index, value); + onChanged(); + } else { + rolloutStepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder setRolloutSteps( + int index, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder builderForValue) { + if (rolloutStepsBuilder_ == null) { + ensureRolloutStepsIsMutable(); + rolloutSteps_.set(index, builderForValue.build()); + onChanged(); + } else { + rolloutStepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder addRolloutSteps( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep value) { + if (rolloutStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutStepsIsMutable(); + rolloutSteps_.add(value); + onChanged(); + } else { + rolloutStepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder addRolloutSteps( + int index, com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep value) { + if (rolloutStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutStepsIsMutable(); + rolloutSteps_.add(index, value); + onChanged(); + } else { + rolloutStepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder addRolloutSteps( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder builderForValue) { + if (rolloutStepsBuilder_ == null) { + ensureRolloutStepsIsMutable(); + rolloutSteps_.add(builderForValue.build()); + onChanged(); + } else { + rolloutStepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder addRolloutSteps( + int index, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder builderForValue) { + if (rolloutStepsBuilder_ == null) { + ensureRolloutStepsIsMutable(); + rolloutSteps_.add(index, builderForValue.build()); + onChanged(); + } else { + rolloutStepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder addAllRolloutSteps( + java.lang.Iterable + values) { + if (rolloutStepsBuilder_ == null) { + ensureRolloutStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rolloutSteps_); + onChanged(); + } else { + rolloutStepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder clearRolloutSteps() { + if (rolloutStepsBuilder_ == null) { + rolloutSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rolloutStepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public Builder removeRolloutSteps(int index) { + if (rolloutStepsBuilder_ == null) { + ensureRolloutStepsIsMutable(); + rolloutSteps_.remove(index); + onChanged(); + } else { + rolloutStepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder + getRolloutStepsBuilder(int index) { + return getRolloutStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder + getRolloutStepsOrBuilder(int index) { + if (rolloutStepsBuilder_ == null) { + return rolloutSteps_.get(index); + } else { + return rolloutStepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder> + getRolloutStepsOrBuilderList() { + if (rolloutStepsBuilder_ != null) { + return rolloutStepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rolloutSteps_); + } + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder + addRolloutStepsBuilder() { + return getRolloutStepsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.getDefaultInstance()); + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder + addRolloutStepsBuilder(int index) { + return getRolloutStepsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.getDefaultInstance()); + } + /** + * + * + *
+     * Steps to roll out a flow version. Steps should be sorted by percentage in
+     * ascending order.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + public java.util.List + getRolloutStepsBuilderList() { + return getRolloutStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder> + getRolloutStepsFieldBuilder() { + if (rolloutStepsBuilder_ == null) { + rolloutStepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.Builder, + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder>( + rolloutSteps_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rolloutSteps_ = null; + } + return rolloutStepsBuilder_; + } + + private java.lang.Object rolloutCondition_ = ""; + /** + * + * + *
+     * The conditions that are used to evaluate the success of a rollout
+     * step. If not specified, all rollout steps will proceed to the next one
+     * unless failure conditions are met. E.g. "containment_rate > 60% AND
+     * callback_rate < 20%". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string rollout_condition = 2; + * + * @return The rolloutCondition. + */ + public java.lang.String getRolloutCondition() { + java.lang.Object ref = rolloutCondition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutCondition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The conditions that are used to evaluate the success of a rollout
+     * step. If not specified, all rollout steps will proceed to the next one
+     * unless failure conditions are met. E.g. "containment_rate > 60% AND
+     * callback_rate < 20%". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string rollout_condition = 2; + * + * @return The bytes for rolloutCondition. + */ + public com.google.protobuf.ByteString getRolloutConditionBytes() { + java.lang.Object ref = rolloutCondition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutCondition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The conditions that are used to evaluate the success of a rollout
+     * step. If not specified, all rollout steps will proceed to the next one
+     * unless failure conditions are met. E.g. "containment_rate > 60% AND
+     * callback_rate < 20%". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string rollout_condition = 2; + * + * @param value The rolloutCondition to set. + * @return This builder for chaining. + */ + public Builder setRolloutCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutCondition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The conditions that are used to evaluate the success of a rollout
+     * step. If not specified, all rollout steps will proceed to the next one
+     * unless failure conditions are met. E.g. "containment_rate > 60% AND
+     * callback_rate < 20%". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string rollout_condition = 2; + * + * @return This builder for chaining. + */ + public Builder clearRolloutCondition() { + + rolloutCondition_ = getDefaultInstance().getRolloutCondition(); + onChanged(); + return this; + } + /** + * + * + *
+     * The conditions that are used to evaluate the success of a rollout
+     * step. If not specified, all rollout steps will proceed to the next one
+     * unless failure conditions are met. E.g. "containment_rate > 60% AND
+     * callback_rate < 20%". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string rollout_condition = 2; + * + * @param value The bytes for rolloutCondition to set. + * @return This builder for chaining. + */ + public Builder setRolloutConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rolloutCondition_ = value; + onChanged(); + return this; + } + + private java.lang.Object failureCondition_ = ""; + /** + * + * + *
+     * The conditions that are used to evaluate the failure of a rollout
+     * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+     * < 10% OR average_turn_count < 3". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string failure_condition = 3; + * + * @return The failureCondition. + */ + public java.lang.String getFailureCondition() { + java.lang.Object ref = failureCondition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureCondition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The conditions that are used to evaluate the failure of a rollout
+     * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+     * < 10% OR average_turn_count < 3". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string failure_condition = 3; + * + * @return The bytes for failureCondition. + */ + public com.google.protobuf.ByteString getFailureConditionBytes() { + java.lang.Object ref = failureCondition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureCondition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The conditions that are used to evaluate the failure of a rollout
+     * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+     * < 10% OR average_turn_count < 3". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string failure_condition = 3; + * + * @param value The failureCondition to set. + * @return This builder for chaining. + */ + public Builder setFailureCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + failureCondition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The conditions that are used to evaluate the failure of a rollout
+     * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+     * < 10% OR average_turn_count < 3". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string failure_condition = 3; + * + * @return This builder for chaining. + */ + public Builder clearFailureCondition() { + + failureCondition_ = getDefaultInstance().getFailureCondition(); + onChanged(); + return this; + } + /** + * + * + *
+     * The conditions that are used to evaluate the failure of a rollout
+     * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+     * < 10% OR average_turn_count < 3". See the [conditions
+     * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+     * 
+ * + * string failure_condition = 3; + * + * @param value The bytes for failureCondition to set. + * @return This builder for chaining. + */ + public Builder setFailureConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + failureCondition_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.RolloutConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RolloutConfig) + private static final com.google.cloud.dialogflow.cx.v3.RolloutConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RolloutConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RolloutConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RolloutConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutConfigOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutConfigOrBuilder.java new file mode 100644 index 000000000..bf77b3491 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutConfigOrBuilder.java @@ -0,0 +1,152 @@ +/* + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface RolloutConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RolloutConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + java.util.List getRolloutStepsList(); + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep getRolloutSteps(int index); + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + int getRolloutStepsCount(); + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + java.util.List + getRolloutStepsOrBuilderList(); + /** + * + * + *
+   * Steps to roll out a flow version. Steps should be sorted by percentage in
+   * ascending order.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep rollout_steps = 1; + * + */ + com.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStepOrBuilder getRolloutStepsOrBuilder( + int index); + + /** + * + * + *
+   * The conditions that are used to evaluate the success of a rollout
+   * step. If not specified, all rollout steps will proceed to the next one
+   * unless failure conditions are met. E.g. "containment_rate > 60% AND
+   * callback_rate < 20%". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string rollout_condition = 2; + * + * @return The rolloutCondition. + */ + java.lang.String getRolloutCondition(); + /** + * + * + *
+   * The conditions that are used to evaluate the success of a rollout
+   * step. If not specified, all rollout steps will proceed to the next one
+   * unless failure conditions are met. E.g. "containment_rate > 60% AND
+   * callback_rate < 20%". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string rollout_condition = 2; + * + * @return The bytes for rolloutCondition. + */ + com.google.protobuf.ByteString getRolloutConditionBytes(); + + /** + * + * + *
+   * The conditions that are used to evaluate the failure of a rollout
+   * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+   * < 10% OR average_turn_count < 3". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string failure_condition = 3; + * + * @return The failureCondition. + */ + java.lang.String getFailureCondition(); + /** + * + * + *
+   * The conditions that are used to evaluate the failure of a rollout
+   * step. If not specified, no rollout steps will fail. E.g. "containment_rate
+   * < 10% OR average_turn_count < 3". See the [conditions
+   * reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
+   * 
+ * + * string failure_condition = 3; + * + * @return The bytes for failureCondition. + */ + com.google.protobuf.ByteString getFailureConditionBytes(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutState.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutState.java new file mode 100644 index 000000000..9138b5b50 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutState.java @@ -0,0 +1,992 @@ +/* + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * State of the auto-rollout process.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RolloutState} + */ +public final class RolloutState extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.RolloutState) + RolloutStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use RolloutState.newBuilder() to construct. + private RolloutState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RolloutState() { + step_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RolloutState(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RolloutState( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + step_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + stepIndex_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RolloutState.class, + com.google.cloud.dialogflow.cx.v3.RolloutState.Builder.class); + } + + public static final int STEP_FIELD_NUMBER = 1; + private volatile java.lang.Object step_; + /** + * + * + *
+   * Display name of the current auto rollout step.
+   * 
+ * + * string step = 1; + * + * @return The step. + */ + @java.lang.Override + public java.lang.String getStep() { + java.lang.Object ref = step_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + step_ = s; + return s; + } + } + /** + * + * + *
+   * Display name of the current auto rollout step.
+   * 
+ * + * string step = 1; + * + * @return The bytes for step. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStepBytes() { + java.lang.Object ref = step_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + step_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STEP_INDEX_FIELD_NUMBER = 3; + private int stepIndex_; + /** + * + * + *
+   * Index of the current step in the auto rollout steps list.
+   * 
+ * + * int32 step_index = 3; + * + * @return The stepIndex. + */ + @java.lang.Override + public int getStepIndex() { + return stepIndex_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Start time of the current step.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Start time of the current step.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Start time of the current step.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getStepBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, step_); + } + if (startTime_ != null) { + output.writeMessage(2, getStartTime()); + } + if (stepIndex_ != 0) { + output.writeInt32(3, stepIndex_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getStepBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, step_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (stepIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, stepIndex_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.RolloutState)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.RolloutState other = + (com.google.cloud.dialogflow.cx.v3.RolloutState) obj; + + if (!getStep().equals(other.getStep())) return false; + if (getStepIndex() != other.getStepIndex()) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STEP_FIELD_NUMBER; + hash = (53 * hash) + getStep().hashCode(); + hash = (37 * hash) + STEP_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getStepIndex(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.RolloutState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * State of the auto-rollout process.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.RolloutState} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.RolloutState) + com.google.cloud.dialogflow.cx.v3.RolloutStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.RolloutState.class, + com.google.cloud.dialogflow.cx.v3.RolloutState.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.RolloutState.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + step_ = ""; + + stepIndex_ = 0; + + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.ExperimentProto + .internal_static_google_cloud_dialogflow_cx_v3_RolloutState_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutState getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.RolloutState.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutState build() { + com.google.cloud.dialogflow.cx.v3.RolloutState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutState buildPartial() { + com.google.cloud.dialogflow.cx.v3.RolloutState result = + new com.google.cloud.dialogflow.cx.v3.RolloutState(this); + result.step_ = step_; + result.stepIndex_ = stepIndex_; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.RolloutState) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.RolloutState) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.RolloutState other) { + if (other == com.google.cloud.dialogflow.cx.v3.RolloutState.getDefaultInstance()) return this; + if (!other.getStep().isEmpty()) { + step_ = other.step_; + onChanged(); + } + if (other.getStepIndex() != 0) { + setStepIndex(other.getStepIndex()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.RolloutState parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.cx.v3.RolloutState) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object step_ = ""; + /** + * + * + *
+     * Display name of the current auto rollout step.
+     * 
+ * + * string step = 1; + * + * @return The step. + */ + public java.lang.String getStep() { + java.lang.Object ref = step_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + step_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name of the current auto rollout step.
+     * 
+ * + * string step = 1; + * + * @return The bytes for step. + */ + public com.google.protobuf.ByteString getStepBytes() { + java.lang.Object ref = step_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + step_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name of the current auto rollout step.
+     * 
+ * + * string step = 1; + * + * @param value The step to set. + * @return This builder for chaining. + */ + public Builder setStep(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + step_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of the current auto rollout step.
+     * 
+ * + * string step = 1; + * + * @return This builder for chaining. + */ + public Builder clearStep() { + + step_ = getDefaultInstance().getStep(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of the current auto rollout step.
+     * 
+ * + * string step = 1; + * + * @param value The bytes for step to set. + * @return This builder for chaining. + */ + public Builder setStepBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + step_ = value; + onChanged(); + return this; + } + + private int stepIndex_; + /** + * + * + *
+     * Index of the current step in the auto rollout steps list.
+     * 
+ * + * int32 step_index = 3; + * + * @return The stepIndex. + */ + @java.lang.Override + public int getStepIndex() { + return stepIndex_; + } + /** + * + * + *
+     * Index of the current step in the auto rollout steps list.
+     * 
+ * + * int32 step_index = 3; + * + * @param value The stepIndex to set. + * @return This builder for chaining. + */ + public Builder setStepIndex(int value) { + + stepIndex_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Index of the current step in the auto rollout steps list.
+     * 
+ * + * int32 step_index = 3; + * + * @return This builder for chaining. + */ + public Builder clearStepIndex() { + + stepIndex_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Start time of the current step.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.RolloutState) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.RolloutState) + private static final com.google.cloud.dialogflow.cx.v3.RolloutState DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.RolloutState(); + } + + public static com.google.cloud.dialogflow.cx.v3.RolloutState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RolloutState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RolloutState(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.RolloutState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutStateOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutStateOrBuilder.java new file mode 100644 index 000000000..7bd81349e --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/RolloutStateOrBuilder.java @@ -0,0 +1,98 @@ +/* + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/experiment.proto + +package com.google.cloud.dialogflow.cx.v3; + +public interface RolloutStateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.RolloutState) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Display name of the current auto rollout step.
+   * 
+ * + * string step = 1; + * + * @return The step. + */ + java.lang.String getStep(); + /** + * + * + *
+   * Display name of the current auto rollout step.
+   * 
+ * + * string step = 1; + * + * @return The bytes for step. + */ + com.google.protobuf.ByteString getStepBytes(); + + /** + * + * + *
+   * Index of the current step in the auto rollout steps list.
+   * 
+ * + * int32 step_index = 3; + * + * @return The stepIndex. + */ + int getStepIndex(); + + /** + * + * + *
+   * Start time of the current step.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Start time of the current step.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Start time of the current step.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java index 373430064..cdde90765 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettings.java @@ -45,6 +45,7 @@ private SecuritySettings() { redactionStrategy_ = 0; redactionScope_ = 0; inspectTemplate_ = ""; + deidentifyTemplate_ = ""; purgeDataTypes_ = java.util.Collections.emptyList(); } @@ -144,6 +145,32 @@ private SecuritySettings( inspectTemplate_ = s; break; } + case 106: + { + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder + subBuilder = null; + if (insightsExportSettings_ != null) { + subBuilder = insightsExportSettings_.toBuilder(); + } + insightsExportSettings_ = + input.readMessage( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(insightsExportSettings_); + insightsExportSettings_ = subBuilder.buildPartial(); + } + + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + deidentifyTemplate_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -601,6 +628,588 @@ private PurgeDataType(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType) } + public interface InsightsExportSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If enabled, we will automatically exports
+     * conversations to Insights and Insights runs its analyzers.
+     * 
+ * + * bool enable_insights_export = 1; + * + * @return The enableInsightsExport. + */ + boolean getEnableInsightsExport(); + } + /** + * + * + *
+   * Settings for exporting conversations to
+   * [Insights](https://cloud.google.com/dialogflow/priv/docs/insights).
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} + */ + public static final class InsightsExportSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) + InsightsExportSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use InsightsExportSettings.newBuilder() to construct. + private InsightsExportSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InsightsExportSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InsightsExportSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InsightsExportSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableInsightsExport_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SecuritySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SecuritySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.class, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder + .class); + } + + public static final int ENABLE_INSIGHTS_EXPORT_FIELD_NUMBER = 1; + private boolean enableInsightsExport_; + /** + * + * + *
+     * If enabled, we will automatically exports
+     * conversations to Insights and Insights runs its analyzers.
+     * 
+ * + * bool enable_insights_export = 1; + * + * @return The enableInsightsExport. + */ + @java.lang.Override + public boolean getEnableInsightsExport() { + return enableInsightsExport_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableInsightsExport_ != false) { + output.writeBool(1, enableInsightsExport_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableInsightsExport_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableInsightsExport_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings other = + (com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) obj; + + if (getEnableInsightsExport() != other.getEnableInsightsExport()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_INSIGHTS_EXPORT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableInsightsExport()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Settings for exporting conversations to
+     * [Insights](https://cloud.google.com/dialogflow/priv/docs/insights).
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.SecuritySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.SecuritySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.class, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableInsightsExport_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.SecuritySettingsProto + .internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings build() { + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + buildPartial() { + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings result = + new com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings(this); + result.enableInsightsExport_ = enableInsightsExport_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings other) { + if (other + == com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + .getDefaultInstance()) return this; + if (other.getEnableInsightsExport() != false) { + setEnableInsightsExport(other.getEnableInsightsExport()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableInsightsExport_; + /** + * + * + *
+       * If enabled, we will automatically exports
+       * conversations to Insights and Insights runs its analyzers.
+       * 
+ * + * bool enable_insights_export = 1; + * + * @return The enableInsightsExport. + */ + @java.lang.Override + public boolean getEnableInsightsExport() { + return enableInsightsExport_; + } + /** + * + * + *
+       * If enabled, we will automatically exports
+       * conversations to Insights and Insights runs its analyzers.
+       * 
+ * + * bool enable_insights_export = 1; + * + * @param value The enableInsightsExport to set. + * @return This builder for chaining. + */ + public Builder setEnableInsightsExport(boolean value) { + + enableInsightsExport_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If enabled, we will automatically exports
+       * conversations to Insights and Insights runs its analyzers.
+       * 
+ * + * bool enable_insights_export = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableInsightsExport() { + + enableInsightsExport_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) + private static final com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InsightsExportSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InsightsExportSettings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int dataRetentionCase_ = 0; private java.lang.Object dataRetention_; @@ -841,17 +1450,18 @@ public com.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope getReda * * *
-   * DLP inspect template name. Use this template to define inspect base
-   * settings.
+   * [DLP](https://cloud.google.com/dlp/docs) 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
    * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-   * ID>` OR
-   * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+   * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @return The inspectTemplate. */ @@ -871,17 +1481,18 @@ public java.lang.String getInspectTemplate() { * * *
-   * DLP inspect template name. Use this template to define inspect base
-   * settings.
+   * [DLP](https://cloud.google.com/dlp/docs) 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
    * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-   * ID>` OR
-   * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+   * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @return The bytes for inspectTemplate. */ @@ -898,6 +1509,71 @@ public com.google.protobuf.ByteString getInspectTemplateBytes() { } } + public static final int DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 17; + private volatile java.lang.Object deidentifyTemplate_; + /** + * + * + *
+   * [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) = { ... } + * + * @return The deidentifyTemplate. + */ + @java.lang.Override + public java.lang.String getDeidentifyTemplate() { + java.lang.Object ref = deidentifyTemplate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deidentifyTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * [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) = { ... } + * + * @return The bytes for deidentifyTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeidentifyTemplateBytes() { + java.lang.Object ref = deidentifyTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deidentifyTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int RETENTION_WINDOW_DAYS_FIELD_NUMBER = 6; /** * @@ -998,69 +1674,136 @@ public com.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType convert( * repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; * * - * @return The count of purgeDataTypes. + * @return The count of purgeDataTypes. + */ + @java.lang.Override + public int getPurgeDataTypesCount() { + return purgeDataTypes_.size(); + } + /** + * + * + *
+   * List of types of data to remove when retention settings triggers purge.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * + * + * @param index The index of the element to return. + * @return The purgeDataTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType getPurgeDataTypes( + int index) { + return purgeDataTypes_converter_.convert(purgeDataTypes_.get(index)); + } + /** + * + * + *
+   * List of types of data to remove when retention settings triggers purge.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * + * + * @return A list containing the enum numeric values on the wire for purgeDataTypes. + */ + @java.lang.Override + public java.util.List getPurgeDataTypesValueList() { + return purgeDataTypes_; + } + /** + * + * + *
+   * List of types of data to remove when retention settings triggers purge.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of purgeDataTypes at the given index. */ @java.lang.Override - public int getPurgeDataTypesCount() { - return purgeDataTypes_.size(); + public int getPurgeDataTypesValue(int index) { + return purgeDataTypes_.get(index); } + + private int purgeDataTypesMemoizedSerializedSize; + + public static final int INSIGHTS_EXPORT_SETTINGS_FIELD_NUMBER = 13; + private com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + insightsExportSettings_; /** * * *
-   * List of types of data to remove when retention settings triggers purge.
+   * Controls conversation exporting settings to Insights after conversation is
+   * completed.
+   * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+   * Insights export is disabled no matter what you configure here.
    * 
* * - * repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; * * - * @param index The index of the element to return. - * @return The purgeDataTypes at the given index. + * @return Whether the insightsExportSettings field is set. */ @java.lang.Override - public com.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType getPurgeDataTypes( - int index) { - return purgeDataTypes_converter_.convert(purgeDataTypes_.get(index)); + public boolean hasInsightsExportSettings() { + return insightsExportSettings_ != null; } /** * * *
-   * List of types of data to remove when retention settings triggers purge.
+   * Controls conversation exporting settings to Insights after conversation is
+   * completed.
+   * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+   * Insights export is disabled no matter what you configure here.
    * 
* * - * repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; * * - * @return A list containing the enum numeric values on the wire for purgeDataTypes. + * @return The insightsExportSettings. */ @java.lang.Override - public java.util.List getPurgeDataTypesValueList() { - return purgeDataTypes_; + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + getInsightsExportSettings() { + return insightsExportSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + .getDefaultInstance() + : insightsExportSettings_; } /** * * *
-   * List of types of data to remove when retention settings triggers purge.
+   * Controls conversation exporting settings to Insights after conversation is
+   * completed.
+   * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+   * Insights export is disabled no matter what you configure here.
    * 
* * - * repeated .google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType purge_data_types = 8; + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of purgeDataTypes at the given index. */ @java.lang.Override - public int getPurgeDataTypesValue(int index) { - return purgeDataTypes_.get(index); + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettingsOrBuilder + getInsightsExportSettingsOrBuilder() { + return getInsightsExportSettings(); } - private int purgeDataTypesMemoizedSerializedSize; - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1107,6 +1850,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getInspectTemplateBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, inspectTemplate_); } + if (insightsExportSettings_ != null) { + output.writeMessage(13, getInsightsExportSettings()); + } + if (!getDeidentifyTemplateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, deidentifyTemplate_); + } unknownFields.writeTo(output); } @@ -1155,6 +1904,13 @@ public int getSerializedSize() { if (!getInspectTemplateBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, inspectTemplate_); } + if (insightsExportSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, getInsightsExportSettings()); + } + if (!getDeidentifyTemplateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, deidentifyTemplate_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1176,7 +1932,12 @@ public boolean equals(final java.lang.Object obj) { if (redactionStrategy_ != other.redactionStrategy_) return false; if (redactionScope_ != other.redactionScope_) return false; if (!getInspectTemplate().equals(other.getInspectTemplate())) return false; + if (!getDeidentifyTemplate().equals(other.getDeidentifyTemplate())) return false; if (!purgeDataTypes_.equals(other.purgeDataTypes_)) return false; + if (hasInsightsExportSettings() != other.hasInsightsExportSettings()) return false; + if (hasInsightsExportSettings()) { + if (!getInsightsExportSettings().equals(other.getInsightsExportSettings())) return false; + } if (!getDataRetentionCase().equals(other.getDataRetentionCase())) return false; switch (dataRetentionCase_) { case 6: @@ -1206,10 +1967,16 @@ public int hashCode() { hash = (53 * hash) + redactionScope_; hash = (37 * hash) + INSPECT_TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getInspectTemplate().hashCode(); + hash = (37 * hash) + DEIDENTIFY_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyTemplate().hashCode(); if (getPurgeDataTypesCount() > 0) { hash = (37 * hash) + PURGE_DATA_TYPES_FIELD_NUMBER; hash = (53 * hash) + purgeDataTypes_.hashCode(); } + if (hasInsightsExportSettings()) { + hash = (37 * hash) + INSIGHTS_EXPORT_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getInsightsExportSettings().hashCode(); + } switch (dataRetentionCase_) { case 6: hash = (37 * hash) + RETENTION_WINDOW_DAYS_FIELD_NUMBER; @@ -1375,8 +2142,16 @@ public Builder clear() { inspectTemplate_ = ""; + deidentifyTemplate_ = ""; + purgeDataTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); + if (insightsExportSettingsBuilder_ == null) { + insightsExportSettings_ = null; + } else { + insightsExportSettings_ = null; + insightsExportSettingsBuilder_ = null; + } dataRetentionCase_ = 0; dataRetention_ = null; return this; @@ -1412,6 +2187,7 @@ public com.google.cloud.dialogflow.cx.v3.SecuritySettings buildPartial() { result.redactionStrategy_ = redactionStrategy_; result.redactionScope_ = redactionScope_; result.inspectTemplate_ = inspectTemplate_; + result.deidentifyTemplate_ = deidentifyTemplate_; if (dataRetentionCase_ == 6) { result.dataRetention_ = dataRetention_; } @@ -1420,6 +2196,11 @@ public com.google.cloud.dialogflow.cx.v3.SecuritySettings buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.purgeDataTypes_ = purgeDataTypes_; + if (insightsExportSettingsBuilder_ == null) { + result.insightsExportSettings_ = insightsExportSettings_; + } else { + result.insightsExportSettings_ = insightsExportSettingsBuilder_.build(); + } result.dataRetentionCase_ = dataRetentionCase_; onBuilt(); return result; @@ -1489,6 +2270,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SecuritySettings othe inspectTemplate_ = other.inspectTemplate_; onChanged(); } + if (!other.getDeidentifyTemplate().isEmpty()) { + deidentifyTemplate_ = other.deidentifyTemplate_; + onChanged(); + } if (!other.purgeDataTypes_.isEmpty()) { if (purgeDataTypes_.isEmpty()) { purgeDataTypes_ = other.purgeDataTypes_; @@ -1499,6 +2284,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.SecuritySettings othe } onChanged(); } + if (other.hasInsightsExportSettings()) { + mergeInsightsExportSettings(other.getInsightsExportSettings()); + } switch (other.getDataRetentionCase()) { case RETENTION_WINDOW_DAYS: { @@ -2004,17 +2792,18 @@ public Builder clearRedactionScope() { * * *
-     * DLP inspect template name. Use this template to define inspect base
-     * settings.
+     * [DLP](https://cloud.google.com/dlp/docs) 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
      * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-     * ID>` OR
-     * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+     * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @return The inspectTemplate. */ @@ -2033,17 +2822,18 @@ public java.lang.String getInspectTemplate() { * * *
-     * DLP inspect template name. Use this template to define inspect base
-     * settings.
+     * [DLP](https://cloud.google.com/dlp/docs) 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
      * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-     * ID>` OR
-     * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+     * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @return The bytes for inspectTemplate. */ @@ -2062,17 +2852,18 @@ public com.google.protobuf.ByteString getInspectTemplateBytes() { * * *
-     * DLP inspect template name. Use this template to define inspect base
-     * settings.
+     * [DLP](https://cloud.google.com/dlp/docs) 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
      * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-     * ID>` OR
-     * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+     * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @param value The inspectTemplate to set. * @return This builder for chaining. @@ -2090,17 +2881,18 @@ public Builder setInspectTemplate(java.lang.String value) { * * *
-     * DLP inspect template name. Use this template to define inspect base
-     * settings.
+     * [DLP](https://cloud.google.com/dlp/docs) 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
      * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-     * ID>` OR
-     * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+     * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ @@ -2114,17 +2906,18 @@ public Builder clearInspectTemplate() { * * *
-     * DLP inspect template name. Use this template to define inspect base
-     * settings.
+     * [DLP](https://cloud.google.com/dlp/docs) 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
      * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-     * ID>` OR
-     * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+     * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @param value The bytes for inspectTemplate to set. * @return This builder for chaining. @@ -2140,6 +2933,152 @@ public Builder setInspectTemplateBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object deidentifyTemplate_ = ""; + /** + * + * + *
+     * [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) = { ... } + * + * @return The deidentifyTemplate. + */ + public java.lang.String getDeidentifyTemplate() { + java.lang.Object ref = deidentifyTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deidentifyTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * [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) = { ... } + * + * @return The bytes for deidentifyTemplate. + */ + public com.google.protobuf.ByteString getDeidentifyTemplateBytes() { + java.lang.Object ref = deidentifyTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deidentifyTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * [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) = { ... } + * + * @param value The deidentifyTemplate to set. + * @return This builder for chaining. + */ + public Builder setDeidentifyTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deidentifyTemplate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * [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) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDeidentifyTemplate() { + + deidentifyTemplate_ = getDefaultInstance().getDeidentifyTemplate(); + onChanged(); + return this; + } + /** + * + * + *
+     * [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) = { ... } + * + * @param value The bytes for deidentifyTemplate to set. + * @return This builder for chaining. + */ + public Builder setDeidentifyTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deidentifyTemplate_ = value; + onChanged(); + return this; + } + /** * * @@ -2492,6 +3431,247 @@ public Builder addAllPurgeDataTypesValue(java.lang.Iterable v return this; } + private com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + insightsExportSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettingsOrBuilder> + insightsExportSettingsBuilder_; + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + * + * @return Whether the insightsExportSettings field is set. + */ + public boolean hasInsightsExportSettings() { + return insightsExportSettingsBuilder_ != null || insightsExportSettings_ != null; + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + * + * @return The insightsExportSettings. + */ + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + getInsightsExportSettings() { + if (insightsExportSettingsBuilder_ == null) { + return insightsExportSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + .getDefaultInstance() + : insightsExportSettings_; + } else { + return insightsExportSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + public Builder setInsightsExportSettings( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings value) { + if (insightsExportSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insightsExportSettings_ = value; + onChanged(); + } else { + insightsExportSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + public Builder setInsightsExportSettings( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder + builderForValue) { + if (insightsExportSettingsBuilder_ == null) { + insightsExportSettings_ = builderForValue.build(); + onChanged(); + } else { + insightsExportSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + public Builder mergeInsightsExportSettings( + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings value) { + if (insightsExportSettingsBuilder_ == null) { + if (insightsExportSettings_ != null) { + insightsExportSettings_ = + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.newBuilder( + insightsExportSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + insightsExportSettings_ = value; + } + onChanged(); + } else { + insightsExportSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + public Builder clearInsightsExportSettings() { + if (insightsExportSettingsBuilder_ == null) { + insightsExportSettings_ = null; + onChanged(); + } else { + insightsExportSettings_ = null; + insightsExportSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder + getInsightsExportSettingsBuilder() { + + onChanged(); + return getInsightsExportSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettingsOrBuilder + getInsightsExportSettingsOrBuilder() { + if (insightsExportSettingsBuilder_ != null) { + return insightsExportSettingsBuilder_.getMessageOrBuilder(); + } else { + return insightsExportSettings_ == null + ? com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + .getDefaultInstance() + : insightsExportSettings_; + } + } + /** + * + * + *
+     * Controls conversation exporting settings to Insights after conversation is
+     * completed.
+     * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+     * Insights export is disabled no matter what you configure here.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettingsOrBuilder> + getInsightsExportSettingsFieldBuilder() { + if (insightsExportSettingsBuilder_ == null) { + insightsExportSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.Builder, + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettingsOrBuilder>( + getInsightsExportSettings(), getParentForChildren(), isClean()); + insightsExportSettings_ = null; + } + return insightsExportSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java index 9ce1fe870..855a8fa68 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsOrBuilder.java @@ -141,17 +141,18 @@ public interface SecuritySettingsOrBuilder * * *
-   * DLP inspect template name. Use this template to define inspect base
-   * settings.
+   * [DLP](https://cloud.google.com/dlp/docs) 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
    * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-   * ID>` OR
-   * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+   * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @return The inspectTemplate. */ @@ -160,22 +161,64 @@ public interface SecuritySettingsOrBuilder * * *
-   * DLP inspect template name. Use this template to define inspect base
-   * settings.
+   * [DLP](https://cloud.google.com/dlp/docs) 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
    * `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
-   * ID>` OR
-   * `organizations/<Organization ID>/inspectTemplates/<Template ID>`
+   * 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; + * string inspect_template = 9 [(.google.api.resource_reference) = { ... } * * @return The bytes for inspectTemplate. */ com.google.protobuf.ByteString getInspectTemplateBytes(); + /** + * + * + *
+   * [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) = { ... } + * + * @return The deidentifyTemplate. + */ + java.lang.String getDeidentifyTemplate(); + /** + * + * + *
+   * [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) = { ... } + * + * @return The bytes for deidentifyTemplate. + */ + com.google.protobuf.ByteString getDeidentifyTemplateBytes(); + /** * * @@ -291,6 +334,58 @@ public interface SecuritySettingsOrBuilder */ int getPurgeDataTypesValue(int index); + /** + * + * + *
+   * Controls conversation exporting settings to Insights after conversation is
+   * completed.
+   * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+   * Insights export is disabled no matter what you configure here.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + * + * @return Whether the insightsExportSettings field is set. + */ + boolean hasInsightsExportSettings(); + /** + * + * + *
+   * Controls conversation exporting settings to Insights after conversation is
+   * completed.
+   * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+   * Insights export is disabled no matter what you configure here.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + * + * @return The insightsExportSettings. + */ + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + getInsightsExportSettings(); + /** + * + * + *
+   * Controls conversation exporting settings to Insights after conversation is
+   * completed.
+   * If [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
+   * Insights export is disabled no matter what you configure here.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings insights_export_settings = 13; + * + */ + com.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettingsOrBuilder + getInsightsExportSettingsOrBuilder(); + public com.google.cloud.dialogflow.cx.v3.SecuritySettings.DataRetentionCase getDataRetentionCase(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java index e1804d16e..212828571 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsProto.java @@ -55,6 +55,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -92,62 +96,79 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".SecuritySettingsB\003\340A\002\"a\n\035DeleteSecurity" + "SettingsRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*d" + "ialogflow.googleapis.com/SecuritySetting" - + "s\"\205\006\n\020SecuritySettings\022\021\n\004name\030\001 \001(\tB\003\340A" + + "s\"\233\010\n\020SecuritySettings\022\021\n\004name\030\001 \001(\tB\003\340A" + "\002\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022]\n\022redactio" + "n_strategy\030\003 \001(\0162A.google.cloud.dialogfl" + "ow.cx.v3.SecuritySettings.RedactionStrat" + "egy\022W\n\017redaction_scope\030\004 \001(\0162>.google.cl" + "oud.dialogflow.cx.v3.SecuritySettings.Re" - + "dactionScope\022\030\n\020inspect_template\030\t \001(\t\022\037" - + "\n\025retention_window_days\030\006 \001(\005H\000\022W\n\020purge" - + "_data_types\030\010 \003(\0162=.google.cloud.dialogf" - + "low.cx.v3.SecuritySettings.PurgeDataType" - + "\"P\n\021RedactionStrategy\022\"\n\036REDACTION_STRAT" - + "EGY_UNSPECIFIED\020\000\022\027\n\023REDACT_WITH_SERVICE" - + "\020\001\"J\n\016RedactionScope\022\037\n\033REDACTION_SCOPE_" - + "UNSPECIFIED\020\000\022\027\n\023REDACT_DISK_STORAGE\020\002\"H" - + "\n\rPurgeDataType\022\037\n\033PURGE_DATA_TYPE_UNSPE" - + "CIFIED\020\000\022\026\n\022DIALOGFLOW_HISTORY\020\001:}\352Az\n*d" - + "ialogflow.googleapis.com/SecuritySetting" - + "s\022Lprojects/{project}/locations/{locatio" - + "n}/securitySettings/{security_settings}B" - + "\020\n\016data_retention2\357\t\n\027SecuritySettingsSe" - + "rvice\022\363\001\n\026CreateSecuritySettings\022<.googl" - + "e.cloud.dialogflow.cx.v3.CreateSecurityS" - + "ettingsRequest\032/.google.cloud.dialogflow" - + ".cx.v3.SecuritySettings\"j\202\323\344\223\002I\"4/v3/{pa" - + "rent=projects/*/locations/*}/securitySet" - + "tings:\021security_settings\332A\030parent,securi" - + "ty_settings\022\306\001\n\023GetSecuritySettings\0229.go" - + "ogle.cloud.dialogflow.cx.v3.GetSecurityS" - + "ettingsRequest\032/.google.cloud.dialogflow" - + ".cx.v3.SecuritySettings\"C\202\323\344\223\0026\0224/v3/{na" - + "me=projects/*/locations/*/securitySettin" - + "gs/*}\332A\004name\022\213\002\n\026UpdateSecuritySettings\022" - + "<.google.cloud.dialogflow.cx.v3.UpdateSe" - + "curitySettingsRequest\032/.google.cloud.dia" - + "logflow.cx.v3.SecuritySettings\"\201\001\202\323\344\223\002[2" - + "F/v3/{security_settings.name=projects/*/" - + "locations/*/securitySettings/*}:\021securit" - + "y_settings\332A\035security_settings,update_ma" - + "sk\022\326\001\n\024ListSecuritySettings\022:.google.clo" - + "ud.dialogflow.cx.v3.ListSecuritySettings" - + "Request\032;.google.cloud.dialogflow.cx.v3." - + "ListSecuritySettingsResponse\"E\202\323\344\223\0026\0224/v" - + "3/{parent=projects/*/locations/*}/securi" - + "tySettings\332A\006parent\022\263\001\n\026DeleteSecuritySe" - + "ttings\022<.google.cloud.dialogflow.cx.v3.D" - + "eleteSecuritySettingsRequest\032\026.google.pr" - + "otobuf.Empty\"C\202\323\344\223\0026*4/v3/{name=projects" - + "/*/locations/*/securitySettings/*}\332A\004nam" - + "e\032x\312A\031dialogflow.googleapis.com\322AYhttps:" - + "//www.googleapis.com/auth/cloud-platform" - + ",https://www.googleapis.com/auth/dialogf" - + "lowB\245\001\n!com.google.cloud.dialogflow.cx.v" - + "3B\025SecuritySettingsProtoP\001Z?google.golan" - + "g.org/genproto/googleapis/cloud/dialogfl" - + "ow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialo" - + "gflow.Cx.V3b\006proto3" + + "dactionScope\022A\n\020inspect_template\030\t \001(\tB\'" + + "\372A$\n\"dlp.googleapis.com/InspectTemplate\022" + + "G\n\023deidentify_template\030\021 \001(\tB*\372A\'\n%dlp.g" + + "oogleapis.com/DeidentifyTemplate\022\037\n\025rete" + + "ntion_window_days\030\006 \001(\005H\000\022W\n\020purge_data_" + + "types\030\010 \003(\0162=.google.cloud.dialogflow.cx" + + ".v3.SecuritySettings.PurgeDataType\022h\n\030in" + + "sights_export_settings\030\r \001(\0132F.google.cl" + + "oud.dialogflow.cx.v3.SecuritySettings.In" + + "sightsExportSettings\0328\n\026InsightsExportSe" + + "ttings\022\036\n\026enable_insights_export\030\001 \001(\010\"P" + + "\n\021RedactionStrategy\022\"\n\036REDACTION_STRATEG" + + "Y_UNSPECIFIED\020\000\022\027\n\023REDACT_WITH_SERVICE\020\001" + + "\"J\n\016RedactionScope\022\037\n\033REDACTION_SCOPE_UN" + + "SPECIFIED\020\000\022\027\n\023REDACT_DISK_STORAGE\020\002\"H\n\r" + + "PurgeDataType\022\037\n\033PURGE_DATA_TYPE_UNSPECI" + + "FIED\020\000\022\026\n\022DIALOGFLOW_HISTORY\020\001:}\352Az\n*dia" + + "logflow.googleapis.com/SecuritySettings\022" + + "Lprojects/{project}/locations/{location}" + + "/securitySettings/{security_settings}B\020\n" + + "\016data_retention2\357\t\n\027SecuritySettingsServ" + + "ice\022\363\001\n\026CreateSecuritySettings\022<.google." + + "cloud.dialogflow.cx.v3.CreateSecuritySet" + + "tingsRequest\032/.google.cloud.dialogflow.c" + + "x.v3.SecuritySettings\"j\202\323\344\223\002I\"4/v3/{pare" + + "nt=projects/*/locations/*}/securitySetti" + + "ngs:\021security_settings\332A\030parent,security" + + "_settings\022\306\001\n\023GetSecuritySettings\0229.goog" + + "le.cloud.dialogflow.cx.v3.GetSecuritySet" + + "tingsRequest\032/.google.cloud.dialogflow.c" + + "x.v3.SecuritySettings\"C\202\323\344\223\0026\0224/v3/{name" + + "=projects/*/locations/*/securitySettings" + + "/*}\332A\004name\022\213\002\n\026UpdateSecuritySettings\022<." + + "google.cloud.dialogflow.cx.v3.UpdateSecu" + + "ritySettingsRequest\032/.google.cloud.dialo" + + "gflow.cx.v3.SecuritySettings\"\201\001\202\323\344\223\002[2F/" + + "v3/{security_settings.name=projects/*/lo" + + "cations/*/securitySettings/*}:\021security_" + + "settings\332A\035security_settings,update_mask" + + "\022\326\001\n\024ListSecuritySettings\022:.google.cloud" + + ".dialogflow.cx.v3.ListSecuritySettingsRe" + + "quest\032;.google.cloud.dialogflow.cx.v3.Li" + + "stSecuritySettingsResponse\"E\202\323\344\223\0026\0224/v3/" + + "{parent=projects/*/locations/*}/security" + + "Settings\332A\006parent\022\263\001\n\026DeleteSecuritySett" + + "ings\022<.google.cloud.dialogflow.cx.v3.Del" + + "eteSecuritySettingsRequest\032\026.google.prot" + + "obuf.Empty\"C\202\323\344\223\0026*4/v3/{name=projects/*" + + "/locations/*/securitySettings/*}\332A\004name\032" + + "x\312A\031dialogflow.googleapis.com\322AYhttps://" + + "www.googleapis.com/auth/cloud-platform,h" + + "ttps://www.googleapis.com/auth/dialogflo" + + "wB\314\004\n!com.google.cloud.dialogflow.cx.v3B" + + "\025SecuritySettingsProtoP\001Z?google.golang." + + "org/genproto/googleapis/cloud/dialogflow" + + "/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogf" + + "low.Cx.V3\352A\310\001\n\"dlp.googleapis.com/Inspec" + + "tTemplate\022Uorganizations/{organization}/" + + "locations/{location}/inspectTemplates/{i" + + "nspect_template}\022Kprojects/{project}/loc" + + "ations/{location}/inspectTemplates/{insp" + + "ect_template}\352A\327\001\n%dlp.googleapis.com/De" + + "identifyTemplate\022[organizations/{organiz" + + "ation}/locations/{location}/deidentifyTe" + + "mplates/{deidentify_template}\022Qprojects/" + + "{project}/locations/{location}/deidentif" + + "yTemplates/{deidentify_template}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -220,10 +241,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RedactionStrategy", "RedactionScope", "InspectTemplate", + "DeidentifyTemplate", "RetentionWindowDays", "PurgeDataTypes", + "InsightsExportSettings", "DataRetention", }); + internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_SecuritySettings_InsightsExportSettings_descriptor, + new java.lang.String[] { + "EnableInsightsExport", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -232,6 +265,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ServiceName.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ServiceName.java deleted file mode 100644 index fb25cef0c..000000000 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ServiceName.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright 2021 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 - * - * https://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. - */ - -package com.google.cloud.dialogflow.cx.v3; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ServiceName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_NAMESPACE_SERVICE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String namespace; - private final String service; - - @Deprecated - protected ServiceName() { - project = null; - location = null; - namespace = null; - service = null; - } - - private ServiceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - namespace = Preconditions.checkNotNull(builder.getNamespace()); - service = Preconditions.checkNotNull(builder.getService()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getNamespace() { - return namespace; - } - - public String getService() { - return service; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ServiceName of(String project, String location, String namespace, String service) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setNamespace(namespace) - .setService(service) - .build(); - } - - public static String format(String project, String location, String namespace, String service) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setNamespace(namespace) - .setService(service) - .build() - .toString(); - } - - public static ServiceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_NAMESPACE_SERVICE.validatedMatch( - formattedString, "ServiceName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("namespace"), - matchMap.get("service")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ServiceName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_NAMESPACE_SERVICE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (namespace != null) { - fieldMapBuilder.put("namespace", namespace); - } - if (service != null) { - fieldMapBuilder.put("service", service); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_NAMESPACE_SERVICE.instantiate( - "project", project, "location", location, "namespace", namespace, "service", service); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ServiceName that = ((ServiceName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.namespace, that.namespace) - && Objects.equals(this.service, that.service); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(namespace); - h *= 1000003; - h ^= Objects.hashCode(service); - return h; - } - - /** - * Builder for projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. - */ - public static class Builder { - private String project; - private String location; - private String namespace; - private String service; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getNamespace() { - return namespace; - } - - public String getService() { - return service; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - public Builder setService(String service) { - this.service = service; - return this; - } - - private Builder(ServiceName serviceName) { - this.project = serviceName.project; - this.location = serviceName.location; - this.namespace = serviceName.namespace; - this.service = serviceName.service; - } - - public ServiceName build() { - return new ServiceName(this); - } - } -} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java index 1b37f8614..f9b0a38a6 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java @@ -120,182 +120,185 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\022\035google.cloud.dialogflow.cx.v3\032\034go" + "ogle/api/annotations.proto\032\037google/api/f" + "ield_behavior.proto\032\031google/api/resource" - + ".proto\0320google/cloud/dialogflow/cx/v3/au" - + "dio_config.proto\032(google/cloud/dialogflo" - + "w/cx/v3/flow.proto\032*google/cloud/dialogf" - + "low/cx/v3/intent.proto\032(google/cloud/dia" - + "logflow/cx/v3/page.proto\0324google/cloud/d" - + "ialogflow/cx/v3/response_message.proto\0327" - + "google/cloud/dialogflow/cx/v3/session_en" - + "tity_type.proto\032\036google/protobuf/duratio" - + "n.proto\032\034google/protobuf/struct.proto\032\027g" - + "oogle/rpc/status.proto\032\030google/type/latl" - + "ng.proto\032\027google/api/client.proto\"\253\002\n\023De" - + "tectIntentRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372" - + "A#\n!dialogflow.googleapis.com/Session\022D\n" - + "\014query_params\030\002 \001(\0132..google.cloud.dialo" - + "gflow.cx.v3.QueryParameters\022C\n\013query_inp" - + "ut\030\003 \001(\0132).google.cloud.dialogflow.cx.v3" - + ".QueryInputB\003\340A\002\022M\n\023output_audio_config\030" - + "\004 \001(\01320.google.cloud.dialogflow.cx.v3.Ou" - + "tputAudioConfig\"\216\003\n\024DetectIntentResponse" - + "\022\023\n\013response_id\030\001 \001(\t\022@\n\014query_result\030\002 " - + "\001(\0132*.google.cloud.dialogflow.cx.v3.Quer" - + "yResult\022\024\n\014output_audio\030\004 \001(\014\022M\n\023output_" - + "audio_config\030\005 \001(\01320.google.cloud.dialog" - + "flow.cx.v3.OutputAudioConfig\022W\n\rresponse" - + "_type\030\006 \001(\0162@.google.cloud.dialogflow.cx" - + ".v3.DetectIntentResponse.ResponseType\022\032\n" - + "\022allow_cancellation\030\007 \001(\010\"E\n\014ResponseTyp" - + "e\022\035\n\031RESPONSE_TYPE_UNSPECIFIED\020\000\022\013\n\007PART" - + "IAL\020\001\022\t\n\005FINAL\020\002\"\322\002\n\034StreamingDetectInte" - + "ntRequest\0227\n\007session\030\001 \001(\tB&\372A#\n!dialogf" - + "low.googleapis.com/Session\022D\n\014query_para" - + "ms\030\002 \001(\0132..google.cloud.dialogflow.cx.v3" - + ".QueryParameters\022C\n\013query_input\030\003 \001(\0132)." - + "google.cloud.dialogflow.cx.v3.QueryInput" - + "B\003\340A\002\022M\n\023output_audio_config\030\004 \001(\01320.goo" - + "gle.cloud.dialogflow.cx.v3.OutputAudioCo" - + "nfig\022\037\n\027enable_partial_response\030\005 \001(\010\"\333\001" - + "\n\035StreamingDetectIntentResponse\022W\n\022recog" - + "nition_result\030\001 \001(\01329.google.cloud.dialo" - + "gflow.cx.v3.StreamingRecognitionResultH\000" - + "\022U\n\026detect_intent_response\030\002 \001(\01323.googl" - + "e.cloud.dialogflow.cx.v3.DetectIntentRes" - + "ponseH\000B\n\n\010response\"\237\003\n\032StreamingRecogni" - + "tionResult\022[\n\014message_type\030\001 \001(\0162E.googl" - + "e.cloud.dialogflow.cx.v3.StreamingRecogn" - + "itionResult.MessageType\022\022\n\ntranscript\030\002 " - + "\001(\t\022\020\n\010is_final\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(" - + "\002\022\021\n\tstability\030\006 \001(\002\022G\n\020speech_word_info" - + "\030\007 \003(\0132-.google.cloud.dialogflow.cx.v3.S" - + "peechWordInfo\0224\n\021speech_end_offset\030\010 \001(\013" - + "2\031.google.protobuf.Duration\"X\n\013MessageTy" - + "pe\022\034\n\030MESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\nTRAN" - + "SCRIPT\020\001\022\033\n\027END_OF_SINGLE_UTTERANCE\020\002\"\204\004" - + "\n\017QueryParameters\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014" - + "geo_location\030\002 \001(\0132\023.google.type.LatLng\022" - + "N\n\024session_entity_types\030\003 \003(\01320.google.c" - + "loud.dialogflow.cx.v3.SessionEntityType\022" - + "(\n\007payload\030\004 \001(\0132\027.google.protobuf.Struc" - + "t\022+\n\nparameters\030\005 \001(\0132\027.google.protobuf." - + "Struct\0229\n\014current_page\030\006 \001(\tB#\372A \n\036dialo" - + "gflow.googleapis.com/Page\022\027\n\017disable_web" - + "hook\030\007 \001(\010\022$\n\034analyze_query_text_sentime" - + "nt\030\010 \001(\010\022[\n\017webhook_headers\030\n \003(\0132B.goog" - + "le.cloud.dialogflow.cx.v3.QueryParameter" - + "s.WebhookHeadersEntry\0325\n\023WebhookHeadersE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\333\002\n" - + "\nQueryInput\0228\n\004text\030\002 \001(\0132(.google.cloud" - + ".dialogflow.cx.v3.TextInputH\000\022<\n\006intent\030" - + "\003 \001(\0132*.google.cloud.dialogflow.cx.v3.In" - + "tentInputH\000\022:\n\005audio\030\005 \001(\0132).google.clou" - + "d.dialogflow.cx.v3.AudioInputH\000\022:\n\005event" - + "\030\006 \001(\0132).google.cloud.dialogflow.cx.v3.E" - + "ventInputH\000\0228\n\004dtmf\030\007 \001(\0132(.google.cloud" - + ".dialogflow.cx.v3.DtmfInputH\000\022\032\n\rlanguag" - + "e_code\030\004 \001(\tB\003\340A\002B\007\n\005input\"\347\005\n\013QueryResu" - + "lt\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent\030\013 \001" - + "(\tB%\372A\"\n dialogflow.googleapis.com/Inten" - + "tH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtrigger_eve" - + "nt\030\016 \001(\tH\000\022\025\n\rlanguage_code\030\002 \001(\t\022+\n\npar" - + "ameters\030\003 \001(\0132\027.google.protobuf.Struct\022I" - + "\n\021response_messages\030\004 \003(\0132..google.cloud" - + ".dialogflow.cx.v3.ResponseMessage\022,\n\020web" - + "hook_statuses\030\r \003(\0132\022.google.rpc.Status\022" - + "1\n\020webhook_payloads\030\006 \003(\0132\027.google.proto" - + "buf.Struct\0229\n\014current_page\030\007 \001(\0132#.googl" - + "e.cloud.dialogflow.cx.v3.Page\0229\n\006intent\030" - + "\010 \001(\0132%.google.cloud.dialogflow.cx.v3.In" - + "tentB\002\030\001\022\'\n\033intent_detection_confidence\030" - + "\t \001(\002B\002\030\001\0223\n\005match\030\017 \001(\0132$.google.cloud." - + "dialogflow.cx.v3.Match\0220\n\017diagnostic_inf" - + "o\030\n \001(\0132\027.google.protobuf.Struct\022Y\n\031sent" - + "iment_analysis_result\030\021 \001(\01326.google.clo" - + "ud.dialogflow.cx.v3.SentimentAnalysisRes" - + "ultB\007\n\005query\"\036\n\tTextInput\022\021\n\004text\030\001 \001(\tB" - + "\003\340A\002\"G\n\013IntentInput\0228\n\006intent\030\001 \001(\tB(\340A\002" - + "\372A\"\n dialogflow.googleapis.com/Intent\"a\n" - + "\nAudioInput\022D\n\006config\030\001 \001(\0132/.google.clo" - + "ud.dialogflow.cx.v3.InputAudioConfigB\003\340A" - + "\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005event\030" - + "\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001(\t\022\024\n\014fi" - + "nish_digit\030\002 \001(\t\"\361\002\n\005Match\0225\n\006intent\030\001 \001" - + "(\0132%.google.cloud.dialogflow.cx.v3.Inten" - + "t\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030\002 \001(\0132\027.g" - + "oogle.protobuf.Struct\022\026\n\016resolved_input\030" - + "\003 \001(\t\022B\n\nmatch_type\030\004 \001(\0162..google.cloud" - + ".dialogflow.cx.v3.Match.MatchType\022\022\n\ncon" - + "fidence\030\005 \001(\002\"\204\001\n\tMatchType\022\032\n\026MATCH_TYP" - + "E_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRECT_IN" - + "TENT\020\002\022\025\n\021PARAMETER_FILLING\020\003\022\014\n\010NO_MATC" - + "H\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"\333\001\n\022MatchIn" - + "tentRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372A#\n!di" - + "alogflow.googleapis.com/Session\022D\n\014query" - + "_params\030\002 \001(\0132..google.cloud.dialogflow." - + "cx.v3.QueryParameters\022C\n\013query_input\030\003 \001" - + "(\0132).google.cloud.dialogflow.cx.v3.Query" - + "InputB\003\340A\002\"\220\002\n\023MatchIntentResponse\022\016\n\004te" - + "xt\030\001 \001(\tH\000\022?\n\016trigger_intent\030\002 \001(\tB%\372A\"\n" - + " dialogflow.googleapis.com/IntentH\000\022\024\n\nt" - + "ranscript\030\003 \001(\tH\000\022\027\n\rtrigger_event\030\006 \001(\t" - + "H\000\0225\n\007matches\030\004 \003(\0132$.google.cloud.dialo" - + "gflow.cx.v3.Match\0229\n\014current_page\030\005 \001(\0132" - + "#.google.cloud.dialogflow.cx.v3.PageB\007\n\005" - + "query\"\353\001\n\024FulfillIntentRequest\022O\n\024match_" - + "intent_request\030\001 \001(\01321.google.cloud.dial" - + "ogflow.cx.v3.MatchIntentRequest\0223\n\005match" - + "\030\002 \001(\0132$.google.cloud.dialogflow.cx.v3.M" - + "atch\022M\n\023output_audio_config\030\003 \001(\01320.goog" + + ".proto\0325google/cloud/dialogflow/cx/v3/ad" + + "vanced_settings.proto\0320google/cloud/dial" + + "ogflow/cx/v3/audio_config.proto\032(google/" + + "cloud/dialogflow/cx/v3/flow.proto\032*googl" + + "e/cloud/dialogflow/cx/v3/intent.proto\032(g" + + "oogle/cloud/dialogflow/cx/v3/page.proto\032" + + "4google/cloud/dialogflow/cx/v3/response_" + + "message.proto\0327google/cloud/dialogflow/c" + + "x/v3/session_entity_type.proto\032\036google/p" + + "rotobuf/duration.proto\032\034google/protobuf/" + + "struct.proto\032\027google/rpc/status.proto\032\030g" + + "oogle/type/latlng.proto\032\027google/api/clie" + + "nt.proto\"\253\002\n\023DetectIntentRequest\022:\n\007sess" + + "ion\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis" + + ".com/Session\022D\n\014query_params\030\002 \001(\0132..goo" + + "gle.cloud.dialogflow.cx.v3.QueryParamete" + + "rs\022C\n\013query_input\030\003 \001(\0132).google.cloud.d" + + "ialogflow.cx.v3.QueryInputB\003\340A\002\022M\n\023outpu" + + "t_audio_config\030\004 \001(\01320.google.cloud.dial" + + "ogflow.cx.v3.OutputAudioConfig\"\216\003\n\024Detec" + + "tIntentResponse\022\023\n\013response_id\030\001 \001(\t\022@\n\014" + + "query_result\030\002 \001(\0132*.google.cloud.dialog" + + "flow.cx.v3.QueryResult\022\024\n\014output_audio\030\004" + + " \001(\014\022M\n\023output_audio_config\030\005 \001(\01320.goog" + "le.cloud.dialogflow.cx.v3.OutputAudioCon" - + "fig\"\323\001\n\025FulfillIntentResponse\022\023\n\013respons" - + "e_id\030\001 \001(\t\022@\n\014query_result\030\002 \001(\0132*.googl" - + "e.cloud.dialogflow.cx.v3.QueryResult\022\024\n\014" - + "output_audio\030\003 \001(\014\022M\n\023output_audio_confi" - + "g\030\004 \001(\01320.google.cloud.dialogflow.cx.v3." - + "OutputAudioConfig\";\n\027SentimentAnalysisRe" - + "sult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\0022\304" - + "\t\n\010Sessions\022\246\002\n\014DetectIntent\0222.google.cl" - + "oud.dialogflow.cx.v3.DetectIntentRequest" - + "\0323.google.cloud.dialogflow.cx.v3.DetectI" - + "ntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3/{session=pr" - + "ojects/*/locations/*/agents/*/sessions/*" - + "}:detectIntent:\001*ZY\"T/v3/{session=projec" - + "ts/*/locations/*/agents/*/environments/*" - + "/sessions/*}:detectIntent:\001*\022\230\001\n\025Streami" - + "ngDetectIntent\022;.google.cloud.dialogflow" - + ".cx.v3.StreamingDetectIntentRequest\032<.go" + + "fig\022W\n\rresponse_type\030\006 \001(\0162@.google.clou" + + "d.dialogflow.cx.v3.DetectIntentResponse." + + "ResponseType\022\032\n\022allow_cancellation\030\007 \001(\010" + + "\"E\n\014ResponseType\022\035\n\031RESPONSE_TYPE_UNSPEC" + + "IFIED\020\000\022\013\n\007PARTIAL\020\001\022\t\n\005FINAL\020\002\"\322\002\n\034Stre" + + "amingDetectIntentRequest\0227\n\007session\030\001 \001(" + + "\tB&\372A#\n!dialogflow.googleapis.com/Sessio" + + "n\022D\n\014query_params\030\002 \001(\0132..google.cloud.d" + + "ialogflow.cx.v3.QueryParameters\022C\n\013query" + + "_input\030\003 \001(\0132).google.cloud.dialogflow.c" + + "x.v3.QueryInputB\003\340A\002\022M\n\023output_audio_con" + + "fig\030\004 \001(\01320.google.cloud.dialogflow.cx.v" + + "3.OutputAudioConfig\022\037\n\027enable_partial_re" + + "sponse\030\005 \001(\010\"\333\001\n\035StreamingDetectIntentRe" + + "sponse\022W\n\022recognition_result\030\001 \001(\01329.goo" + + "gle.cloud.dialogflow.cx.v3.StreamingReco" + + "gnitionResultH\000\022U\n\026detect_intent_respons" + + "e\030\002 \001(\01323.google.cloud.dialogflow.cx.v3." + + "DetectIntentResponseH\000B\n\n\010response\"\266\003\n\032S" + + "treamingRecognitionResult\022[\n\014message_typ" + + "e\030\001 \001(\0162E.google.cloud.dialogflow.cx.v3." + + "StreamingRecognitionResult.MessageType\022\022" + + "\n\ntranscript\030\002 \001(\t\022\020\n\010is_final\030\003 \001(\010\022\022\n\n" + + "confidence\030\004 \001(\002\022\021\n\tstability\030\006 \001(\002\022G\n\020s" + + "peech_word_info\030\007 \003(\0132-.google.cloud.dia" + + "logflow.cx.v3.SpeechWordInfo\0224\n\021speech_e" + + "nd_offset\030\010 \001(\0132\031.google.protobuf.Durati" + + "on\022\025\n\rlanguage_code\030\n \001(\t\"X\n\013MessageType" + + "\022\034\n\030MESSAGE_TYPE_UNSPECIFIED\020\000\022\016\n\nTRANSC" + + "RIPT\020\001\022\033\n\027END_OF_SINGLE_UTTERANCE\020\002\"\303\004\n\017" + + "QueryParameters\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014ge" + + "o_location\030\002 \001(\0132\023.google.type.LatLng\022N\n" + + "\024session_entity_types\030\003 \003(\01320.google.clo" + + "ud.dialogflow.cx.v3.SessionEntityType\022(\n" + + "\007payload\030\004 \001(\0132\027.google.protobuf.Struct\022" + + "+\n\nparameters\030\005 \001(\0132\027.google.protobuf.St" + + "ruct\0229\n\014current_page\030\006 \001(\tB#\372A \n\036dialogf" + + "low.googleapis.com/Page\022\027\n\017disable_webho" + + "ok\030\007 \001(\010\022$\n\034analyze_query_text_sentiment" + + "\030\010 \001(\010\022[\n\017webhook_headers\030\n \003(\0132B.google" + + ".cloud.dialogflow.cx.v3.QueryParameters." + + "WebhookHeadersEntry\022=\n\rflow_versions\030\016 \003" + + "(\tB&\372A#\n!dialogflow.googleapis.com/Versi" + + "on\0325\n\023WebhookHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"\333\002\n\nQueryInput\0228\n\004text" + + "\030\002 \001(\0132(.google.cloud.dialogflow.cx.v3.T" + + "extInputH\000\022<\n\006intent\030\003 \001(\0132*.google.clou" + + "d.dialogflow.cx.v3.IntentInputH\000\022:\n\005audi" + + "o\030\005 \001(\0132).google.cloud.dialogflow.cx.v3." + + "AudioInputH\000\022:\n\005event\030\006 \001(\0132).google.clo" + + "ud.dialogflow.cx.v3.EventInputH\000\0228\n\004dtmf" + + "\030\007 \001(\0132(.google.cloud.dialogflow.cx.v3.D" + + "tmfInputH\000\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\002B\007" + + "\n\005input\"\347\005\n\013QueryResult\022\016\n\004text\030\001 \001(\tH\000\022" + + "?\n\016trigger_intent\030\013 \001(\tB%\372A\"\n dialogflow" + + ".googleapis.com/IntentH\000\022\024\n\ntranscript\030\014" + + " \001(\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\022\025\n\rlangu" + + "age_code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\0132\027.goo" + + "gle.protobuf.Struct\022I\n\021response_messages" + + "\030\004 \003(\0132..google.cloud.dialogflow.cx.v3.R" + + "esponseMessage\022,\n\020webhook_statuses\030\r \003(\013" + + "2\022.google.rpc.Status\0221\n\020webhook_payloads" + + "\030\006 \003(\0132\027.google.protobuf.Struct\0229\n\014curre" + + "nt_page\030\007 \001(\0132#.google.cloud.dialogflow." + + "cx.v3.Page\0229\n\006intent\030\010 \001(\0132%.google.clou" + + "d.dialogflow.cx.v3.IntentB\002\030\001\022\'\n\033intent_" + + "detection_confidence\030\t \001(\002B\002\030\001\0223\n\005match\030" + + "\017 \001(\0132$.google.cloud.dialogflow.cx.v3.Ma" + + "tch\0220\n\017diagnostic_info\030\n \001(\0132\027.google.pr" + + "otobuf.Struct\022Y\n\031sentiment_analysis_resu" + + "lt\030\021 \001(\01326.google.cloud.dialogflow.cx.v3" + + ".SentimentAnalysisResultB\007\n\005query\"\036\n\tTex" + + "tInput\022\021\n\004text\030\001 \001(\tB\003\340A\002\"G\n\013IntentInput" + + "\0228\n\006intent\030\001 \001(\tB(\340A\002\372A\"\n dialogflow.goo" + + "gleapis.com/Intent\"a\n\nAudioInput\022D\n\006conf" + + "ig\030\001 \001(\0132/.google.cloud.dialogflow.cx.v3" + + ".InputAudioConfigB\003\340A\002\022\r\n\005audio\030\002 \001(\014\"\033\n" + + "\nEventInput\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022" + + "\016\n\006digits\030\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"\361\002" + + "\n\005Match\0225\n\006intent\030\001 \001(\0132%.google.cloud.d" + + "ialogflow.cx.v3.Intent\022\r\n\005event\030\006 \001(\t\022+\n" + + "\nparameters\030\002 \001(\0132\027.google.protobuf.Stru" + + "ct\022\026\n\016resolved_input\030\003 \001(\t\022B\n\nmatch_type" + + "\030\004 \001(\0162..google.cloud.dialogflow.cx.v3.M" + + "atch.MatchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tM" + + "atchType\022\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006" + + "INTENT\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER" + + "_FILLING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t" + + "\n\005EVENT\020\006\"\333\001\n\022MatchIntentRequest\022:\n\007sess" + + "ion\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis" + + ".com/Session\022D\n\014query_params\030\002 \001(\0132..goo" + + "gle.cloud.dialogflow.cx.v3.QueryParamete" + + "rs\022C\n\013query_input\030\003 \001(\0132).google.cloud.d" + + "ialogflow.cx.v3.QueryInputB\003\340A\002\"\220\002\n\023Matc" + + "hIntentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigg" + + "er_intent\030\002 \001(\tB%\372A\"\n dialogflow.googlea" + + "pis.com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027" + + "\n\rtrigger_event\030\006 \001(\tH\000\0225\n\007matches\030\004 \003(\013" + + "2$.google.cloud.dialogflow.cx.v3.Match\0229" + + "\n\014current_page\030\005 \001(\0132#.google.cloud.dial" + + "ogflow.cx.v3.PageB\007\n\005query\"\353\001\n\024FulfillIn" + + "tentRequest\022O\n\024match_intent_request\030\001 \001(" + + "\01321.google.cloud.dialogflow.cx.v3.MatchI" + + "ntentRequest\0223\n\005match\030\002 \001(\0132$.google.clo" + + "ud.dialogflow.cx.v3.Match\022M\n\023output_audi" + + "o_config\030\003 \001(\01320.google.cloud.dialogflow" + + ".cx.v3.OutputAudioConfig\"\323\001\n\025FulfillInte" + + "ntResponse\022\023\n\013response_id\030\001 \001(\t\022@\n\014query" + + "_result\030\002 \001(\0132*.google.cloud.dialogflow." + + "cx.v3.QueryResult\022\024\n\014output_audio\030\003 \001(\014\022" + + "M\n\023output_audio_config\030\004 \001(\01320.google.cl" + + "oud.dialogflow.cx.v3.OutputAudioConfig\";" + + "\n\027SentimentAnalysisResult\022\r\n\005score\030\001 \001(\002" + + "\022\021\n\tmagnitude\030\002 \001(\0022\304\t\n\010Sessions\022\246\002\n\014Det" + + "ectIntent\0222.google.cloud.dialogflow.cx.v" + + "3.DetectIntentRequest\0323.google.cloud.dia" + + "logflow.cx.v3.DetectIntentResponse\"\254\001\202\323\344" + + "\223\002\245\001\"E/v3/{session=projects/*/locations/" + + "*/agents/*/sessions/*}:detectIntent:\001*ZY" + + "\"T/v3/{session=projects/*/locations/*/ag" + + "ents/*/environments/*/sessions/*}:detect" + + "Intent:\001*\022\230\001\n\025StreamingDetectIntent\022;.go" + "ogle.cloud.dialogflow.cx.v3.StreamingDet" - + "ectIntentResponse\"\000(\0010\001\022\241\002\n\013MatchIntent\022" - + "1.google.cloud.dialogflow.cx.v3.MatchInt" - + "entRequest\0322.google.cloud.dialogflow.cx." - + "v3.MatchIntentResponse\"\252\001\202\323\344\223\002\243\001\"D/v3/{s" - + "ession=projects/*/locations/*/agents/*/s" - + "essions/*}:matchIntent:\001*ZX\"S/v3/{sessio" - + "n=projects/*/locations/*/agents/*/enviro" - + "nments/*/sessions/*}:matchIntent:\001*\022\325\002\n\r" - + "FulfillIntent\0223.google.cloud.dialogflow." - + "cx.v3.FulfillIntentRequest\0324.google.clou" - + "d.dialogflow.cx.v3.FulfillIntentResponse" - + "\"\330\001\202\323\344\223\002\321\001\"[/v3/{match_intent_request.se" - + "ssion=projects/*/locations/*/agents/*/se" - + "ssions/*}:fulfillIntent:\001*Zo\"j/v3/{match" - + "_intent_request.session=projects/*/locat" - + "ions/*/agents/*/environments/*/sessions/" - + "*}:fulfillIntent:\001*\032x\312A\031dialogflow.googl" - + "eapis.com\322AYhttps://www.googleapis.com/a" - + "uth/cloud-platform,https://www.googleapi" - + "s.com/auth/dialogflowB\364\002\n!com.google.clo" - + "ud.dialogflow.cx.v3B\014SessionProtoP\001Z?goo" - + "gle.golang.org/genproto/googleapis/cloud" - + "/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google.Cl" - + "oud.Dialogflow.Cx.V3\352A\324\001\n!dialogflow.goo" - + "gleapis.com/Session\022Iprojects/{project}/" - + "locations/{location}/agents/{agent}/sess" - + "ions/{session}\022dprojects/{project}/locat" - + "ions/{location}/agents/{agent}/environme" - + "nts/{environment}/sessions/{session}b\006pr" - + "oto3" + + "ectIntentRequest\032<.google.cloud.dialogfl" + + "ow.cx.v3.StreamingDetectIntentResponse\"\000" + + "(\0010\001\022\241\002\n\013MatchIntent\0221.google.cloud.dial" + + "ogflow.cx.v3.MatchIntentRequest\0322.google" + + ".cloud.dialogflow.cx.v3.MatchIntentRespo" + + "nse\"\252\001\202\323\344\223\002\243\001\"D/v3/{session=projects/*/l" + + "ocations/*/agents/*/sessions/*}:matchInt" + + "ent:\001*ZX\"S/v3/{session=projects/*/locati" + + "ons/*/agents/*/environments/*/sessions/*" + + "}:matchIntent:\001*\022\325\002\n\rFulfillIntent\0223.goo" + + "gle.cloud.dialogflow.cx.v3.FulfillIntent" + + "Request\0324.google.cloud.dialogflow.cx.v3." + + "FulfillIntentResponse\"\330\001\202\323\344\223\002\321\001\"[/v3/{ma" + + "tch_intent_request.session=projects/*/lo" + + "cations/*/agents/*/sessions/*}:fulfillIn" + + "tent:\001*Zo\"j/v3/{match_intent_request.ses" + + "sion=projects/*/locations/*/agents/*/env" + + "ironments/*/sessions/*}:fulfillIntent:\001*" + + "\032x\312A\031dialogflow.googleapis.com\322AYhttps:/" + + "/www.googleapis.com/auth/cloud-platform," + + "https://www.googleapis.com/auth/dialogfl" + + "owB\364\002\n!com.google.cloud.dialogflow.cx.v3" + + "B\014SessionProtoP\001Z?google.golang.org/genp" + + "roto/googleapis/cloud/dialogflow/cx/v3;c" + + "x\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V" + + "3\352A\324\001\n!dialogflow.googleapis.com/Session" + + "\022Iprojects/{project}/locations/{location" + + "}/agents/{agent}/sessions/{session}\022dpro" + + "jects/{project}/locations/{location}/age" + + "nts/{agent}/environments/{environment}/s" + + "essions/{session}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -304,6 +307,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(), @@ -366,6 +370,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Stability", "SpeechWordInfo", "SpeechEndOffset", + "LanguageCode", }); internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_descriptor = getDescriptor().getMessageTypes().get(5); @@ -382,6 +387,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisableWebhook", "AnalyzeQueryTextSentiment", "WebhookHeaders", + "FlowVersions", }); internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_WebhookHeadersEntry_descriptor = internal_static_google_cloud_dialogflow_cx_v3_QueryParameters_descriptor @@ -531,6 +537,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java index f2325fb66..ce8e85541 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java @@ -60,6 +60,7 @@ private StreamingRecognitionResult() { messageType_ = 0; transcript_ = ""; speechWordInfo_ = java.util.Collections.emptyList(); + languageCode_ = ""; } @java.lang.Override @@ -147,6 +148,13 @@ private StreamingRecognitionResult( speechEndOffset_ = subBuilder.buildPartial(); } + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; break; } default: @@ -653,6 +661,55 @@ public com.google.protobuf.DurationOrBuilder getSpeechEndOffsetOrBuilder() { return getSpeechEndOffset(); } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 10; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Detected language code for the transcript.
+   * 
+ * + * string language_code = 10; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Detected language code for the transcript.
+   * 
+ * + * string language_code = 10; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -691,6 +748,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (speechEndOffset_ != null) { output.writeMessage(8, getSpeechEndOffset()); } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, languageCode_); + } unknownFields.writeTo(output); } @@ -724,6 +784,9 @@ public int getSerializedSize() { if (speechEndOffset_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSpeechEndOffset()); } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, languageCode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -752,6 +815,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpeechEndOffset()) { if (!getSpeechEndOffset().equals(other.getSpeechEndOffset())) return false; } + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -781,6 +845,8 @@ public int hashCode() { hash = (37 * hash) + SPEECH_END_OFFSET_FIELD_NUMBER; hash = (53 * hash) + getSpeechEndOffset().hashCode(); } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -970,6 +1036,8 @@ public Builder clear() { speechEndOffset_ = null; speechEndOffsetBuilder_ = null; } + languageCode_ = ""; + return this; } @@ -1018,6 +1086,7 @@ public com.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult buildPartial } else { result.speechEndOffset_ = speechEndOffsetBuilder_.build(); } + result.languageCode_ = languageCode_; onBuilt(); return result; } @@ -1115,6 +1184,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.StreamingRecognitionR if (other.hasSpeechEndOffset()) { mergeSpeechEndOffset(other.getSpeechEndOffset()); } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2157,6 +2230,112 @@ public com.google.protobuf.DurationOrBuilder getSpeechEndOffsetOrBuilder() { return speechEndOffsetBuilder_; } + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Detected language code for the transcript.
+     * 
+ * + * string language_code = 10; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Detected language code for the transcript.
+     * 
+ * + * string language_code = 10; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Detected language code for the transcript.
+     * 
+ * + * string language_code = 10; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Detected language code for the transcript.
+     * 
+ * + * string language_code = 10; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Detected language code for the transcript.
+     * 
+ * + * string language_code = 10; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResultOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResultOrBuilder.java index 4d61de878..a7d740fb7 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResultOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResultOrBuilder.java @@ -232,4 +232,29 @@ public interface StreamingRecognitionResultOrBuilder * .google.protobuf.Duration speech_end_offset = 8; */ com.google.protobuf.DurationOrBuilder getSpeechEndOffsetOrBuilder(); + + /** + * + * + *
+   * Detected language code for the transcript.
+   * 
+ * + * string language_code = 10; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Detected language code for the transcript.
+   * 
+ * + * string language_code = 10; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionProto.java index b1b7a3ced..b08651d53 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionProto.java @@ -76,8 +76,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\022\035google.cloud.dialogflow.cx.v3\032\034go" + "ogle/api/annotations.proto\032\027google/api/c" + "lient.proto\032\037google/api/field_behavior.p" - + "roto\032\031google/api/resource.proto\032(google/" - + "cloud/dialogflow/cx/v3/flow.proto\032#googl" + + "roto\032\031google/api/resource.proto\032/google/" + + "cloud/dialogflow/cx/v3/entity_type.proto" + + "\032(google/cloud/dialogflow/cx/v3/flow.pro" + + "to\032*google/cloud/dialogflow/cx/v3/intent" + + ".proto\032(google/cloud/dialogflow/cx/v3/pa" + + "ge.proto\032:google/cloud/dialogflow/cx/v3/" + + "transition_route_group.proto\032+google/clo" + + "ud/dialogflow/cx/v3/webhook.proto\032#googl" + "e/longrunning/operations.proto\032\033google/p" + "rotobuf/empty.proto\032 google/protobuf/fie" + "ld_mask.proto\032\037google/protobuf/timestamp" @@ -163,7 +169,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.EntityTypeProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.WebhookProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -257,7 +268,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.EntityTypeProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.WebhookProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/advanced_settings.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/advanced_settings.proto new file mode 100644 index 000000000..f6b0b1ac8 --- /dev/null +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -0,0 +1,52 @@ +// Copyright 2021 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.v3; + +import "google/api/field_behavior.proto"; +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "AdvancedSettingsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. +// Settings exposed at lower level overrides the settings exposed at higher +// level. +// +// Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. +message AdvancedSettings { + // Define behaviors on logging. + message LoggingSettings { + // If true, StackDriver logging is currently enabled. + bool enable_stackdriver_logging = 2; + + // If true, DF Interaction logging is currently enabled. + bool enable_interaction_logging = 3; + } + + // Settings for logging. + // Settings for Dialogflow History, Contact Center messages, StackDriver logs, + // and speech logging. + // Exposed at the following levels: + // - Agent level. + LoggingSettings logging_settings = 6; +} diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 2bf1c8f7b..e3fe7365e 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/flow.proto"; import "google/cloud/dialogflow/cx/v3/security_settings.proto"; import "google/longrunning/operations.proto"; @@ -224,11 +225,17 @@ message Agent { }]; // Indicates if stackdriver logging is enabled for the agent. - bool enable_stackdriver_logging = 18; + // Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] + // instead. + bool enable_stackdriver_logging = 18 [deprecated = true]; // Indicates if automatic spell correction is enabled in detect intent // requests. bool enable_spell_correction = 20; + + // Hierarchical advanced settings for this agent. The settings exposed at the + // lower level overrides the settings exposed at the higher level. + AdvancedSettings advanced_settings = 22; } // The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents]. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index e444bbe6b..dc9c911b9 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -29,6 +29,31 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3"; 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 @@ -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. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto index 8f03a4f82..e65a4a4e1 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/experiment.proto @@ -246,6 +246,9 @@ message Experiment { // The experiment is done. DONE = 3; + + // The experiment with auto-rollout enabled has failed. + ROLLOUT_FAILED = 4; } // The name of the experiment. @@ -261,14 +264,28 @@ message Experiment { string description = 3; // The current state of the experiment. - // Transition triggered by Expriments.StartExperiment: PENDING->RUNNING. - // Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or - // RUNNING->CANCELLED. + // Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. + // Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or + // RUNNING->DONE. State state = 4; // The definition of the experiment. Definition definition = 5; + // The configuration for auto rollout. If set, there should be exactly two + // variants in the experiment (control variant being the default version of + // the flow), the traffic allocation for the non-control variant will + // gradually increase to 100% when conditions are met, and eventually + // replace the control variant to become the default version of the flow. + RolloutConfig rollout_config = 14; + + // State of the auto rollout process. + RolloutState rollout_state = 15; + + // The reason why rollout has failed. Should only be set when state is + // ROLLOUT_FAILED. + string rollout_failure_reason = 16; + // Inference result of the experiment. Result result = 6; @@ -327,6 +344,53 @@ message VariantsHistory { google.protobuf.Timestamp update_time = 2; } +// The configuration for auto rollout. +message RolloutConfig { + // A single rollout step with specified traffic allocation. + message RolloutStep { + // The name of the rollout step; + string display_name = 1; + + // The percentage of traffic allocated to the flow version of this rollout + // step. (0%, 100%]. + int32 traffic_percent = 2; + + // The minimum time that this step should last. Should be longer than 1 + // hour. If not set, the default minimum duration for each step will be 1 + // hour. + google.protobuf.Duration min_duration = 3; + } + + // Steps to roll out a flow version. Steps should be sorted by percentage in + // ascending order. + repeated RolloutStep rollout_steps = 1; + + // The conditions that are used to evaluate the success of a rollout + // step. If not specified, all rollout steps will proceed to the next one + // unless failure conditions are met. E.g. "containment_rate > 60% AND + // callback_rate < 20%". See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + string rollout_condition = 2; + + // The conditions that are used to evaluate the failure of a rollout + // step. If not specified, no rollout steps will fail. E.g. "containment_rate + // < 10% OR average_turn_count < 3". See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + string failure_condition = 3; +} + +// State of the auto-rollout process. +message RolloutState { + // Display name of the current auto rollout step. + string step = 1; + + // Index of the current step in the auto rollout steps list. + int32 step_index = 3; + + // Start time of the current step. + google.protobuf.Timestamp start_time = 2; +} + // The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. message ListExperimentsRequest { // Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto index da2ebc898..6ac6ddbeb 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/flow.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; import "google/cloud/dialogflow/cx/v3/validation_message.proto"; import "google/longrunning/operations.proto"; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto index c8d48b3ac..a952b6c27 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/response_message.proto"; import "google/protobuf/struct.proto"; import "google/api/annotations.proto"; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto index 47a91bb7b..ae1718994 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/intent.proto @@ -20,6 +20,7 @@ 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"; import "google/protobuf/timestamp.proto"; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto index 182b64ae3..32a3d56f4 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/page.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/fulfillment.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto index 5fce81492..40e11111e 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/security_settings.proto @@ -31,6 +31,16 @@ option java_multiple_files = true; option java_outer_classname = "SecuritySettingsProto"; option java_package = "com.google.cloud.dialogflow.cx.v3"; 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 { @@ -173,6 +183,14 @@ message SecuritySettings { pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}" }; + // Settings for exporting conversations to + // [Insights](https://cloud.google.com/dialogflow/priv/docs/insights). + message InsightsExportSettings { + // If enabled, we will automatically exports + // conversations to Insights and Insights runs its analyzers. + bool enable_insights_export = 1; + } + // Defines how we redact data. enum RedactionStrategy { // Do not redact. @@ -220,17 +238,37 @@ message SecuritySettings { // logging. RedactionScope redaction_scope = 4; - // DLP inspect template name. Use this template to define inspect base - // settings. + // [DLP](https://cloud.google.com/dlp/docs) 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//inspectTemplates/