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

Commit 68c3471

Browse files
feat: added support for comparing between versions docs: clarified security settings API reference (#347)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 407624272 Source-Link: googleapis/googleapis@eb773f2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e69f86b5bbc2ed777a5d97b65c080c4645ea02b8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTY5Zjg2YjViYmMyZWQ3NzdhNWQ5N2I2NWMwODBjNDY0NWVhMDJiOCJ9
1 parent 7084ed3 commit 68c3471

File tree

46 files changed

+11639
-176
lines changed

Some content is hidden

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

46 files changed

+11639
-176
lines changed

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClient.java

+494
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
/*
2+
* Copyright 2021 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.dialogflow.cx.v3;
18+
19+
import static com.google.cloud.dialogflow.cx.v3.ChangelogsClient.ListChangelogsPagedResponse;
20+
21+
import com.google.api.core.ApiFunction;
22+
import com.google.api.core.BetaApi;
23+
import com.google.api.gax.core.GoogleCredentialsProvider;
24+
import com.google.api.gax.core.InstantiatingExecutorProvider;
25+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
26+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
27+
import com.google.api.gax.rpc.ClientContext;
28+
import com.google.api.gax.rpc.ClientSettings;
29+
import com.google.api.gax.rpc.PagedCallSettings;
30+
import com.google.api.gax.rpc.TransportChannelProvider;
31+
import com.google.api.gax.rpc.UnaryCallSettings;
32+
import com.google.cloud.dialogflow.cx.v3.stub.ChangelogsStubSettings;
33+
import java.io.IOException;
34+
import java.util.List;
35+
import javax.annotation.Generated;
36+
37+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
38+
/**
39+
* Settings class to configure an instance of {@link ChangelogsClient}.
40+
*
41+
* <p>The default instance has everything set to sensible defaults:
42+
*
43+
* <ul>
44+
* <li>The default service address (dialogflow.googleapis.com) and default port (443) are used.
45+
* <li>Credentials are acquired automatically through Application Default Credentials.
46+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
47+
* </ul>
48+
*
49+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
50+
* build() is called, the tree of builders is called to create the complete settings object.
51+
*
52+
* <p>For example, to set the total timeout of getChangelog to 30 seconds:
53+
*
54+
* <pre>{@code
55+
* ChangelogsSettings.Builder changelogsSettingsBuilder = ChangelogsSettings.newBuilder();
56+
* changelogsSettingsBuilder
57+
* .getChangelogSettings()
58+
* .setRetrySettings(
59+
* changelogsSettingsBuilder
60+
* .getChangelogSettings()
61+
* .getRetrySettings()
62+
* .toBuilder()
63+
* .setTotalTimeout(Duration.ofSeconds(30))
64+
* .build());
65+
* ChangelogsSettings changelogsSettings = changelogsSettingsBuilder.build();
66+
* }</pre>
67+
*/
68+
@Generated("by gapic-generator-java")
69+
public class ChangelogsSettings extends ClientSettings<ChangelogsSettings> {
70+
71+
/** Returns the object with the settings used for calls to listChangelogs. */
72+
public PagedCallSettings<
73+
ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
74+
listChangelogsSettings() {
75+
return ((ChangelogsStubSettings) getStubSettings()).listChangelogsSettings();
76+
}
77+
78+
/** Returns the object with the settings used for calls to getChangelog. */
79+
public UnaryCallSettings<GetChangelogRequest, Changelog> getChangelogSettings() {
80+
return ((ChangelogsStubSettings) getStubSettings()).getChangelogSettings();
81+
}
82+
83+
public static final ChangelogsSettings create(ChangelogsStubSettings stub) throws IOException {
84+
return new ChangelogsSettings.Builder(stub.toBuilder()).build();
85+
}
86+
87+
/** Returns a builder for the default ExecutorProvider for this service. */
88+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
89+
return ChangelogsStubSettings.defaultExecutorProviderBuilder();
90+
}
91+
92+
/** Returns the default service endpoint. */
93+
public static String getDefaultEndpoint() {
94+
return ChangelogsStubSettings.getDefaultEndpoint();
95+
}
96+
97+
/** Returns the default service scopes. */
98+
public static List<String> getDefaultServiceScopes() {
99+
return ChangelogsStubSettings.getDefaultServiceScopes();
100+
}
101+
102+
/** Returns a builder for the default credentials for this service. */
103+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
104+
return ChangelogsStubSettings.defaultCredentialsProviderBuilder();
105+
}
106+
107+
/** Returns a builder for the default ChannelProvider for this service. */
108+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
109+
return ChangelogsStubSettings.defaultGrpcTransportProviderBuilder();
110+
}
111+
112+
public static TransportChannelProvider defaultTransportChannelProvider() {
113+
return ChangelogsStubSettings.defaultTransportChannelProvider();
114+
}
115+
116+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
117+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
118+
return ChangelogsStubSettings.defaultApiClientHeaderProviderBuilder();
119+
}
120+
121+
/** Returns a new builder for this class. */
122+
public static Builder newBuilder() {
123+
return Builder.createDefault();
124+
}
125+
126+
/** Returns a new builder for this class. */
127+
public static Builder newBuilder(ClientContext clientContext) {
128+
return new Builder(clientContext);
129+
}
130+
131+
/** Returns a builder containing all the values of this settings class. */
132+
public Builder toBuilder() {
133+
return new Builder(this);
134+
}
135+
136+
protected ChangelogsSettings(Builder settingsBuilder) throws IOException {
137+
super(settingsBuilder);
138+
}
139+
140+
/** Builder for ChangelogsSettings. */
141+
public static class Builder extends ClientSettings.Builder<ChangelogsSettings, Builder> {
142+
143+
protected Builder() throws IOException {
144+
this(((ClientContext) null));
145+
}
146+
147+
protected Builder(ClientContext clientContext) {
148+
super(ChangelogsStubSettings.newBuilder(clientContext));
149+
}
150+
151+
protected Builder(ChangelogsSettings settings) {
152+
super(settings.getStubSettings().toBuilder());
153+
}
154+
155+
protected Builder(ChangelogsStubSettings.Builder stubSettings) {
156+
super(stubSettings);
157+
}
158+
159+
private static Builder createDefault() {
160+
return new Builder(ChangelogsStubSettings.newBuilder());
161+
}
162+
163+
public ChangelogsStubSettings.Builder getStubSettingsBuilder() {
164+
return ((ChangelogsStubSettings.Builder) getStubSettings());
165+
}
166+
167+
/**
168+
* Applies the given settings updater function to all of the unary API methods in this service.
169+
*
170+
* <p>Note: This method does not support applying settings to streaming methods.
171+
*/
172+
public Builder applyToAllUnaryMethods(
173+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
174+
super.applyToAllUnaryMethods(
175+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
176+
return this;
177+
}
178+
179+
/** Returns the builder for the settings used for calls to listChangelogs. */
180+
public PagedCallSettings.Builder<
181+
ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
182+
listChangelogsSettings() {
183+
return getStubSettingsBuilder().listChangelogsSettings();
184+
}
185+
186+
/** Returns the builder for the settings used for calls to getChangelog. */
187+
public UnaryCallSettings.Builder<GetChangelogRequest, Changelog> getChangelogSettings() {
188+
return getStubSettingsBuilder().getChangelogSettings();
189+
}
190+
191+
@Override
192+
public ChangelogsSettings build() throws IOException {
193+
return new ChangelogsSettings(this);
194+
}
195+
}
196+
}

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json

