Skip to content

Commit 36f5b3c

Browse files
docs: [servicemanagement] update docs to existing services (#9583)
* docs: update docs to existing services PiperOrigin-RevId: 543515380 Source-Link: googleapis/googleapis@16df595 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d059689d626da251efa3d5e1e1c4d21c9299c02c Copy-Tag: eyJwIjoiamF2YS1zZXJ2aWNlLW1hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6ImQwNTk2ODlkNjI2ZGEyNTFlZmEzZDVlMWUxYzRkMjFjOTI5OWMwMmMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Add missing IAM dependencies * chore: Ignore failing IAM tests for now * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Lawrence Qiu <[email protected]>
1 parent 88ad198 commit 36f5b3c

File tree

44 files changed

+2368
-427
lines changed

Some content is hidden

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

44 files changed

+2368
-427
lines changed

java-service-management/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.16.0</version>
23+
<version>26.19.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
195195
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
196196
[stability-image]: https://img.shields.io/badge/stability-stable-green
197197
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-service-management.svg
198-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-management/3.17.0
198+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-management/3.19.0
199199
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
200200
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
201201
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-service-management/google-cloud-service-management/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
<groupId>org.threeten</groupId>
6666
<artifactId>threetenbp</artifactId>
6767
</dependency>
68+
<dependency>
69+
<groupId>com.google.api.grpc</groupId>
70+
<artifactId>proto-google-iam-v1</artifactId>
71+
</dependency>
6872

6973
<!-- Test dependencies -->
7074
<dependency>
@@ -97,5 +101,10 @@
97101
<classifier>testlib</classifier>
98102
<scope>test</scope>
99103
</dependency>
104+
<dependency>
105+
<groupId>com.google.api.grpc</groupId>
106+
<artifactId>grpc-google-iam-v1</artifactId>
107+
<scope>test</scope>
108+
</dependency>
100109
</dependencies>
101110
</project>

java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java

Lines changed: 219 additions & 22 deletions
Large diffs are not rendered by default.

java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerSettings.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
import com.google.api.servicemanagement.v1.UndeleteServiceRequest;
5858
import com.google.api.servicemanagement.v1.UndeleteServiceResponse;
5959
import com.google.cloud.api.servicemanagement.v1.stub.ServiceManagerStubSettings;
60+
import com.google.iam.v1.GetIamPolicyRequest;
61+
import com.google.iam.v1.Policy;
62+
import com.google.iam.v1.SetIamPolicyRequest;
63+
import com.google.iam.v1.TestIamPermissionsRequest;
64+
import com.google.iam.v1.TestIamPermissionsResponse;
6065
import com.google.longrunning.Operation;
6166
import com.google.protobuf.Empty;
6267
import java.io.IOException;
@@ -206,6 +211,22 @@ public UnaryCallSettings<CreateServiceRolloutRequest, Operation> createServiceRo
206211
return ((ServiceManagerStubSettings) getStubSettings()).generateConfigReportSettings();
207212
}
208213

214+
/** Returns the object with the settings used for calls to setIamPolicy. */
215+
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
216+
return ((ServiceManagerStubSettings) getStubSettings()).setIamPolicySettings();
217+
}
218+
219+
/** Returns the object with the settings used for calls to getIamPolicy. */
220+
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
221+
return ((ServiceManagerStubSettings) getStubSettings()).getIamPolicySettings();
222+
}
223+
224+
/** Returns the object with the settings used for calls to testIamPermissions. */
225+
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
226+
testIamPermissionsSettings() {
227+
return ((ServiceManagerStubSettings) getStubSettings()).testIamPermissionsSettings();
228+
}
229+
209230
public static final ServiceManagerSettings create(ServiceManagerStubSettings stub)
210231
throws IOException {
211232
return new ServiceManagerSettings.Builder(stub.toBuilder()).build();
@@ -431,6 +452,22 @@ public UnaryCallSettings.Builder<GetServiceConfigRequest, Service> getServiceCon
431452
return getStubSettingsBuilder().generateConfigReportSettings();
432453
}
433454

