1 /* 2 * Copyright 2020 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 package com.google.cloud.billing.v1; 17 18 import static io.grpc.MethodDescriptor.generateFullMethodName; 19 20 /** 21 * 22 * 23 * <pre> 24 * Retrieves the Google Cloud Console billing accounts and associates them with 25 * projects. 26 * </pre> 27 */ 28 @javax.annotation.Generated( 29 value = "by gRPC proto compiler", 30 comments = "Source: google/cloud/billing/v1/cloud_billing.proto") 31 @io.grpc.stub.annotations.GrpcGenerated 32 public final class CloudBillingGrpc { 33 CloudBillingGrpc()34 private CloudBillingGrpc() {} 35 36 public static final String SERVICE_NAME = "google.cloud.billing.v1.CloudBilling"; 37 38 // Static method descriptors that strictly reflect the proto. 39 private static volatile io.grpc.MethodDescriptor< 40 com.google.cloud.billing.v1.GetBillingAccountRequest, 41 com.google.cloud.billing.v1.BillingAccount> 42 getGetBillingAccountMethod; 43 44 @io.grpc.stub.annotations.RpcMethod( 45 fullMethodName = SERVICE_NAME + '/' + "GetBillingAccount", 46 requestType = com.google.cloud.billing.v1.GetBillingAccountRequest.class, 47 responseType = com.google.cloud.billing.v1.BillingAccount.class, 48 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 49 public static io.grpc.MethodDescriptor< 50 com.google.cloud.billing.v1.GetBillingAccountRequest, 51 com.google.cloud.billing.v1.BillingAccount> getGetBillingAccountMethod()52 getGetBillingAccountMethod() { 53 io.grpc.MethodDescriptor< 54 com.google.cloud.billing.v1.GetBillingAccountRequest, 55 com.google.cloud.billing.v1.BillingAccount> 56 getGetBillingAccountMethod; 57 if ((getGetBillingAccountMethod = CloudBillingGrpc.getGetBillingAccountMethod) == null) { 58 synchronized (CloudBillingGrpc.class) { 59 if ((getGetBillingAccountMethod = CloudBillingGrpc.getGetBillingAccountMethod) == null) { 60 CloudBillingGrpc.getGetBillingAccountMethod = 61 getGetBillingAccountMethod = 62 io.grpc.MethodDescriptor 63 .<com.google.cloud.billing.v1.GetBillingAccountRequest, 64 com.google.cloud.billing.v1.BillingAccount> 65 newBuilder() 66 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 67 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBillingAccount")) 68 .setSampledToLocalTracing(true) 69 .setRequestMarshaller( 70 io.grpc.protobuf.ProtoUtils.marshaller( 71 com.google.cloud.billing.v1.GetBillingAccountRequest 72 .getDefaultInstance())) 73 .setResponseMarshaller( 74 io.grpc.protobuf.ProtoUtils.marshaller( 75 com.google.cloud.billing.v1.BillingAccount.getDefaultInstance())) 76 .setSchemaDescriptor( 77 new CloudBillingMethodDescriptorSupplier("GetBillingAccount")) 78 .build(); 79 } 80 } 81 } 82 return getGetBillingAccountMethod; 83 } 84 85 private static volatile io.grpc.MethodDescriptor< 86 com.google.cloud.billing.v1.ListBillingAccountsRequest, 87 com.google.cloud.billing.v1.ListBillingAccountsResponse> 88 getListBillingAccountsMethod; 89 90 @io.grpc.stub.annotations.RpcMethod( 91 fullMethodName = SERVICE_NAME + '/' + "ListBillingAccounts", 92 requestType = com.google.cloud.billing.v1.ListBillingAccountsRequest.class, 93 responseType = com.google.cloud.billing.v1.ListBillingAccountsResponse.class, 94 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 95 public static io.grpc.MethodDescriptor< 96 com.google.cloud.billing.v1.ListBillingAccountsRequest, 97 com.google.cloud.billing.v1.ListBillingAccountsResponse> getListBillingAccountsMethod()98 getListBillingAccountsMethod() { 99 io.grpc.MethodDescriptor< 100 com.google.cloud.billing.v1.ListBillingAccountsRequest, 101 com.google.cloud.billing.v1.ListBillingAccountsResponse> 102 getListBillingAccountsMethod; 103 if ((getListBillingAccountsMethod = CloudBillingGrpc.getListBillingAccountsMethod) == null) { 104 synchronized (CloudBillingGrpc.class) { 105 if ((getListBillingAccountsMethod = CloudBillingGrpc.getListBillingAccountsMethod) 106 == null) { 107 CloudBillingGrpc.getListBillingAccountsMethod = 108 getListBillingAccountsMethod = 109 io.grpc.MethodDescriptor 110 .<com.google.cloud.billing.v1.ListBillingAccountsRequest, 111 com.google.cloud.billing.v1.ListBillingAccountsResponse> 112 newBuilder() 113 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 114 .setFullMethodName( 115 generateFullMethodName(SERVICE_NAME, "ListBillingAccounts")) 116 .setSampledToLocalTracing(true) 117 .setRequestMarshaller( 118 io.grpc.protobuf.ProtoUtils.marshaller( 119 com.google.cloud.billing.v1.ListBillingAccountsRequest 120 .getDefaultInstance())) 121 .setResponseMarshaller( 122 io.grpc.protobuf.ProtoUtils.marshaller( 123 com.google.cloud.billing.v1.ListBillingAccountsResponse 124 .getDefaultInstance())) 125 .setSchemaDescriptor( 126 new CloudBillingMethodDescriptorSupplier("ListBillingAccounts")) 127 .build(); 128 } 129 } 130 } 131 return getListBillingAccountsMethod; 132 } 133 134 private static volatile io.grpc.MethodDescriptor< 135 com.google.cloud.billing.v1.UpdateBillingAccountRequest, 136 com.google.cloud.billing.v1.BillingAccount> 137 getUpdateBillingAccountMethod; 138 139 @io.grpc.stub.annotations.RpcMethod( 140 fullMethodName = SERVICE_NAME + '/' + "UpdateBillingAccount", 141 requestType = com.google.cloud.billing.v1.UpdateBillingAccountRequest.class, 142 responseType = com.google.cloud.billing.v1.BillingAccount.class, 143 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 144 public static io.grpc.MethodDescriptor< 145 com.google.cloud.billing.v1.UpdateBillingAccountRequest, 146 com.google.cloud.billing.v1.BillingAccount> getUpdateBillingAccountMethod()147 getUpdateBillingAccountMethod() { 148 io.grpc.MethodDescriptor< 149 com.google.cloud.billing.v1.UpdateBillingAccountRequest, 150 com.google.cloud.billing.v1.BillingAccount> 151 getUpdateBillingAccountMethod; 152 if ((getUpdateBillingAccountMethod = CloudBillingGrpc.getUpdateBillingAccountMethod) == null) { 153 synchronized (CloudBillingGrpc.class) { 154 if ((getUpdateBillingAccountMethod = CloudBillingGrpc.getUpdateBillingAccountMethod) 155 == null) { 156 CloudBillingGrpc.getUpdateBillingAccountMethod = 157 getUpdateBillingAccountMethod = 158 io.grpc.MethodDescriptor 159 .<com.google.cloud.billing.v1.UpdateBillingAccountRequest, 160 com.google.cloud.billing.v1.BillingAccount> 161 newBuilder() 162 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 163 .setFullMethodName( 164 generateFullMethodName(SERVICE_NAME, "UpdateBillingAccount")) 165 .setSampledToLocalTracing(true) 166 .setRequestMarshaller( 167 io.grpc.protobuf.ProtoUtils.marshaller( 168 com.google.cloud.billing.v1.UpdateBillingAccountRequest 169 .getDefaultInstance())) 170 .setResponseMarshaller( 171 io.grpc.protobuf.ProtoUtils.marshaller( 172 com.google.cloud.billing.v1.BillingAccount.getDefaultInstance())) 173 .setSchemaDescriptor( 174 new CloudBillingMethodDescriptorSupplier("UpdateBillingAccount")) 175 .build(); 176 } 177 } 178 } 179 return getUpdateBillingAccountMethod; 180 } 181 182 private static volatile io.grpc.MethodDescriptor< 183 com.google.cloud.billing.v1.CreateBillingAccountRequest, 184 com.google.cloud.billing.v1.BillingAccount> 185 getCreateBillingAccountMethod; 186 187 @io.grpc.stub.annotations.RpcMethod( 188 fullMethodName = SERVICE_NAME + '/' + "CreateBillingAccount", 189 requestType = com.google.cloud.billing.v1.CreateBillingAccountRequest.class, 190 responseType = com.google.cloud.billing.v1.BillingAccount.class, 191 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 192 public static io.grpc.MethodDescriptor< 193 com.google.cloud.billing.v1.CreateBillingAccountRequest, 194 com.google.cloud.billing.v1.BillingAccount> getCreateBillingAccountMethod()195 getCreateBillingAccountMethod() { 196 io.grpc.MethodDescriptor< 197 com.google.cloud.billing.v1.CreateBillingAccountRequest, 198 com.google.cloud.billing.v1.BillingAccount> 199 getCreateBillingAccountMethod; 200 if ((getCreateBillingAccountMethod = CloudBillingGrpc.getCreateBillingAccountMethod) == null) { 201 synchronized (CloudBillingGrpc.class) { 202 if ((getCreateBillingAccountMethod = CloudBillingGrpc.getCreateBillingAccountMethod) 203 == null) { 204 CloudBillingGrpc.getCreateBillingAccountMethod = 205 getCreateBillingAccountMethod = 206 io.grpc.MethodDescriptor 207 .<com.google.cloud.billing.v1.CreateBillingAccountRequest, 208 com.google.cloud.billing.v1.BillingAccount> 209 newBuilder() 210 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 211 .setFullMethodName( 212 generateFullMethodName(SERVICE_NAME, "CreateBillingAccount")) 213 .setSampledToLocalTracing(true) 214 .setRequestMarshaller( 215 io.grpc.protobuf.ProtoUtils.marshaller( 216 com.google.cloud.billing.v1.CreateBillingAccountRequest 217 .getDefaultInstance())) 218 .setResponseMarshaller( 219 io.grpc.protobuf.ProtoUtils.marshaller( 220 com.google.cloud.billing.v1.BillingAccount.getDefaultInstance())) 221 .setSchemaDescriptor( 222 new CloudBillingMethodDescriptorSupplier("CreateBillingAccount")) 223 .build(); 224 } 225 } 226 } 227 return getCreateBillingAccountMethod; 228 } 229 230 private static volatile io.grpc.MethodDescriptor< 231 com.google.cloud.billing.v1.ListProjectBillingInfoRequest, 232 com.google.cloud.billing.v1.ListProjectBillingInfoResponse> 233 getListProjectBillingInfoMethod; 234 235 @io.grpc.stub.annotations.RpcMethod( 236 fullMethodName = SERVICE_NAME + '/' + "ListProjectBillingInfo", 237 requestType = com.google.cloud.billing.v1.ListProjectBillingInfoRequest.class, 238 responseType = com.google.cloud.billing.v1.ListProjectBillingInfoResponse.class, 239 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 240 public static io.grpc.MethodDescriptor< 241 com.google.cloud.billing.v1.ListProjectBillingInfoRequest, 242 com.google.cloud.billing.v1.ListProjectBillingInfoResponse> getListProjectBillingInfoMethod()243 getListProjectBillingInfoMethod() { 244 io.grpc.MethodDescriptor< 245 com.google.cloud.billing.v1.ListProjectBillingInfoRequest, 246 com.google.cloud.billing.v1.ListProjectBillingInfoResponse> 247 getListProjectBillingInfoMethod; 248 if ((getListProjectBillingInfoMethod = CloudBillingGrpc.getListProjectBillingInfoMethod) 249 == null) { 250 synchronized (CloudBillingGrpc.class) { 251 if ((getListProjectBillingInfoMethod = CloudBillingGrpc.getListProjectBillingInfoMethod) 252 == null) { 253 CloudBillingGrpc.getListProjectBillingInfoMethod = 254 getListProjectBillingInfoMethod = 255 io.grpc.MethodDescriptor 256 .<com.google.cloud.billing.v1.ListProjectBillingInfoRequest, 257 com.google.cloud.billing.v1.ListProjectBillingInfoResponse> 258 newBuilder() 259 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 260 .setFullMethodName( 261 generateFullMethodName(SERVICE_NAME, "ListProjectBillingInfo")) 262 .setSampledToLocalTracing(true) 263 .setRequestMarshaller( 264 io.grpc.protobuf.ProtoUtils.marshaller( 265 com.google.cloud.billing.v1.ListProjectBillingInfoRequest 266 .getDefaultInstance())) 267 .setResponseMarshaller( 268 io.grpc.protobuf.ProtoUtils.marshaller( 269 com.google.cloud.billing.v1.ListProjectBillingInfoResponse 270 .getDefaultInstance())) 271 .setSchemaDescriptor( 272 new CloudBillingMethodDescriptorSupplier("ListProjectBillingInfo")) 273 .build(); 274 } 275 } 276 } 277 return getListProjectBillingInfoMethod; 278 } 279 280 private static volatile io.grpc.MethodDescriptor< 281 com.google.cloud.billing.v1.GetProjectBillingInfoRequest, 282 com.google.cloud.billing.v1.ProjectBillingInfo> 283 getGetProjectBillingInfoMethod; 284 285 @io.grpc.stub.annotations.RpcMethod( 286 fullMethodName = SERVICE_NAME + '/' + "GetProjectBillingInfo", 287 requestType = com.google.cloud.billing.v1.GetProjectBillingInfoRequest.class, 288 responseType = com.google.cloud.billing.v1.ProjectBillingInfo.class, 289 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 290 public static io.grpc.MethodDescriptor< 291 com.google.cloud.billing.v1.GetProjectBillingInfoRequest, 292 com.google.cloud.billing.v1.ProjectBillingInfo> getGetProjectBillingInfoMethod()293 getGetProjectBillingInfoMethod() { 294 io.grpc.MethodDescriptor< 295 com.google.cloud.billing.v1.GetProjectBillingInfoRequest, 296 com.google.cloud.billing.v1.ProjectBillingInfo> 297 getGetProjectBillingInfoMethod; 298 if ((getGetProjectBillingInfoMethod = CloudBillingGrpc.getGetProjectBillingInfoMethod) 299 == null) { 300 synchronized (CloudBillingGrpc.class) { 301 if ((getGetProjectBillingInfoMethod = CloudBillingGrpc.getGetProjectBillingInfoMethod) 302 == null) { 303 CloudBillingGrpc.getGetProjectBillingInfoMethod = 304 getGetProjectBillingInfoMethod = 305 io.grpc.MethodDescriptor 306 .<com.google.cloud.billing.v1.GetProjectBillingInfoRequest, 307 com.google.cloud.billing.v1.ProjectBillingInfo> 308 newBuilder() 309 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 310 .setFullMethodName( 311 generateFullMethodName(SERVICE_NAME, "GetProjectBillingInfo")) 312 .setSampledToLocalTracing(true) 313 .setRequestMarshaller( 314 io.grpc.protobuf.ProtoUtils.marshaller( 315 com.google.cloud.billing.v1.GetProjectBillingInfoRequest 316 .getDefaultInstance())) 317 .setResponseMarshaller( 318 io.grpc.protobuf.ProtoUtils.marshaller( 319 com.google.cloud.billing.v1.ProjectBillingInfo.getDefaultInstance())) 320 .setSchemaDescriptor( 321 new CloudBillingMethodDescriptorSupplier("GetProjectBillingInfo")) 322 .build(); 323 } 324 } 325 } 326 return getGetProjectBillingInfoMethod; 327 } 328 329 private static volatile io.grpc.MethodDescriptor< 330 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest, 331 com.google.cloud.billing.v1.ProjectBillingInfo> 332 getUpdateProjectBillingInfoMethod; 333 334 @io.grpc.stub.annotations.RpcMethod( 335 fullMethodName = SERVICE_NAME + '/' + "UpdateProjectBillingInfo", 336 requestType = com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest.class, 337 responseType = com.google.cloud.billing.v1.ProjectBillingInfo.class, 338 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 339 public static io.grpc.MethodDescriptor< 340 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest, 341 com.google.cloud.billing.v1.ProjectBillingInfo> getUpdateProjectBillingInfoMethod()342 getUpdateProjectBillingInfoMethod() { 343 io.grpc.MethodDescriptor< 344 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest, 345 com.google.cloud.billing.v1.ProjectBillingInfo> 346 getUpdateProjectBillingInfoMethod; 347 if ((getUpdateProjectBillingInfoMethod = CloudBillingGrpc.getUpdateProjectBillingInfoMethod) 348 == null) { 349 synchronized (CloudBillingGrpc.class) { 350 if ((getUpdateProjectBillingInfoMethod = CloudBillingGrpc.getUpdateProjectBillingInfoMethod) 351 == null) { 352 CloudBillingGrpc.getUpdateProjectBillingInfoMethod = 353 getUpdateProjectBillingInfoMethod = 354 io.grpc.MethodDescriptor 355 .<com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest, 356 com.google.cloud.billing.v1.ProjectBillingInfo> 357 newBuilder() 358 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 359 .setFullMethodName( 360 generateFullMethodName(SERVICE_NAME, "UpdateProjectBillingInfo")) 361 .setSampledToLocalTracing(true) 362 .setRequestMarshaller( 363 io.grpc.protobuf.ProtoUtils.marshaller( 364 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest 365 .getDefaultInstance())) 366 .setResponseMarshaller( 367 io.grpc.protobuf.ProtoUtils.marshaller( 368 com.google.cloud.billing.v1.ProjectBillingInfo.getDefaultInstance())) 369 .setSchemaDescriptor( 370 new CloudBillingMethodDescriptorSupplier("UpdateProjectBillingInfo")) 371 .build(); 372 } 373 } 374 } 375 return getUpdateProjectBillingInfoMethod; 376 } 377 378 private static volatile io.grpc.MethodDescriptor< 379 com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> 380 getGetIamPolicyMethod; 381 382 @io.grpc.stub.annotations.RpcMethod( 383 fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", 384 requestType = com.google.iam.v1.GetIamPolicyRequest.class, 385 responseType = com.google.iam.v1.Policy.class, 386 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 387 public static io.grpc.MethodDescriptor< 388 com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> getGetIamPolicyMethod()389 getGetIamPolicyMethod() { 390 io.grpc.MethodDescriptor<com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> 391 getGetIamPolicyMethod; 392 if ((getGetIamPolicyMethod = CloudBillingGrpc.getGetIamPolicyMethod) == null) { 393 synchronized (CloudBillingGrpc.class) { 394 if ((getGetIamPolicyMethod = CloudBillingGrpc.getGetIamPolicyMethod) == null) { 395 CloudBillingGrpc.getGetIamPolicyMethod = 396 getGetIamPolicyMethod = 397 io.grpc.MethodDescriptor 398 .<com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>newBuilder() 399 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 400 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) 401 .setSampledToLocalTracing(true) 402 .setRequestMarshaller( 403 io.grpc.protobuf.ProtoUtils.marshaller( 404 com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) 405 .setResponseMarshaller( 406 io.grpc.protobuf.ProtoUtils.marshaller( 407 com.google.iam.v1.Policy.getDefaultInstance())) 408 .setSchemaDescriptor(new CloudBillingMethodDescriptorSupplier("GetIamPolicy")) 409 .build(); 410 } 411 } 412 } 413 return getGetIamPolicyMethod; 414 } 415 416 private static volatile io.grpc.MethodDescriptor< 417 com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> 418 getSetIamPolicyMethod; 419 420 @io.grpc.stub.annotations.RpcMethod( 421 fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", 422 requestType = com.google.iam.v1.SetIamPolicyRequest.class, 423 responseType = com.google.iam.v1.Policy.class, 424 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 425 public static io.grpc.MethodDescriptor< 426 com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> getSetIamPolicyMethod()427 getSetIamPolicyMethod() { 428 io.grpc.MethodDescriptor<com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> 429 getSetIamPolicyMethod; 430 if ((getSetIamPolicyMethod = CloudBillingGrpc.getSetIamPolicyMethod) == null) { 431 synchronized (CloudBillingGrpc.class) { 432 if ((getSetIamPolicyMethod = CloudBillingGrpc.getSetIamPolicyMethod) == null) { 433 CloudBillingGrpc.getSetIamPolicyMethod = 434 getSetIamPolicyMethod = 435 io.grpc.MethodDescriptor 436 .<com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>newBuilder() 437 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 438 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) 439 .setSampledToLocalTracing(true) 440 .setRequestMarshaller( 441 io.grpc.protobuf.ProtoUtils.marshaller( 442 com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) 443 .setResponseMarshaller( 444 io.grpc.protobuf.ProtoUtils.marshaller( 445 com.google.iam.v1.Policy.getDefaultInstance())) 446 .setSchemaDescriptor(new CloudBillingMethodDescriptorSupplier("SetIamPolicy")) 447 .build(); 448 } 449 } 450 } 451 return getSetIamPolicyMethod; 452 } 453 454 private static volatile io.grpc.MethodDescriptor< 455 com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> 456 getTestIamPermissionsMethod; 457 458 @io.grpc.stub.annotations.RpcMethod( 459 fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", 460 requestType = com.google.iam.v1.TestIamPermissionsRequest.class, 461 responseType = com.google.iam.v1.TestIamPermissionsResponse.class, 462 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 463 public static io.grpc.MethodDescriptor< 464 com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> getTestIamPermissionsMethod()465 getTestIamPermissionsMethod() { 466 io.grpc.MethodDescriptor< 467 com.google.iam.v1.TestIamPermissionsRequest, 468 com.google.iam.v1.TestIamPermissionsResponse> 469 getTestIamPermissionsMethod; 470 if ((getTestIamPermissionsMethod = CloudBillingGrpc.getTestIamPermissionsMethod) == null) { 471 synchronized (CloudBillingGrpc.class) { 472 if ((getTestIamPermissionsMethod = CloudBillingGrpc.getTestIamPermissionsMethod) == null) { 473 CloudBillingGrpc.getTestIamPermissionsMethod = 474 getTestIamPermissionsMethod = 475 io.grpc.MethodDescriptor 476 .<com.google.iam.v1.TestIamPermissionsRequest, 477 com.google.iam.v1.TestIamPermissionsResponse> 478 newBuilder() 479 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 480 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) 481 .setSampledToLocalTracing(true) 482 .setRequestMarshaller( 483 io.grpc.protobuf.ProtoUtils.marshaller( 484 com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) 485 .setResponseMarshaller( 486 io.grpc.protobuf.ProtoUtils.marshaller( 487 com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) 488 .setSchemaDescriptor( 489 new CloudBillingMethodDescriptorSupplier("TestIamPermissions")) 490 .build(); 491 } 492 } 493 } 494 return getTestIamPermissionsMethod; 495 } 496 497 /** Creates a new async stub that supports all call types for the service */ newStub(io.grpc.Channel channel)498 public static CloudBillingStub newStub(io.grpc.Channel channel) { 499 io.grpc.stub.AbstractStub.StubFactory<CloudBillingStub> factory = 500 new io.grpc.stub.AbstractStub.StubFactory<CloudBillingStub>() { 501 @java.lang.Override 502 public CloudBillingStub newStub( 503 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 504 return new CloudBillingStub(channel, callOptions); 505 } 506 }; 507 return CloudBillingStub.newStub(factory, channel); 508 } 509 510 /** 511 * Creates a new blocking-style stub that supports unary and streaming output calls on the service 512 */ newBlockingStub(io.grpc.Channel channel)513 public static CloudBillingBlockingStub newBlockingStub(io.grpc.Channel channel) { 514 io.grpc.stub.AbstractStub.StubFactory<CloudBillingBlockingStub> factory = 515 new io.grpc.stub.AbstractStub.StubFactory<CloudBillingBlockingStub>() { 516 @java.lang.Override 517 public CloudBillingBlockingStub newStub( 518 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 519 return new CloudBillingBlockingStub(channel, callOptions); 520 } 521 }; 522 return CloudBillingBlockingStub.newStub(factory, channel); 523 } 524 525 /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ newFutureStub(io.grpc.Channel channel)526 public static CloudBillingFutureStub newFutureStub(io.grpc.Channel channel) { 527 io.grpc.stub.AbstractStub.StubFactory<CloudBillingFutureStub> factory = 528 new io.grpc.stub.AbstractStub.StubFactory<CloudBillingFutureStub>() { 529 @java.lang.Override 530 public CloudBillingFutureStub newStub( 531 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 532 return new CloudBillingFutureStub(channel, callOptions); 533 } 534 }; 535 return CloudBillingFutureStub.newStub(factory, channel); 536 } 537 538 /** 539 * 540 * 541 * <pre> 542 * Retrieves the Google Cloud Console billing accounts and associates them with 543 * projects. 544 * </pre> 545 */ 546 public interface AsyncService { 547 548 /** 549 * 550 * 551 * <pre> 552 * Gets information about a billing account. The current authenticated user 553 * must be a [viewer of the billing 554 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 555 * </pre> 556 */ getBillingAccount( com.google.cloud.billing.v1.GetBillingAccountRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver)557 default void getBillingAccount( 558 com.google.cloud.billing.v1.GetBillingAccountRequest request, 559 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver) { 560 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 561 getGetBillingAccountMethod(), responseObserver); 562 } 563 564 /** 565 * 566 * 567 * <pre> 568 * Lists the billing accounts that the current authenticated user has 569 * permission to 570 * [view](https://cloud.google.com/billing/docs/how-to/billing-access). 571 * </pre> 572 */ listBillingAccounts( com.google.cloud.billing.v1.ListBillingAccountsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListBillingAccountsResponse> responseObserver)573 default void listBillingAccounts( 574 com.google.cloud.billing.v1.ListBillingAccountsRequest request, 575 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListBillingAccountsResponse> 576 responseObserver) { 577 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 578 getListBillingAccountsMethod(), responseObserver); 579 } 580 581 /** 582 * 583 * 584 * <pre> 585 * Updates a billing account's fields. 586 * Currently the only field that can be edited is `display_name`. 587 * The current authenticated user must have the `billing.accounts.update` 588 * IAM permission, which is typically given to the 589 * [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) 590 * of the billing account. 591 * </pre> 592 */ updateBillingAccount( com.google.cloud.billing.v1.UpdateBillingAccountRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver)593 default void updateBillingAccount( 594 com.google.cloud.billing.v1.UpdateBillingAccountRequest request, 595 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver) { 596 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 597 getUpdateBillingAccountMethod(), responseObserver); 598 } 599 600 /** 601 * 602 * 603 * <pre> 604 * This method creates [billing 605 * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). 606 * Google Cloud resellers should use the 607 * Channel Services APIs, 608 * [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) 609 * and 610 * [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). 611 * When creating a subaccount, the current authenticated user must have the 612 * `billing.accounts.update` IAM permission on the parent account, which is 613 * typically given to billing account 614 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 615 * This method will return an error if the parent account has not been 616 * provisioned as a reseller account. 617 * </pre> 618 */ createBillingAccount( com.google.cloud.billing.v1.CreateBillingAccountRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver)619 default void createBillingAccount( 620 com.google.cloud.billing.v1.CreateBillingAccountRequest request, 621 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver) { 622 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 623 getCreateBillingAccountMethod(), responseObserver); 624 } 625 626 /** 627 * 628 * 629 * <pre> 630 * Lists the projects associated with a billing account. The current 631 * authenticated user must have the `billing.resourceAssociations.list` IAM 632 * permission, which is often given to billing account 633 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 634 * </pre> 635 */ listProjectBillingInfo( com.google.cloud.billing.v1.ListProjectBillingInfoRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListProjectBillingInfoResponse> responseObserver)636 default void listProjectBillingInfo( 637 com.google.cloud.billing.v1.ListProjectBillingInfoRequest request, 638 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListProjectBillingInfoResponse> 639 responseObserver) { 640 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 641 getListProjectBillingInfoMethod(), responseObserver); 642 } 643 644 /** 645 * 646 * 647 * <pre> 648 * Gets the billing information for a project. The current authenticated user 649 * must have the `resourcemanager.projects.get` permission for the project, 650 * which can be granted by assigning the [Project 651 * Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) 652 * role. 653 * </pre> 654 */ getProjectBillingInfo( com.google.cloud.billing.v1.GetProjectBillingInfoRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> responseObserver)655 default void getProjectBillingInfo( 656 com.google.cloud.billing.v1.GetProjectBillingInfoRequest request, 657 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> 658 responseObserver) { 659 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 660 getGetProjectBillingInfoMethod(), responseObserver); 661 } 662 663 /** 664 * 665 * 666 * <pre> 667 * Sets or updates the billing account associated with a project. You specify 668 * the new billing account by setting the `billing_account_name` in the 669 * `ProjectBillingInfo` resource to the resource name of a billing account. 670 * Associating a project with an open billing account enables billing on the 671 * project and allows charges for resource usage. If the project already had a 672 * billing account, this method changes the billing account used for resource 673 * usage charges. 674 * *Note:* Incurred charges that have not yet been reported in the transaction 675 * history of the Google Cloud Console might be billed to the new billing 676 * account, even if the charge occurred before the new billing account was 677 * assigned to the project. 678 * The current authenticated user must have ownership privileges for both the 679 * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo 680 * ) and the [billing 681 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 682 * You can disable billing on the project by setting the 683 * `billing_account_name` field to empty. This action disassociates the 684 * current billing account from the project. Any billable activity of your 685 * in-use services will stop, and your application could stop functioning as 686 * expected. Any unbilled charges to date will be billed to the previously 687 * associated account. The current authenticated user must be either an owner 688 * of the project or an owner of the billing account for the project. 689 * Note that associating a project with a *closed* billing account will have 690 * much the same effect as disabling billing on the project: any paid 691 * resources used by the project will be shut down. Thus, unless you wish to 692 * disable billing, you should always call this method with the name of an 693 * *open* billing account. 694 * </pre> 695 */ updateProjectBillingInfo( com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> responseObserver)696 default void updateProjectBillingInfo( 697 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request, 698 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> 699 responseObserver) { 700 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 701 getUpdateProjectBillingInfoMethod(), responseObserver); 702 } 703 704 /** 705 * 706 * 707 * <pre> 708 * Gets the access control policy for a billing account. 709 * The caller must have the `billing.accounts.getIamPolicy` permission on the 710 * account, which is often given to billing account 711 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 712 * </pre> 713 */ getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)714 default void getIamPolicy( 715 com.google.iam.v1.GetIamPolicyRequest request, 716 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 717 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 718 getGetIamPolicyMethod(), responseObserver); 719 } 720 721 /** 722 * 723 * 724 * <pre> 725 * Sets the access control policy for a billing account. Replaces any existing 726 * policy. 727 * The caller must have the `billing.accounts.setIamPolicy` permission on the 728 * account, which is often given to billing account 729 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 730 * </pre> 731 */ setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)732 default void setIamPolicy( 733 com.google.iam.v1.SetIamPolicyRequest request, 734 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 735 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 736 getSetIamPolicyMethod(), responseObserver); 737 } 738 739 /** 740 * 741 * 742 * <pre> 743 * Tests the access control policy for a billing account. This method takes 744 * the resource and a set of permissions as input and returns the subset of 745 * the input permissions that the caller is allowed for that resource. 746 * </pre> 747 */ testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver)748 default void testIamPermissions( 749 com.google.iam.v1.TestIamPermissionsRequest request, 750 io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> 751 responseObserver) { 752 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 753 getTestIamPermissionsMethod(), responseObserver); 754 } 755 } 756 757 /** 758 * Base class for the server implementation of the service CloudBilling. 759 * 760 * <pre> 761 * Retrieves the Google Cloud Console billing accounts and associates them with 762 * projects. 763 * </pre> 764 */ 765 public abstract static class CloudBillingImplBase 766 implements io.grpc.BindableService, AsyncService { 767 768 @java.lang.Override bindService()769 public final io.grpc.ServerServiceDefinition bindService() { 770 return CloudBillingGrpc.bindService(this); 771 } 772 } 773 774 /** 775 * A stub to allow clients to do asynchronous rpc calls to service CloudBilling. 776 * 777 * <pre> 778 * Retrieves the Google Cloud Console billing accounts and associates them with 779 * projects. 780 * </pre> 781 */ 782 public static final class CloudBillingStub 783 extends io.grpc.stub.AbstractAsyncStub<CloudBillingStub> { CloudBillingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)784 private CloudBillingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 785 super(channel, callOptions); 786 } 787 788 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)789 protected CloudBillingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 790 return new CloudBillingStub(channel, callOptions); 791 } 792 793 /** 794 * 795 * 796 * <pre> 797 * Gets information about a billing account. The current authenticated user 798 * must be a [viewer of the billing 799 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 800 * </pre> 801 */ getBillingAccount( com.google.cloud.billing.v1.GetBillingAccountRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver)802 public void getBillingAccount( 803 com.google.cloud.billing.v1.GetBillingAccountRequest request, 804 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver) { 805 io.grpc.stub.ClientCalls.asyncUnaryCall( 806 getChannel().newCall(getGetBillingAccountMethod(), getCallOptions()), 807 request, 808 responseObserver); 809 } 810 811 /** 812 * 813 * 814 * <pre> 815 * Lists the billing accounts that the current authenticated user has 816 * permission to 817 * [view](https://cloud.google.com/billing/docs/how-to/billing-access). 818 * </pre> 819 */ listBillingAccounts( com.google.cloud.billing.v1.ListBillingAccountsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListBillingAccountsResponse> responseObserver)820 public void listBillingAccounts( 821 com.google.cloud.billing.v1.ListBillingAccountsRequest request, 822 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListBillingAccountsResponse> 823 responseObserver) { 824 io.grpc.stub.ClientCalls.asyncUnaryCall( 825 getChannel().newCall(getListBillingAccountsMethod(), getCallOptions()), 826 request, 827 responseObserver); 828 } 829 830 /** 831 * 832 * 833 * <pre> 834 * Updates a billing account's fields. 835 * Currently the only field that can be edited is `display_name`. 836 * The current authenticated user must have the `billing.accounts.update` 837 * IAM permission, which is typically given to the 838 * [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) 839 * of the billing account. 840 * </pre> 841 */ updateBillingAccount( com.google.cloud.billing.v1.UpdateBillingAccountRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver)842 public void updateBillingAccount( 843 com.google.cloud.billing.v1.UpdateBillingAccountRequest request, 844 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver) { 845 io.grpc.stub.ClientCalls.asyncUnaryCall( 846 getChannel().newCall(getUpdateBillingAccountMethod(), getCallOptions()), 847 request, 848 responseObserver); 849 } 850 851 /** 852 * 853 * 854 * <pre> 855 * This method creates [billing 856 * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). 857 * Google Cloud resellers should use the 858 * Channel Services APIs, 859 * [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) 860 * and 861 * [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). 862 * When creating a subaccount, the current authenticated user must have the 863 * `billing.accounts.update` IAM permission on the parent account, which is 864 * typically given to billing account 865 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 866 * This method will return an error if the parent account has not been 867 * provisioned as a reseller account. 868 * </pre> 869 */ createBillingAccount( com.google.cloud.billing.v1.CreateBillingAccountRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver)870 public void createBillingAccount( 871 com.google.cloud.billing.v1.CreateBillingAccountRequest request, 872 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount> responseObserver) { 873 io.grpc.stub.ClientCalls.asyncUnaryCall( 874 getChannel().newCall(getCreateBillingAccountMethod(), getCallOptions()), 875 request, 876 responseObserver); 877 } 878 879 /** 880 * 881 * 882 * <pre> 883 * Lists the projects associated with a billing account. The current 884 * authenticated user must have the `billing.resourceAssociations.list` IAM 885 * permission, which is often given to billing account 886 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 887 * </pre> 888 */ listProjectBillingInfo( com.google.cloud.billing.v1.ListProjectBillingInfoRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListProjectBillingInfoResponse> responseObserver)889 public void listProjectBillingInfo( 890 com.google.cloud.billing.v1.ListProjectBillingInfoRequest request, 891 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListProjectBillingInfoResponse> 892 responseObserver) { 893 io.grpc.stub.ClientCalls.asyncUnaryCall( 894 getChannel().newCall(getListProjectBillingInfoMethod(), getCallOptions()), 895 request, 896 responseObserver); 897 } 898 899 /** 900 * 901 * 902 * <pre> 903 * Gets the billing information for a project. The current authenticated user 904 * must have the `resourcemanager.projects.get` permission for the project, 905 * which can be granted by assigning the [Project 906 * Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) 907 * role. 908 * </pre> 909 */ getProjectBillingInfo( com.google.cloud.billing.v1.GetProjectBillingInfoRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> responseObserver)910 public void getProjectBillingInfo( 911 com.google.cloud.billing.v1.GetProjectBillingInfoRequest request, 912 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> 913 responseObserver) { 914 io.grpc.stub.ClientCalls.asyncUnaryCall( 915 getChannel().newCall(getGetProjectBillingInfoMethod(), getCallOptions()), 916 request, 917 responseObserver); 918 } 919 920 /** 921 * 922 * 923 * <pre> 924 * Sets or updates the billing account associated with a project. You specify 925 * the new billing account by setting the `billing_account_name` in the 926 * `ProjectBillingInfo` resource to the resource name of a billing account. 927 * Associating a project with an open billing account enables billing on the 928 * project and allows charges for resource usage. If the project already had a 929 * billing account, this method changes the billing account used for resource 930 * usage charges. 931 * *Note:* Incurred charges that have not yet been reported in the transaction 932 * history of the Google Cloud Console might be billed to the new billing 933 * account, even if the charge occurred before the new billing account was 934 * assigned to the project. 935 * The current authenticated user must have ownership privileges for both the 936 * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo 937 * ) and the [billing 938 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 939 * You can disable billing on the project by setting the 940 * `billing_account_name` field to empty. This action disassociates the 941 * current billing account from the project. Any billable activity of your 942 * in-use services will stop, and your application could stop functioning as 943 * expected. Any unbilled charges to date will be billed to the previously 944 * associated account. The current authenticated user must be either an owner 945 * of the project or an owner of the billing account for the project. 946 * Note that associating a project with a *closed* billing account will have 947 * much the same effect as disabling billing on the project: any paid 948 * resources used by the project will be shut down. Thus, unless you wish to 949 * disable billing, you should always call this method with the name of an 950 * *open* billing account. 951 * </pre> 952 */ updateProjectBillingInfo( com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request, io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> responseObserver)953 public void updateProjectBillingInfo( 954 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request, 955 io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo> 956 responseObserver) { 957 io.grpc.stub.ClientCalls.asyncUnaryCall( 958 getChannel().newCall(getUpdateProjectBillingInfoMethod(), getCallOptions()), 959 request, 960 responseObserver); 961 } 962 963 /** 964 * 965 * 966 * <pre> 967 * Gets the access control policy for a billing account. 968 * The caller must have the `billing.accounts.getIamPolicy` permission on the 969 * account, which is often given to billing account 970 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 971 * </pre> 972 */ getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)973 public void getIamPolicy( 974 com.google.iam.v1.GetIamPolicyRequest request, 975 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 976 io.grpc.stub.ClientCalls.asyncUnaryCall( 977 getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), 978 request, 979 responseObserver); 980 } 981 982 /** 983 * 984 * 985 * <pre> 986 * Sets the access control policy for a billing account. Replaces any existing 987 * policy. 988 * The caller must have the `billing.accounts.setIamPolicy` permission on the 989 * account, which is often given to billing account 990 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 991 * </pre> 992 */ setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)993 public void setIamPolicy( 994 com.google.iam.v1.SetIamPolicyRequest request, 995 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 996 io.grpc.stub.ClientCalls.asyncUnaryCall( 997 getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), 998 request, 999 responseObserver); 1000 } 1001 1002 /** 1003 * 1004 * 1005 * <pre> 1006 * Tests the access control policy for a billing account. This method takes 1007 * the resource and a set of permissions as input and returns the subset of 1008 * the input permissions that the caller is allowed for that resource. 1009 * </pre> 1010 */ testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver)1011 public void testIamPermissions( 1012 com.google.iam.v1.TestIamPermissionsRequest request, 1013 io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> 1014 responseObserver) { 1015 io.grpc.stub.ClientCalls.asyncUnaryCall( 1016 getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), 1017 request, 1018 responseObserver); 1019 } 1020 } 1021 1022 /** 1023 * A stub to allow clients to do synchronous rpc calls to service CloudBilling. 1024 * 1025 * <pre> 1026 * Retrieves the Google Cloud Console billing accounts and associates them with 1027 * projects. 1028 * </pre> 1029 */ 1030 public static final class CloudBillingBlockingStub 1031 extends io.grpc.stub.AbstractBlockingStub<CloudBillingBlockingStub> { CloudBillingBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1032 private CloudBillingBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1033 super(channel, callOptions); 1034 } 1035 1036 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)1037 protected CloudBillingBlockingStub build( 1038 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1039 return new CloudBillingBlockingStub(channel, callOptions); 1040 } 1041 1042 /** 1043 * 1044 * 1045 * <pre> 1046 * Gets information about a billing account. The current authenticated user 1047 * must be a [viewer of the billing 1048 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 1049 * </pre> 1050 */ getBillingAccount( com.google.cloud.billing.v1.GetBillingAccountRequest request)1051 public com.google.cloud.billing.v1.BillingAccount getBillingAccount( 1052 com.google.cloud.billing.v1.GetBillingAccountRequest request) { 1053 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1054 getChannel(), getGetBillingAccountMethod(), getCallOptions(), request); 1055 } 1056 1057 /** 1058 * 1059 * 1060 * <pre> 1061 * Lists the billing accounts that the current authenticated user has 1062 * permission to 1063 * [view](https://cloud.google.com/billing/docs/how-to/billing-access). 1064 * </pre> 1065 */ listBillingAccounts( com.google.cloud.billing.v1.ListBillingAccountsRequest request)1066 public com.google.cloud.billing.v1.ListBillingAccountsResponse listBillingAccounts( 1067 com.google.cloud.billing.v1.ListBillingAccountsRequest request) { 1068 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1069 getChannel(), getListBillingAccountsMethod(), getCallOptions(), request); 1070 } 1071 1072 /** 1073 * 1074 * 1075 * <pre> 1076 * Updates a billing account's fields. 1077 * Currently the only field that can be edited is `display_name`. 1078 * The current authenticated user must have the `billing.accounts.update` 1079 * IAM permission, which is typically given to the 1080 * [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) 1081 * of the billing account. 1082 * </pre> 1083 */ updateBillingAccount( com.google.cloud.billing.v1.UpdateBillingAccountRequest request)1084 public com.google.cloud.billing.v1.BillingAccount updateBillingAccount( 1085 com.google.cloud.billing.v1.UpdateBillingAccountRequest request) { 1086 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1087 getChannel(), getUpdateBillingAccountMethod(), getCallOptions(), request); 1088 } 1089 1090 /** 1091 * 1092 * 1093 * <pre> 1094 * This method creates [billing 1095 * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). 1096 * Google Cloud resellers should use the 1097 * Channel Services APIs, 1098 * [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) 1099 * and 1100 * [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). 1101 * When creating a subaccount, the current authenticated user must have the 1102 * `billing.accounts.update` IAM permission on the parent account, which is 1103 * typically given to billing account 1104 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 1105 * This method will return an error if the parent account has not been 1106 * provisioned as a reseller account. 1107 * </pre> 1108 */ createBillingAccount( com.google.cloud.billing.v1.CreateBillingAccountRequest request)1109 public com.google.cloud.billing.v1.BillingAccount createBillingAccount( 1110 com.google.cloud.billing.v1.CreateBillingAccountRequest request) { 1111 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1112 getChannel(), getCreateBillingAccountMethod(), getCallOptions(), request); 1113 } 1114 1115 /** 1116 * 1117 * 1118 * <pre> 1119 * Lists the projects associated with a billing account. The current 1120 * authenticated user must have the `billing.resourceAssociations.list` IAM 1121 * permission, which is often given to billing account 1122 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 1123 * </pre> 1124 */ listProjectBillingInfo( com.google.cloud.billing.v1.ListProjectBillingInfoRequest request)1125 public com.google.cloud.billing.v1.ListProjectBillingInfoResponse listProjectBillingInfo( 1126 com.google.cloud.billing.v1.ListProjectBillingInfoRequest request) { 1127 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1128 getChannel(), getListProjectBillingInfoMethod(), getCallOptions(), request); 1129 } 1130 1131 /** 1132 * 1133 * 1134 * <pre> 1135 * Gets the billing information for a project. The current authenticated user 1136 * must have the `resourcemanager.projects.get` permission for the project, 1137 * which can be granted by assigning the [Project 1138 * Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) 1139 * role. 1140 * </pre> 1141 */ getProjectBillingInfo( com.google.cloud.billing.v1.GetProjectBillingInfoRequest request)1142 public com.google.cloud.billing.v1.ProjectBillingInfo getProjectBillingInfo( 1143 com.google.cloud.billing.v1.GetProjectBillingInfoRequest request) { 1144 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1145 getChannel(), getGetProjectBillingInfoMethod(), getCallOptions(), request); 1146 } 1147 1148 /** 1149 * 1150 * 1151 * <pre> 1152 * Sets or updates the billing account associated with a project. You specify 1153 * the new billing account by setting the `billing_account_name` in the 1154 * `ProjectBillingInfo` resource to the resource name of a billing account. 1155 * Associating a project with an open billing account enables billing on the 1156 * project and allows charges for resource usage. If the project already had a 1157 * billing account, this method changes the billing account used for resource 1158 * usage charges. 1159 * *Note:* Incurred charges that have not yet been reported in the transaction 1160 * history of the Google Cloud Console might be billed to the new billing 1161 * account, even if the charge occurred before the new billing account was 1162 * assigned to the project. 1163 * The current authenticated user must have ownership privileges for both the 1164 * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo 1165 * ) and the [billing 1166 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 1167 * You can disable billing on the project by setting the 1168 * `billing_account_name` field to empty. This action disassociates the 1169 * current billing account from the project. Any billable activity of your 1170 * in-use services will stop, and your application could stop functioning as 1171 * expected. Any unbilled charges to date will be billed to the previously 1172 * associated account. The current authenticated user must be either an owner 1173 * of the project or an owner of the billing account for the project. 1174 * Note that associating a project with a *closed* billing account will have 1175 * much the same effect as disabling billing on the project: any paid 1176 * resources used by the project will be shut down. Thus, unless you wish to 1177 * disable billing, you should always call this method with the name of an 1178 * *open* billing account. 1179 * </pre> 1180 */ updateProjectBillingInfo( com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request)1181 public com.google.cloud.billing.v1.ProjectBillingInfo updateProjectBillingInfo( 1182 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request) { 1183 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1184 getChannel(), getUpdateProjectBillingInfoMethod(), getCallOptions(), request); 1185 } 1186 1187 /** 1188 * 1189 * 1190 * <pre> 1191 * Gets the access control policy for a billing account. 1192 * The caller must have the `billing.accounts.getIamPolicy` permission on the 1193 * account, which is often given to billing account 1194 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 1195 * </pre> 1196 */ getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)1197 public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { 1198 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1199 getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); 1200 } 1201 1202 /** 1203 * 1204 * 1205 * <pre> 1206 * Sets the access control policy for a billing account. Replaces any existing 1207 * policy. 1208 * The caller must have the `billing.accounts.setIamPolicy` permission on the 1209 * account, which is often given to billing account 1210 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 1211 * </pre> 1212 */ setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)1213 public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { 1214 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1215 getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); 1216 } 1217 1218 /** 1219 * 1220 * 1221 * <pre> 1222 * Tests the access control policy for a billing account. This method takes 1223 * the resource and a set of permissions as input and returns the subset of 1224 * the input permissions that the caller is allowed for that resource. 1225 * </pre> 1226 */ testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request)1227 public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( 1228 com.google.iam.v1.TestIamPermissionsRequest request) { 1229 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1230 getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); 1231 } 1232 } 1233 1234 /** 1235 * A stub to allow clients to do ListenableFuture-style rpc calls to service CloudBilling. 1236 * 1237 * <pre> 1238 * Retrieves the Google Cloud Console billing accounts and associates them with 1239 * projects. 1240 * </pre> 1241 */ 1242 public static final class CloudBillingFutureStub 1243 extends io.grpc.stub.AbstractFutureStub<CloudBillingFutureStub> { CloudBillingFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1244 private CloudBillingFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1245 super(channel, callOptions); 1246 } 1247 1248 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)1249 protected CloudBillingFutureStub build( 1250 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1251 return new CloudBillingFutureStub(channel, callOptions); 1252 } 1253 1254 /** 1255 * 1256 * 1257 * <pre> 1258 * Gets information about a billing account. The current authenticated user 1259 * must be a [viewer of the billing 1260 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 1261 * </pre> 1262 */ 1263 public com.google.common.util.concurrent.ListenableFuture< 1264 com.google.cloud.billing.v1.BillingAccount> getBillingAccount(com.google.cloud.billing.v1.GetBillingAccountRequest request)1265 getBillingAccount(com.google.cloud.billing.v1.GetBillingAccountRequest request) { 1266 return io.grpc.stub.ClientCalls.futureUnaryCall( 1267 getChannel().newCall(getGetBillingAccountMethod(), getCallOptions()), request); 1268 } 1269 1270 /** 1271 * 1272 * 1273 * <pre> 1274 * Lists the billing accounts that the current authenticated user has 1275 * permission to 1276 * [view](https://cloud.google.com/billing/docs/how-to/billing-access). 1277 * </pre> 1278 */ 1279 public com.google.common.util.concurrent.ListenableFuture< 1280 com.google.cloud.billing.v1.ListBillingAccountsResponse> listBillingAccounts(com.google.cloud.billing.v1.ListBillingAccountsRequest request)1281 listBillingAccounts(com.google.cloud.billing.v1.ListBillingAccountsRequest request) { 1282 return io.grpc.stub.ClientCalls.futureUnaryCall( 1283 getChannel().newCall(getListBillingAccountsMethod(), getCallOptions()), request); 1284 } 1285 1286 /** 1287 * 1288 * 1289 * <pre> 1290 * Updates a billing account's fields. 1291 * Currently the only field that can be edited is `display_name`. 1292 * The current authenticated user must have the `billing.accounts.update` 1293 * IAM permission, which is typically given to the 1294 * [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) 1295 * of the billing account. 1296 * </pre> 1297 */ 1298 public com.google.common.util.concurrent.ListenableFuture< 1299 com.google.cloud.billing.v1.BillingAccount> updateBillingAccount(com.google.cloud.billing.v1.UpdateBillingAccountRequest request)1300 updateBillingAccount(com.google.cloud.billing.v1.UpdateBillingAccountRequest request) { 1301 return io.grpc.stub.ClientCalls.futureUnaryCall( 1302 getChannel().newCall(getUpdateBillingAccountMethod(), getCallOptions()), request); 1303 } 1304 1305 /** 1306 * 1307 * 1308 * <pre> 1309 * This method creates [billing 1310 * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). 1311 * Google Cloud resellers should use the 1312 * Channel Services APIs, 1313 * [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) 1314 * and 1315 * [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). 1316 * When creating a subaccount, the current authenticated user must have the 1317 * `billing.accounts.update` IAM permission on the parent account, which is 1318 * typically given to billing account 1319 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 1320 * This method will return an error if the parent account has not been 1321 * provisioned as a reseller account. 1322 * </pre> 1323 */ 1324 public com.google.common.util.concurrent.ListenableFuture< 1325 com.google.cloud.billing.v1.BillingAccount> createBillingAccount(com.google.cloud.billing.v1.CreateBillingAccountRequest request)1326 createBillingAccount(com.google.cloud.billing.v1.CreateBillingAccountRequest request) { 1327 return io.grpc.stub.ClientCalls.futureUnaryCall( 1328 getChannel().newCall(getCreateBillingAccountMethod(), getCallOptions()), request); 1329 } 1330 1331 /** 1332 * 1333 * 1334 * <pre> 1335 * Lists the projects associated with a billing account. The current 1336 * authenticated user must have the `billing.resourceAssociations.list` IAM 1337 * permission, which is often given to billing account 1338 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 1339 * </pre> 1340 */ 1341 public com.google.common.util.concurrent.ListenableFuture< 1342 com.google.cloud.billing.v1.ListProjectBillingInfoResponse> listProjectBillingInfo(com.google.cloud.billing.v1.ListProjectBillingInfoRequest request)1343 listProjectBillingInfo(com.google.cloud.billing.v1.ListProjectBillingInfoRequest request) { 1344 return io.grpc.stub.ClientCalls.futureUnaryCall( 1345 getChannel().newCall(getListProjectBillingInfoMethod(), getCallOptions()), request); 1346 } 1347 1348 /** 1349 * 1350 * 1351 * <pre> 1352 * Gets the billing information for a project. The current authenticated user 1353 * must have the `resourcemanager.projects.get` permission for the project, 1354 * which can be granted by assigning the [Project 1355 * Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) 1356 * role. 1357 * </pre> 1358 */ 1359 public com.google.common.util.concurrent.ListenableFuture< 1360 com.google.cloud.billing.v1.ProjectBillingInfo> getProjectBillingInfo(com.google.cloud.billing.v1.GetProjectBillingInfoRequest request)1361 getProjectBillingInfo(com.google.cloud.billing.v1.GetProjectBillingInfoRequest request) { 1362 return io.grpc.stub.ClientCalls.futureUnaryCall( 1363 getChannel().newCall(getGetProjectBillingInfoMethod(), getCallOptions()), request); 1364 } 1365 1366 /** 1367 * 1368 * 1369 * <pre> 1370 * Sets or updates the billing account associated with a project. You specify 1371 * the new billing account by setting the `billing_account_name` in the 1372 * `ProjectBillingInfo` resource to the resource name of a billing account. 1373 * Associating a project with an open billing account enables billing on the 1374 * project and allows charges for resource usage. If the project already had a 1375 * billing account, this method changes the billing account used for resource 1376 * usage charges. 1377 * *Note:* Incurred charges that have not yet been reported in the transaction 1378 * history of the Google Cloud Console might be billed to the new billing 1379 * account, even if the charge occurred before the new billing account was 1380 * assigned to the project. 1381 * The current authenticated user must have ownership privileges for both the 1382 * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo 1383 * ) and the [billing 1384 * account](https://cloud.google.com/billing/docs/how-to/billing-access). 1385 * You can disable billing on the project by setting the 1386 * `billing_account_name` field to empty. This action disassociates the 1387 * current billing account from the project. Any billable activity of your 1388 * in-use services will stop, and your application could stop functioning as 1389 * expected. Any unbilled charges to date will be billed to the previously 1390 * associated account. The current authenticated user must be either an owner 1391 * of the project or an owner of the billing account for the project. 1392 * Note that associating a project with a *closed* billing account will have 1393 * much the same effect as disabling billing on the project: any paid 1394 * resources used by the project will be shut down. Thus, unless you wish to 1395 * disable billing, you should always call this method with the name of an 1396 * *open* billing account. 1397 * </pre> 1398 */ 1399 public com.google.common.util.concurrent.ListenableFuture< 1400 com.google.cloud.billing.v1.ProjectBillingInfo> updateProjectBillingInfo( com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request)1401 updateProjectBillingInfo( 1402 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest request) { 1403 return io.grpc.stub.ClientCalls.futureUnaryCall( 1404 getChannel().newCall(getUpdateProjectBillingInfoMethod(), getCallOptions()), request); 1405 } 1406 1407 /** 1408 * 1409 * 1410 * <pre> 1411 * Gets the access control policy for a billing account. 1412 * The caller must have the `billing.accounts.getIamPolicy` permission on the 1413 * account, which is often given to billing account 1414 * [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). 1415 * </pre> 1416 */ 1417 public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy> getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)1418 getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { 1419 return io.grpc.stub.ClientCalls.futureUnaryCall( 1420 getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); 1421 } 1422 1423 /** 1424 * 1425 * 1426 * <pre> 1427 * Sets the access control policy for a billing account. Replaces any existing 1428 * policy. 1429 * The caller must have the `billing.accounts.setIamPolicy` permission on the 1430 * account, which is often given to billing account 1431 * [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). 1432 * </pre> 1433 */ 1434 public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy> setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)1435 setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { 1436 return io.grpc.stub.ClientCalls.futureUnaryCall( 1437 getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); 1438 } 1439 1440 /** 1441 * 1442 * 1443 * <pre> 1444 * Tests the access control policy for a billing account. This method takes 1445 * the resource and a set of permissions as input and returns the subset of 1446 * the input permissions that the caller is allowed for that resource. 1447 * </pre> 1448 */ 1449 public com.google.common.util.concurrent.ListenableFuture< 1450 com.google.iam.v1.TestIamPermissionsResponse> testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)1451 testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { 1452 return io.grpc.stub.ClientCalls.futureUnaryCall( 1453 getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); 1454 } 1455 } 1456 1457 private static final int METHODID_GET_BILLING_ACCOUNT = 0; 1458 private static final int METHODID_LIST_BILLING_ACCOUNTS = 1; 1459 private static final int METHODID_UPDATE_BILLING_ACCOUNT = 2; 1460 private static final int METHODID_CREATE_BILLING_ACCOUNT = 3; 1461 private static final int METHODID_LIST_PROJECT_BILLING_INFO = 4; 1462 private static final int METHODID_GET_PROJECT_BILLING_INFO = 5; 1463 private static final int METHODID_UPDATE_PROJECT_BILLING_INFO = 6; 1464 private static final int METHODID_GET_IAM_POLICY = 7; 1465 private static final int METHODID_SET_IAM_POLICY = 8; 1466 private static final int METHODID_TEST_IAM_PERMISSIONS = 9; 1467 1468 private static final class MethodHandlers<Req, Resp> 1469 implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, 1470 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, 1471 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, 1472 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { 1473 private final AsyncService serviceImpl; 1474 private final int methodId; 1475 MethodHandlers(AsyncService serviceImpl, int methodId)1476 MethodHandlers(AsyncService serviceImpl, int methodId) { 1477 this.serviceImpl = serviceImpl; 1478 this.methodId = methodId; 1479 } 1480 1481 @java.lang.Override 1482 @java.lang.SuppressWarnings("unchecked") invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)1483 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { 1484 switch (methodId) { 1485 case METHODID_GET_BILLING_ACCOUNT: 1486 serviceImpl.getBillingAccount( 1487 (com.google.cloud.billing.v1.GetBillingAccountRequest) request, 1488 (io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount>) 1489 responseObserver); 1490 break; 1491 case METHODID_LIST_BILLING_ACCOUNTS: 1492 serviceImpl.listBillingAccounts( 1493 (com.google.cloud.billing.v1.ListBillingAccountsRequest) request, 1494 (io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ListBillingAccountsResponse>) 1495 responseObserver); 1496 break; 1497 case METHODID_UPDATE_BILLING_ACCOUNT: 1498 serviceImpl.updateBillingAccount( 1499 (com.google.cloud.billing.v1.UpdateBillingAccountRequest) request, 1500 (io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount>) 1501 responseObserver); 1502 break; 1503 case METHODID_CREATE_BILLING_ACCOUNT: 1504 serviceImpl.createBillingAccount( 1505 (com.google.cloud.billing.v1.CreateBillingAccountRequest) request, 1506 (io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.BillingAccount>) 1507 responseObserver); 1508 break; 1509 case METHODID_LIST_PROJECT_BILLING_INFO: 1510 serviceImpl.listProjectBillingInfo( 1511 (com.google.cloud.billing.v1.ListProjectBillingInfoRequest) request, 1512 (io.grpc.stub.StreamObserver< 1513 com.google.cloud.billing.v1.ListProjectBillingInfoResponse>) 1514 responseObserver); 1515 break; 1516 case METHODID_GET_PROJECT_BILLING_INFO: 1517 serviceImpl.getProjectBillingInfo( 1518 (com.google.cloud.billing.v1.GetProjectBillingInfoRequest) request, 1519 (io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo>) 1520 responseObserver); 1521 break; 1522 case METHODID_UPDATE_PROJECT_BILLING_INFO: 1523 serviceImpl.updateProjectBillingInfo( 1524 (com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest) request, 1525 (io.grpc.stub.StreamObserver<com.google.cloud.billing.v1.ProjectBillingInfo>) 1526 responseObserver); 1527 break; 1528 case METHODID_GET_IAM_POLICY: 1529 serviceImpl.getIamPolicy( 1530 (com.google.iam.v1.GetIamPolicyRequest) request, 1531 (io.grpc.stub.StreamObserver<com.google.iam.v1.Policy>) responseObserver); 1532 break; 1533 case METHODID_SET_IAM_POLICY: 1534 serviceImpl.setIamPolicy( 1535 (com.google.iam.v1.SetIamPolicyRequest) request, 1536 (io.grpc.stub.StreamObserver<com.google.iam.v1.Policy>) responseObserver); 1537 break; 1538 case METHODID_TEST_IAM_PERMISSIONS: 1539 serviceImpl.testIamPermissions( 1540 (com.google.iam.v1.TestIamPermissionsRequest) request, 1541 (io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>) 1542 responseObserver); 1543 break; 1544 default: 1545 throw new AssertionError(); 1546 } 1547 } 1548 1549 @java.lang.Override 1550 @java.lang.SuppressWarnings("unchecked") invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)1551 public io.grpc.stub.StreamObserver<Req> invoke( 1552 io.grpc.stub.StreamObserver<Resp> responseObserver) { 1553 switch (methodId) { 1554 default: 1555 throw new AssertionError(); 1556 } 1557 } 1558 } 1559 bindService(AsyncService service)1560 public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 1561 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 1562 .addMethod( 1563 getGetBillingAccountMethod(), 1564 io.grpc.stub.ServerCalls.asyncUnaryCall( 1565 new MethodHandlers< 1566 com.google.cloud.billing.v1.GetBillingAccountRequest, 1567 com.google.cloud.billing.v1.BillingAccount>( 1568 service, METHODID_GET_BILLING_ACCOUNT))) 1569 .addMethod( 1570 getListBillingAccountsMethod(), 1571 io.grpc.stub.ServerCalls.asyncUnaryCall( 1572 new MethodHandlers< 1573 com.google.cloud.billing.v1.ListBillingAccountsRequest, 1574 com.google.cloud.billing.v1.ListBillingAccountsResponse>( 1575 service, METHODID_LIST_BILLING_ACCOUNTS))) 1576 .addMethod( 1577 getUpdateBillingAccountMethod(), 1578 io.grpc.stub.ServerCalls.asyncUnaryCall( 1579 new MethodHandlers< 1580 com.google.cloud.billing.v1.UpdateBillingAccountRequest, 1581 com.google.cloud.billing.v1.BillingAccount>( 1582 service, METHODID_UPDATE_BILLING_ACCOUNT))) 1583 .addMethod( 1584 getCreateBillingAccountMethod(), 1585 io.grpc.stub.ServerCalls.asyncUnaryCall( 1586 new MethodHandlers< 1587 com.google.cloud.billing.v1.CreateBillingAccountRequest, 1588 com.google.cloud.billing.v1.BillingAccount>( 1589 service, METHODID_CREATE_BILLING_ACCOUNT))) 1590 .addMethod( 1591 getListProjectBillingInfoMethod(), 1592 io.grpc.stub.ServerCalls.asyncUnaryCall( 1593 new MethodHandlers< 1594 com.google.cloud.billing.v1.ListProjectBillingInfoRequest, 1595 com.google.cloud.billing.v1.ListProjectBillingInfoResponse>( 1596 service, METHODID_LIST_PROJECT_BILLING_INFO))) 1597 .addMethod( 1598 getGetProjectBillingInfoMethod(), 1599 io.grpc.stub.ServerCalls.asyncUnaryCall( 1600 new MethodHandlers< 1601 com.google.cloud.billing.v1.GetProjectBillingInfoRequest, 1602 com.google.cloud.billing.v1.ProjectBillingInfo>( 1603 service, METHODID_GET_PROJECT_BILLING_INFO))) 1604 .addMethod( 1605 getUpdateProjectBillingInfoMethod(), 1606 io.grpc.stub.ServerCalls.asyncUnaryCall( 1607 new MethodHandlers< 1608 com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest, 1609 com.google.cloud.billing.v1.ProjectBillingInfo>( 1610 service, METHODID_UPDATE_PROJECT_BILLING_INFO))) 1611 .addMethod( 1612 getGetIamPolicyMethod(), 1613 io.grpc.stub.ServerCalls.asyncUnaryCall( 1614 new MethodHandlers<com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>( 1615 service, METHODID_GET_IAM_POLICY))) 1616 .addMethod( 1617 getSetIamPolicyMethod(), 1618 io.grpc.stub.ServerCalls.asyncUnaryCall( 1619 new MethodHandlers<com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>( 1620 service, METHODID_SET_IAM_POLICY))) 1621 .addMethod( 1622 getTestIamPermissionsMethod(), 1623 io.grpc.stub.ServerCalls.asyncUnaryCall( 1624 new MethodHandlers< 1625 com.google.iam.v1.TestIamPermissionsRequest, 1626 com.google.iam.v1.TestIamPermissionsResponse>( 1627 service, METHODID_TEST_IAM_PERMISSIONS))) 1628 .build(); 1629 } 1630 1631 private abstract static class CloudBillingBaseDescriptorSupplier 1632 implements io.grpc.protobuf.ProtoFileDescriptorSupplier, 1633 io.grpc.protobuf.ProtoServiceDescriptorSupplier { CloudBillingBaseDescriptorSupplier()1634 CloudBillingBaseDescriptorSupplier() {} 1635 1636 @java.lang.Override getFileDescriptor()1637 public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 1638 return com.google.cloud.billing.v1.CloudBillingProto.getDescriptor(); 1639 } 1640 1641 @java.lang.Override getServiceDescriptor()1642 public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 1643 return getFileDescriptor().findServiceByName("CloudBilling"); 1644 } 1645 } 1646 1647 private static final class CloudBillingFileDescriptorSupplier 1648 extends CloudBillingBaseDescriptorSupplier { CloudBillingFileDescriptorSupplier()1649 CloudBillingFileDescriptorSupplier() {} 1650 } 1651 1652 private static final class CloudBillingMethodDescriptorSupplier 1653 extends CloudBillingBaseDescriptorSupplier 1654 implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 1655 private final String methodName; 1656 CloudBillingMethodDescriptorSupplier(String methodName)1657 CloudBillingMethodDescriptorSupplier(String methodName) { 1658 this.methodName = methodName; 1659 } 1660 1661 @java.lang.Override getMethodDescriptor()1662 public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 1663 return getServiceDescriptor().findMethodByName(methodName); 1664 } 1665 } 1666 1667 private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 1668 getServiceDescriptor()1669 public static io.grpc.ServiceDescriptor getServiceDescriptor() { 1670 io.grpc.ServiceDescriptor result = serviceDescriptor; 1671 if (result == null) { 1672 synchronized (CloudBillingGrpc.class) { 1673 result = serviceDescriptor; 1674 if (result == null) { 1675 serviceDescriptor = 1676 result = 1677 io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 1678 .setSchemaDescriptor(new CloudBillingFileDescriptorSupplier()) 1679 .addMethod(getGetBillingAccountMethod()) 1680 .addMethod(getListBillingAccountsMethod()) 1681 .addMethod(getUpdateBillingAccountMethod()) 1682 .addMethod(getCreateBillingAccountMethod()) 1683 .addMethod(getListProjectBillingInfoMethod()) 1684 .addMethod(getGetProjectBillingInfoMethod()) 1685 .addMethod(getUpdateProjectBillingInfoMethod()) 1686 .addMethod(getGetIamPolicyMethod()) 1687 .addMethod(getSetIamPolicyMethod()) 1688 .addMethod(getTestIamPermissionsMethod()) 1689 .build(); 1690 } 1691 } 1692 } 1693 return result; 1694 } 1695 } 1696