Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate securitycenter client #4775

Merged
merged 1 commit into from
Mar 28, 2019
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 @@ -28,6 +28,7 @@
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.securitycenter.v1.CreateFindingRequest;
import com.google.cloud.securitycenter.v1.CreateSourceRequest;
Expand All @@ -53,6 +54,7 @@
import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest;
import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest;
import com.google.cloud.securitycenter.v1.UpdateSourceRequest;
import com.google.common.collect.ImmutableMap;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
Expand All @@ -64,6 +66,7 @@
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;

Expand Down Expand Up @@ -318,78 +321,245 @@ protected GrpcSecurityCenterStub(
GrpcCallSettings<CreateSourceRequest, Source> createSourceTransportSettings =
GrpcCallSettings.<CreateSourceRequest, Source>newBuilder()
.setMethodDescriptor(createSourceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateSourceRequest>() {
@Override
public Map<String, String> extract(CreateSourceRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<CreateFindingRequest, Finding> createFindingTransportSettings =
GrpcCallSettings.<CreateFindingRequest, Finding>newBuilder()
.setMethodDescriptor(createFindingMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateFindingRequest>() {
@Override
public Map<String, String> extract(CreateFindingRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =
GrpcCallSettings.<GetIamPolicyRequest, Policy>newBuilder()
.setMethodDescriptor(getIamPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetIamPolicyRequest>() {
@Override
public Map<String, String> extract(GetIamPolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
})
.build();
GrpcCallSettings<GetOrganizationSettingsRequest, OrganizationSettings>
getOrganizationSettingsTransportSettings =
GrpcCallSettings.<GetOrganizationSettingsRequest, OrganizationSettings>newBuilder()
.setMethodDescriptor(getOrganizationSettingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetOrganizationSettingsRequest>() {
@Override
public Map<String, String> extract(GetOrganizationSettingsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<GetSourceRequest, Source> getSourceTransportSettings =
GrpcCallSettings.<GetSourceRequest, Source>newBuilder()
.setMethodDescriptor(getSourceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetSourceRequest>() {
@Override
public Map<String, String> extract(GetSourceRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<GroupAssetsRequest, GroupAssetsResponse> groupAssetsTransportSettings =
GrpcCallSettings.<GroupAssetsRequest, GroupAssetsResponse>newBuilder()
.setMethodDescriptor(groupAssetsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GroupAssetsRequest>() {
@Override
public Map<String, String> extract(GroupAssetsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<GroupFindingsRequest, GroupFindingsResponse> groupFindingsTransportSettings =
GrpcCallSettings.<GroupFindingsRequest, GroupFindingsResponse>newBuilder()
.setMethodDescriptor(groupFindingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GroupFindingsRequest>() {
@Override
public Map<String, String> extract(GroupFindingsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<ListAssetsRequest, ListAssetsResponse> listAssetsTransportSettings =
GrpcCallSettings.<ListAssetsRequest, ListAssetsResponse>newBuilder()
.setMethodDescriptor(listAssetsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListAssetsRequest>() {
@Override
public Map<String, String> extract(ListAssetsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<ListFindingsRequest, ListFindingsResponse> listFindingsTransportSettings =
GrpcCallSettings.<ListFindingsRequest, ListFindingsResponse>newBuilder()
.setMethodDescriptor(listFindingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListFindingsRequest>() {
@Override
public Map<String, String> extract(ListFindingsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<ListSourcesRequest, ListSourcesResponse> listSourcesTransportSettings =
GrpcCallSettings.<ListSourcesRequest, ListSourcesResponse>newBuilder()
.setMethodDescriptor(listSourcesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListSourcesRequest>() {
@Override
public Map<String, String> extract(ListSourcesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<RunAssetDiscoveryRequest, Operation> runAssetDiscoveryTransportSettings =
GrpcCallSettings.<RunAssetDiscoveryRequest, Operation>newBuilder()
.setMethodDescriptor(runAssetDiscoveryMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<RunAssetDiscoveryRequest>() {
@Override
public Map<String, String> extract(RunAssetDiscoveryRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<SetFindingStateRequest, Finding> setFindingStateTransportSettings =
GrpcCallSettings.<SetFindingStateRequest, Finding>newBuilder()
.setMethodDescriptor(setFindingStateMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SetFindingStateRequest>() {
@Override
public Map<String, String> extract(SetFindingStateRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =
GrpcCallSettings.<SetIamPolicyRequest, Policy>newBuilder()
.setMethodDescriptor(setIamPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SetIamPolicyRequest>() {
@Override
public Map<String, String> extract(SetIamPolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
})
.build();
GrpcCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsTransportSettings =
GrpcCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()
.setMethodDescriptor(testIamPermissionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<TestIamPermissionsRequest>() {
@Override
public Map<String, String> extract(TestIamPermissionsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateFindingRequest, Finding> updateFindingTransportSettings =
GrpcCallSettings.<UpdateFindingRequest, Finding>newBuilder()
.setMethodDescriptor(updateFindingMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateFindingRequest>() {
@Override
public Map<String, String> extract(UpdateFindingRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("finding.name", String.valueOf(request.getFinding().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateOrganizationSettingsRequest, OrganizationSettings>
updateOrganizationSettingsTransportSettings =
GrpcCallSettings.<UpdateOrganizationSettingsRequest, OrganizationSettings>newBuilder()
.setMethodDescriptor(updateOrganizationSettingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateOrganizationSettingsRequest>() {
@Override
public Map<String, String> extract(
UpdateOrganizationSettingsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"organization_settings.name",
String.valueOf(request.getOrganizationSettings().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateSourceRequest, Source> updateSourceTransportSettings =
GrpcCallSettings.<UpdateSourceRequest, Source>newBuilder()
.setMethodDescriptor(updateSourceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateSourceRequest>() {
@Override
public Map<String, String> extract(UpdateSourceRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("source.name", String.valueOf(request.getSource().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateSecurityMarksRequest, SecurityMarks>
updateSecurityMarksTransportSettings =
GrpcCallSettings.<UpdateSecurityMarksRequest, SecurityMarks>newBuilder()
.setMethodDescriptor(updateSecurityMarksMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateSecurityMarksRequest>() {
@Override
public Map<String, String> extract(UpdateSecurityMarksRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"security_marks.name",
String.valueOf(request.getSecurityMarks().getName()));
return params.build();
}
})
.build();

this.createSourceCallable =
Expand Down
Loading