+15
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@
4141
}
4242
}
4343
},
44+
"Changelogs": {
45+
"clients": {
46+
"grpc": {
47+
"libraryClient": "ChangelogsClient",
48+
"rpcs": {
49+
"GetChangelog": {
50+
"methods": ["getChangelog", "getChangelog", "getChangelog", "getChangelogCallable"]
51+
},
52+
"ListChangelogs": {
53+
"methods": ["listChangelogs", "listChangelogs", "listChangelogs", "listChangelogsPagedCallable", "listChangelogsCallable"]
54+
}
55+
}
56+
}
57+
}
58+
},
4459
"Deployments": {
4560
"clients": {
4661
"grpc": {

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/package-info.java

+14
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@
3232
* }
3333
* }</pre>
3434
*
35+
* <p>======================= ChangelogsClient =======================
36+
*
37+
* <p>Service Description: Service for managing
38+
* [Changelogs][google.cloud.dialogflow.cx.v3.Changelog].
39+
*
40+
* <p>Sample for ChangelogsClient:
41+
*
42+
* <pre>{@code
43+
* try (ChangelogsClient changelogsClient = ChangelogsClient.create()) {
44+
* ChangelogName name = ChangelogName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CHANGELOG]");
45+
* Changelog response = changelogsClient.getChangelog(name);
46+
* }
47+
* }</pre>
48+
*
3549
* <p>======================= DeploymentsClient =======================
3650
*
3751
* <p>Service Description: Service for managing
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright 2021 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.dialogflow.cx.v3.stub;
18+
19+
import static com.google.cloud.dialogflow.cx.v3.ChangelogsClient.ListChangelogsPagedResponse;
20+
21+
import com.google.api.gax.core.BackgroundResource;
22+
import com.google.api.gax.rpc.UnaryCallable;
23+
import com.google.cloud.dialogflow.cx.v3.Changelog;
24+
import com.google.cloud.dialogflow.cx.v3.GetChangelogRequest;
25+
import com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest;
26+
import com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse;
27+
import javax.annotation.Generated;
28+
29+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
30+
/**
31+
* Base stub class for the Changelogs service API.
32+
*
33+
* <p>This class is for advanced usage and reflects the underlying API directly.
34+
*/
35+
@Generated("by gapic-generator-java")
36+
public abstract class ChangelogsStub implements BackgroundResource {
37+
38+
public UnaryCallable<ListChangelogsRequest, ListChangelogsPagedResponse>
39+
listChangelogsPagedCallable() {
40+
throw new UnsupportedOperationException("Not implemented: listChangelogsPagedCallable()");
41+
}
42+
43+
public UnaryCallable<ListChangelogsRequest, ListChangelogsResponse> listChangelogsCallable() {
44+
throw new UnsupportedOperationException("Not implemented: listChangelogsCallable()");
45+
}
46+
47+
public UnaryCallable<GetChangelogRequest, Changelog> getChangelogCallable() {
48+
throw new UnsupportedOperationException("Not implemented: getChangelogCallable()");
49+
}
50+
51+
@Override
52+
public abstract void close();
53+
}

0 commit comments

Comments
 (0)