455+
/** Returns the builder for the settings used for calls to setIamPolicy. */
456+
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() {
457+
return getStubSettingsBuilder().setIamPolicySettings();
458+
}
459+
460+
/** Returns the builder for the settings used for calls to getIamPolicy. */
461+
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
462+
return getStubSettingsBuilder().getIamPolicySettings();
463+
}
464+
465+
/** Returns the builder for the settings used for calls to testIamPermissions. */
466+
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse>
467+
testIamPermissionsSettings() {
468+
return getStubSettingsBuilder().testIamPermissionsSettings();
469+
}
470+
434471
@Override
435472
public ServiceManagerSettings build() throws IOException {
436473
return new ServiceManagerSettings(this);

java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/gapic_metadata.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
"GenerateConfigReport": {
2626
"methods": ["generateConfigReport", "generateConfigReport", "generateConfigReportCallable"]
2727
},
28+
"GetIamPolicy": {
29+
"methods": ["getIamPolicy", "getIamPolicyCallable"]
30+
},
2831
"GetService": {
2932
"methods": ["getService", "getService", "getServiceCallable"]
3033
},
@@ -43,9 +46,15 @@
4346
"ListServices": {
4447
"methods": ["listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"]
4548
},
49+
"SetIamPolicy": {
50+
"methods": ["setIamPolicy", "setIamPolicyCallable"]
51+
},
4652
"SubmitConfigSource": {
4753
"methods": ["submitConfigSourceAsync", "submitConfigSourceAsync", "submitConfigSourceOperationCallable", "submitConfigSourceCallable"]
4854
},
55+
"TestIamPermissions": {
56+
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
57+
},
4958
"UndeleteService": {
5059
"methods": ["undeleteServiceAsync", "undeleteServiceAsync", "undeleteServiceOperationCallable", "undeleteServiceCallable"]
5160
}

java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/GrpcServiceManagerStub.java

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
import com.google.api.servicemanagement.v1.SubmitConfigSourceResponse;
5252
import com.google.api.servicemanagement.v1.UndeleteServiceRequest;
5353
import com.google.api.servicemanagement.v1.UndeleteServiceResponse;
54+
import com.google.iam.v1.GetIamPolicyRequest;
55+
import com.google.iam.v1.Policy;
56+
import com.google.iam.v1.SetIamPolicyRequest;
57+
import com.google.iam.v1.TestIamPermissionsRequest;
58+
import com.google.iam.v1.TestIamPermissionsResponse;
5459
import com.google.longrunning.Operation;
5560
import com.google.longrunning.stub.GrpcOperationsStub;
5661
import com.google.protobuf.Empty;
@@ -206,6 +211,33 @@ public class GrpcServiceManagerStub extends ServiceManagerStub {
206211
ProtoUtils.marshaller(GenerateConfigReportResponse.getDefaultInstance()))
207212
.build();
208213

214+
private static final MethodDescriptor<SetIamPolicyRequest, Policy> setIamPolicyMethodDescriptor =
215+
MethodDescriptor.<SetIamPolicyRequest, Policy>newBuilder()
216+
.setType(MethodDescriptor.MethodType.UNARY)
217+
.setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
218+
.setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
219+
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
220+
.build();
221+
222+
private static final MethodDescriptor<GetIamPolicyRequest, Policy> getIamPolicyMethodDescriptor =
223+
MethodDescriptor.<GetIamPolicyRequest, Policy>newBuilder()
224+
.setType(MethodDescriptor.MethodType.UNARY)
225+
.setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
226+
.setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
227+
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
228+
.build();
229+
230+
private static final MethodDescriptor<TestIamPermissionsRequest, TestIamPermissionsResponse>
231+
testIamPermissionsMethodDescriptor =
232+
MethodDescriptor.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()
233+
.setType(MethodDescriptor.MethodType.UNARY)
234+
.setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions")
235+
.setRequestMarshaller(
236+
ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
237+
.setResponseMarshaller(
238+
ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
239+
.build();
240+
209241
private final UnaryCallable<ListServicesRequest, ListServicesResponse> listServicesCallable;
210242
private final UnaryCallable<ListServicesRequest, ListServicesPagedResponse>
211243
listServicesPagedCallable;
@@ -240,6 +272,10 @@ public class GrpcServiceManagerStub extends ServiceManagerStub {
240272
createServiceRolloutOperationCallable;
241273
private final UnaryCallable<GenerateConfigReportRequest, GenerateConfigReportResponse>
242274
generateConfigReportCallable;
275+
private final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable;
276+
private final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable;
277+
private final UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
278+
testIamPermissionsCallable;
243279

244280
private final BackgroundResource backgroundResources;
245281
private final GrpcOperationsStub operationsStub;
@@ -402,6 +438,37 @@ protected GrpcServiceManagerStub(
402438
GrpcCallSettings.<GenerateConfigReportRequest, GenerateConfigReportResponse>newBuilder()
403439
.setMethodDescriptor(generateConfigReportMethodDescriptor)
404440
.build();
441+
GrpcCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =
442+
GrpcCallSettings.<SetIamPolicyRequest, Policy>newBuilder()
443+
.setMethodDescriptor(setIamPolicyMethodDescriptor)
444+
.setParamsExtractor(
445+
request -> {
446+
RequestParamsBuilder builder = RequestParamsBuilder.create();
447+
builder.add("resource", String.valueOf(request.getResource()));
448+
return builder.build();
449+
})
450+
.build();
451+
GrpcCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =
452+
GrpcCallSettings.<GetIamPolicyRequest, Policy>newBuilder()
453+
.setMethodDescriptor(getIamPolicyMethodDescriptor)
454+
.setParamsExtractor(
455+
request -> {
456+
RequestParamsBuilder builder = RequestParamsBuilder.create();
457+
builder.add("resource", String.valueOf(request.getResource()));
458+
return builder.build();
459+
})
460+
.build();
461+
GrpcCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
462+
testIamPermissionsTransportSettings =
463+
GrpcCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()
464+
.setMethodDescriptor(testIamPermissionsMethodDescriptor)
465+
.setParamsExtractor(
466+
request -> {
467+
RequestParamsBuilder builder = RequestParamsBuilder.create();
468+
builder.add("resource", String.valueOf(request.getResource()));
469+
return builder.build();
470+
})
471+
.build();
405472

406473
this.listServicesCallable =
407474
callableFactory.createUnaryCallable(
@@ -499,6 +566,17 @@ protected GrpcServiceManagerStub(
499566
generateConfigReportTransportSettings,
500567
settings.generateConfigReportSettings(),
501568
clientContext);
569+
this.setIamPolicyCallable =
570+
callableFactory.createUnaryCallable(
571+
setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
572+
this.getIamPolicyCallable =
573+
callableFactory.createUnaryCallable(
574+
getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
575+
this.testIamPermissionsCallable =
576+
callableFactory.createUnaryCallable(
577+
testIamPermissionsTransportSettings,
578+
settings.testIamPermissionsSettings(),
579+
clientContext);
502580

503581
this.backgroundResources =
504582
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -623,6 +701,22 @@ public UnaryCallable<CreateServiceRolloutRequest, Operation> createServiceRollou
623701
return generateConfigReportCallable;
624702
}
625703

704+
@Override
705+
public UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
706+
return setIamPolicyCallable;
707+
}
708+
709+
@Override
710+
public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
711+
return getIamPolicyCallable;
712+
}
713+
714+
@Override
715+
public UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
716+
testIamPermissionsCallable() {
717+
return testIamPermissionsCallable;
718+
}
719+
626720
@Override
627721
public final void close() {
628722
try {

0 commit comments

Comments
 (0)