Skip to content

Commit a5f5f16

Browse files
feat!: replace java_outer_classname option with use_java_stubby_library, add DisableServiceAccountKey and EnableServiceAccountKey, and update comments
PiperOrigin-RevId: 474647927 Source-Link: googleapis/googleapis@a0a740c Source-Link: https://github.com/googleapis/googleapis-gen/commit/5849ad110f25eef1e08daf29bd5a81f11fb65424 Copy-Tag: eyJwIjoiamF2YS1pYW0tYWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjU4NDlhZDExMGYyNWVlZjFlMDhkYWYyOWJkNWE4MWYxMWZiNjU0MjQifQ==
1 parent 36fb66a commit a5f5f16

110 files changed

Lines changed: 64053 additions & 0 deletions

File tree

Some content is hidden

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

owl-bot-staging/java-iam-admin/v1/google-iam-admin/src/main/java/com/google/cloud/iam/admin/v1/IAMClient.java

Lines changed: 4006 additions & 0 deletions
Large diffs are not rendered by default.

owl-bot-staging/java-iam-admin/v1/google-iam-admin/src/main/java/com/google/cloud/iam/admin/v1/IAMSettings.java

Lines changed: 605 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"schema": "1.0",
3+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
4+
"language": "java",
5+
"protoPackage": "google.iam.admin.v1",
6+
"libraryPackage": "com.google.cloud.iam.admin.v1",
7+
"services": {
8+
"IAM": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "IAMClient",
12+
"rpcs": {
13+
"CreateRole": {
14+
"methods": ["createRole", "createRoleCallable"]
15+
},
16+
"CreateServiceAccount": {
17+
"methods": ["createServiceAccount", "createServiceAccount", "createServiceAccount", "createServiceAccountCallable"]
18+
},
19+
"CreateServiceAccountKey": {
20+
"methods": ["createServiceAccountKey", "createServiceAccountKey", "createServiceAccountKey", "createServiceAccountKeyCallable"]
21+
},
22+
"DeleteRole": {
23+
"methods": ["deleteRole", "deleteRoleCallable"]
24+
},
25+
"DeleteServiceAccount": {
26+
"methods": ["deleteServiceAccount", "deleteServiceAccount", "deleteServiceAccount", "deleteServiceAccountCallable"]
27+
},
28+
"DeleteServiceAccountKey": {
29+
"methods": ["deleteServiceAccountKey", "deleteServiceAccountKey", "deleteServiceAccountKey", "deleteServiceAccountKeyCallable"]
30+
},
31+
"DisableServiceAccount": {
32+
"methods": ["disableServiceAccount", "disableServiceAccountCallable"]
33+
},
34+
"DisableServiceAccountKey": {
35+
"methods": ["disableServiceAccountKey", "disableServiceAccountKey", "disableServiceAccountKey", "disableServiceAccountKeyCallable"]
36+
},
37+
"EnableServiceAccount": {
38+
"methods": ["enableServiceAccount", "enableServiceAccountCallable"]
39+
},
40+
"EnableServiceAccountKey": {
41+
"methods": ["enableServiceAccountKey", "enableServiceAccountKey", "enableServiceAccountKey", "enableServiceAccountKeyCallable"]
42+
},
43+
"GetIamPolicy": {
44+
"methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"]
45+
},
46+
"GetRole": {
47+
"methods": ["getRole", "getRoleCallable"]
48+
},
49+
"GetServiceAccount": {
50+
"methods": ["getServiceAccount", "getServiceAccount", "getServiceAccount", "getServiceAccountCallable"]
51+
},
52+
"GetServiceAccountKey": {
53+
"methods": ["getServiceAccountKey", "getServiceAccountKey", "getServiceAccountKey", "getServiceAccountKeyCallable"]
54+
},
55+
"LintPolicy": {
56+
"methods": ["lintPolicy", "lintPolicyCallable"]
57+
},
58+
"ListRoles": {
59+
"methods": ["listRoles", "listRolesPagedCallable", "listRolesCallable"]
60+
},
61+
"ListServiceAccountKeys": {
62+
"methods": ["listServiceAccountKeys", "listServiceAccountKeys", "listServiceAccountKeys", "listServiceAccountKeysCallable"]
63+
},
64+
"ListServiceAccounts": {
65+
"methods": ["listServiceAccounts", "listServiceAccounts", "listServiceAccounts", "listServiceAccountsPagedCallable", "listServiceAccountsCallable"]
66+
},
67+
"PatchServiceAccount": {
68+
"methods": ["patchServiceAccount", "patchServiceAccountCallable"]
69+
},
70+
"QueryAuditableServices": {
71+
"methods": ["queryAuditableServices", "queryAuditableServicesCallable"]
72+
},
73+
"QueryGrantableRoles": {
74+
"methods": ["queryGrantableRoles", "queryGrantableRoles", "queryGrantableRolesPagedCallable", "queryGrantableRolesCallable"]
75+
},
76+
"QueryTestablePermissions": {
77+
"methods": ["queryTestablePermissions", "queryTestablePermissionsPagedCallable", "queryTestablePermissionsCallable"]
78+
},
79+
"SetIamPolicy": {
80+
"methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"]
81+
},
82+
"SignBlob": {
83+
"methods": ["signBlob", "signBlob", "signBlob", "signBlobCallable"]
84+
},
85+
"SignJwt": {
86+
"methods": ["signJwt", "signJwt", "signJwt", "signJwtCallable"]
87+
},
88+
"TestIamPermissions": {
89+
"methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"]
90+
},
91+
"UndeleteRole": {
92+
"methods": ["undeleteRole", "undeleteRoleCallable"]
93+
},
94+
"UndeleteServiceAccount": {
95+
"methods": ["undeleteServiceAccount", "undeleteServiceAccountCallable"]
96+
},
97+
"UpdateRole": {
98+
"methods": ["updateRole", "updateRoleCallable"]
99+
},
100+
"UpdateServiceAccount": {
101+
"methods": ["updateServiceAccount", "updateServiceAccountCallable"]
102+
},
103+
"UploadServiceAccountKey": {
104+
"methods": ["uploadServiceAccountKey", "uploadServiceAccountKeyCallable"]
105+
}
106+
}
107+
}
108+
}
109+
}
110+
}
111+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright 2022 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+
/**
18+
* A client to Identity and Access Management (IAM) API
19+
*
20+
* <p>The interfaces provided are listed below, along with usage samples.
21+
*
22+
* <p>======================= IAMClient =======================
23+
*
24+
* <p>Service Description: Creates and manages Identity and Access Management (IAM) resources.
25+
*
26+
* <p>You can use this service to work with all of the following resources:
27+
*
28+
* <ul>
29+
* <li>&#42;&#42;Service accounts&#42;&#42;, which identify an application or a virtual machine
30+
* (VM) instance rather than a person
31+
* <li>&#42;&#42;Service account keys&#42;&#42;, which service accounts use to authenticate with
32+
* Google APIs
33+
* <li>&#42;&#42;IAM policies for service accounts&#42;&#42;, which specify the roles that a
34+
* principal has for the service account
35+
* <li>&#42;&#42;IAM custom roles&#42;&#42;, which help you limit the number of permissions that
36+
* you grant to principals
37+
* </ul>
38+
*
39+
* <p>In addition, you can use this service to complete the following tasks, among others:
40+
*
41+
* <ul>
42+
* <li>Test whether a service account can use specific permissions
43+
* <li>Check which roles you can grant for a specific resource
44+
* <li>Lint, or validate, condition expressions in an IAM policy
45+
* </ul>
46+
*
47+
* <p>When you read data from the IAM API, each read is eventually consistent. In other words, if
48+
* you write data with the IAM API, then immediately read that data, the read operation might return
49+
* an older version of the data. To deal with this behavior, your application can retry the request
50+
* with truncated exponential backoff.
51+
*
52+
* <p>In contrast, writing data to the IAM API is sequentially consistent. In other words, write
53+
* operations are always processed in the order in which they were received.
54+
*
55+
* <p>Sample for IAMClient:
56+
*
57+
* <pre>{@code
58+
* // This snippet has been automatically generated and should be regarded as a code template only.
59+
* // It will require modifications to work:
60+
* // - It may require correct/in-range values for request initialization.
61+
* // - It may require specifying regional endpoints when creating the service client as shown in
62+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
63+
* try (IAMClient iAMClient = IAMClient.create()) {
64+
* ServiceAccountName name = ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]");
65+
* ServiceAccount response = iAMClient.getServiceAccount(name);
66+
* }
67+
* }</pre>
68+
*/
69+
@Generated("by gapic-generator-java")
70+
package com.google.cloud.iam.admin.v1;
71+
72+
import javax.annotation.Generated;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
* Copyright 2022 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.iam.admin.v1.stub;
18+
19+
import com.google.api.gax.grpc.GrpcCallSettings;
20+
import com.google.api.gax.grpc.GrpcCallableFactory;
21+
import com.google.api.gax.grpc.GrpcStubCallableFactory;
22+
import com.google.api.gax.rpc.BatchingCallSettings;
23+
import com.google.api.gax.rpc.BidiStreamingCallable;
24+
import com.google.api.gax.rpc.ClientContext;
25+
import com.google.api.gax.rpc.ClientStreamingCallable;
26+
import com.google.api.gax.rpc.OperationCallSettings;
27+
import com.google.api.gax.rpc.OperationCallable;
28+
import com.google.api.gax.rpc.PagedCallSettings;
29+
import com.google.api.gax.rpc.ServerStreamingCallSettings;
30+
import com.google.api.gax.rpc.ServerStreamingCallable;
31+
import com.google.api.gax.rpc.StreamingCallSettings;
32+
import com.google.api.gax.rpc.UnaryCallSettings;
33+
import com.google.api.gax.rpc.UnaryCallable;
34+
import com.google.longrunning.Operation;
35+
import com.google.longrunning.stub.OperationsStub;
36+
import javax.annotation.Generated;
37+
38+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
39+
/**
40+
* gRPC callable factory implementation for the IAM service API.
41+
*
42+
* <p>This class is for advanced usage.
43+
*/
44+
@Generated("by gapic-generator-java")
45+
public class GrpcIAMCallableFactory implements GrpcStubCallableFactory {
46+
47+
@Override
48+
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCallable(
49+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
50+
UnaryCallSettings<RequestT, ResponseT> callSettings,
51+
ClientContext clientContext) {
52+
return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
53+
}
54+
55+
@Override
56+
public <RequestT, ResponseT, PagedListResponseT>
57+
UnaryCallable<RequestT, PagedListResponseT> createPagedCallable(
58+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
59+
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> callSettings,
60+
ClientContext clientContext) {
61+
return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
62+
}
63+
64+
@Override
65+
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCallable(
66+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
67+
BatchingCallSettings<RequestT, ResponseT> callSettings,
68+
ClientContext clientContext) {
69+
return GrpcCallableFactory.createBatchingCallable(
70+
grpcCallSettings, callSettings, clientContext);
71+
}
72+
73+
@Override
74+
public <RequestT, ResponseT, MetadataT>
75+
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
76+
GrpcCallSettings<RequestT, Operation> grpcCallSettings,
77+
OperationCallSettings<RequestT, ResponseT, MetadataT> callSettings,
78+
ClientContext clientContext,
79+
OperationsStub operationsStub) {
80+
return GrpcCallableFactory.createOperationCallable(
81+
grpcCallSettings, callSettings, clientContext, operationsStub);
82+
}
83+
84+
@Override
85+
public <RequestT, ResponseT>
86+
BidiStreamingCallable<RequestT, ResponseT> createBidiStreamingCallable(
87+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
88+
StreamingCallSettings<RequestT, ResponseT> callSettings,
89+
ClientContext clientContext) {
90+
return GrpcCallableFactory.createBidiStreamingCallable(
91+
grpcCallSettings, callSettings, clientContext);
92+
}
93+
94+
@Override
95+
public <RequestT, ResponseT>
96+
ServerStreamingCallable<RequestT, ResponseT> createServerStreamingCallable(
97+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
98+
ServerStreamingCallSettings<RequestT, ResponseT> callSettings,
99+
ClientContext clientContext) {
100+
return GrpcCallableFactory.createServerStreamingCallable(
101+
grpcCallSettings, callSettings, clientContext);
102+
}
103+
104+
@Override
105+
public <RequestT, ResponseT>
106+
ClientStreamingCallable<RequestT, ResponseT> createClientStreamingCallable(
107+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
108+
StreamingCallSettings<RequestT, ResponseT> callSettings,
109+
ClientContext clientContext) {
110+
return GrpcCallableFactory.createClientStreamingCallable(
111+
grpcCallSettings, callSettings, clientContext);
112+
}
113+
}

0 commit comments

Comments
 (0)