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

feat: added support for DLP templates; expose Locations service to get/list avaliable locations of Dialogflow products #277

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1040,14 +1039,7 @@ public static ApiFuture<ListAgentsPagedResponse> createAsync(
ApiFuture<ListAgentsPage> futurePage =
ListAgentsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListAgentsPage, ListAgentsPagedResponse>() {
@Override
public ListAgentsPagedResponse apply(ListAgentsPage input) {
return new ListAgentsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListAgentsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListAgentsPagedResponse(ListAgentsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -764,12 +763,7 @@ public static ApiFuture<ListEntityTypesPagedResponse> createAsync(
ListEntityTypesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListEntityTypesPage, ListEntityTypesPagedResponse>() {
@Override
public ListEntityTypesPagedResponse apply(ListEntityTypesPage input) {
return new ListEntityTypesPagedResponse(input);
}
},
input -> new ListEntityTypesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1223,12 +1222,7 @@ public static ApiFuture<ListEnvironmentsPagedResponse> createAsync(
ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListEnvironmentsPage, ListEnvironmentsPagedResponse>() {
@Override
public ListEnvironmentsPagedResponse apply(ListEnvironmentsPage input) {
return new ListEnvironmentsPagedResponse(input);
}
},
input -> new ListEnvironmentsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -1306,12 +1300,7 @@ public static ApiFuture<LookupEnvironmentHistoryPagedResponse> createAsync(
LookupEnvironmentHistoryPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<LookupEnvironmentHistoryPage, LookupEnvironmentHistoryPagedResponse>() {
@Override
public LookupEnvironmentHistoryPagedResponse apply(LookupEnvironmentHistoryPage input) {
return new LookupEnvironmentHistoryPagedResponse(input);
}
},
input -> new LookupEnvironmentHistoryPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -1398,13 +1387,7 @@ public static ApiFuture<ListContinuousTestResultsPagedResponse> createAsync(
ListContinuousTestResultsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListContinuousTestResultsPage, ListContinuousTestResultsPagedResponse>() {
@Override
public ListContinuousTestResultsPagedResponse apply(
ListContinuousTestResultsPage input) {
return new ListContinuousTestResultsPagedResponse(input);
}
},
input -> new ListContinuousTestResultsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -963,12 +962,7 @@ public static ApiFuture<ListExperimentsPagedResponse> createAsync(
ListExperimentsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListExperimentsPage, ListExperimentsPagedResponse>() {
@Override
public ListExperimentsPagedResponse apply(ListExperimentsPage input) {
return new ListExperimentsPagedResponse(input);
}
},
input -> new ListExperimentsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1174,14 +1173,7 @@ public static ApiFuture<ListFlowsPagedResponse> createAsync(
ApiFuture<ListFlowsPage> futurePage =
ListFlowsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListFlowsPage, ListFlowsPagedResponse>() {
@Override
public ListFlowsPagedResponse apply(ListFlowsPage input) {
return new ListFlowsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListFlowsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListFlowsPagedResponse(ListFlowsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -725,14 +724,7 @@ public static ApiFuture<ListIntentsPagedResponse> createAsync(
ApiFuture<ListIntentsPage> futurePage =
ListIntentsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListIntentsPage, ListIntentsPagedResponse>() {
@Override
public ListIntentsPagedResponse apply(ListIntentsPage input) {
return new ListIntentsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListIntentsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListIntentsPagedResponse(ListIntentsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -734,14 +733,7 @@ public static ApiFuture<ListPagesPagedResponse> createAsync(
ApiFuture<ListPagesPage> futurePage =
ListPagesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListPagesPage, ListPagesPagedResponse>() {
@Override
public ListPagesPagedResponse apply(ListPagesPage input) {
return new ListPagesPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListPagesPagedResponse(input), MoreExecutors.directExecutor());
}

private ListPagesPagedResponse(ListPagesPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -781,12 +780,7 @@ public static ApiFuture<ListSecuritySettingsPagedResponse> createAsync(
ListSecuritySettingsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListSecuritySettingsPage, ListSecuritySettingsPagedResponse>() {
@Override
public ListSecuritySettingsPagedResponse apply(ListSecuritySettingsPage input) {
return new ListSecuritySettingsPagedResponse(input);
}
},
input -> new ListSecuritySettingsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -808,12 +807,7 @@ public static ApiFuture<ListSessionEntityTypesPagedResponse> createAsync(
ListSessionEntityTypesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListSessionEntityTypesPage, ListSessionEntityTypesPagedResponse>() {
@Override
public ListSessionEntityTypesPagedResponse apply(ListSessionEntityTypesPage input) {
return new ListSessionEntityTypesPagedResponse(input);
}
},
input -> new ListSessionEntityTypesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Loading