From 960c51b0407f26ace217ced707b8c08cf6591051 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 6 Dec 2022 19:57:49 +0000 Subject: [PATCH] feat: publishing TPU v2 API fix!: fix incorrect resource annotations for TPU v2alpha1 API PiperOrigin-RevId: 493327922 Source-Link: https://github.com/googleapis/googleapis/commit/93c3e0eb6b4a4063daa4c9f89c488058699efe2b Source-Link: https://github.com/googleapis/googleapis-gen/commit/4c018988e3571df80cde7923a1e6209fcf9197c7 Copy-Tag: eyJwIjoiamF2YS10cHUvLk93bEJvdC55YW1sIiwiaCI6IjRjMDE4OTg4ZTM1NzFkZjgwY2RlNzkyM2ExZTYyMDlmY2Y5MTk3YzcifQ== --- .../java/com/google/cloud/tpu/v1/TpuGrpc.java | 1463 ---- .../google/cloud/tpu/v2alpha1/TpuGrpc.java | 1721 ---- .../google/cloud/tpu/v1/CloudTpuProto.java | 513 -- .../tpu/v1/DeleteNodeRequestOrBuilder.java | 54 - .../GetAcceleratorTypeRequestOrBuilder.java | 54 - .../cloud/tpu/v1/GetNodeRequestOrBuilder.java | 54 - .../GetTensorFlowVersionRequestOrBuilder.java | 54 - .../tpu/v1/SchedulingConfigOrBuilder.java | 51 - .../tpu/v1/StartNodeRequestOrBuilder.java | 50 - .../tpu/v1/StopNodeRequestOrBuilder.java | 50 - .../v2alpha1/AcceleratorTypeOrBuilder.java | 75 - .../cloud/tpu/v2alpha1/CloudTpuProto.java | 741 -- .../v2alpha1/DeleteNodeRequestOrBuilder.java | 54 - ...nerateServiceIdentityRequestOrBuilder.java | 54 - .../GetAcceleratorTypeRequestOrBuilder.java | 54 - .../tpu/v2alpha1/GetNodeRequestOrBuilder.java | 54 - .../GetRuntimeVersionRequestOrBuilder.java | 54 - .../v2alpha1/SchedulingConfigOrBuilder.java | 51 - .../v2alpha1/ServiceIdentityOrBuilder.java | 50 - .../ShieldedInstanceConfigOrBuilder.java | 38 - .../v2alpha1/StartNodeRequestOrBuilder.java | 50 - .../v2alpha1/StopNodeRequestOrBuilder.java | 50 - .../com/google/cloud/tpu/v1/TpuClient.java | 0 .../com/google/cloud/tpu/v1/TpuSettings.java | 1 + .../google/cloud/tpu/v1/gapic_metadata.json | 0 .../com/google/cloud/tpu/v1/package-info.java | 0 .../tpu/v1/stub/GrpcTpuCallableFactory.java | 0 .../google/cloud/tpu/v1/stub/GrpcTpuStub.java | 1 + .../com/google/cloud/tpu/v1/stub/TpuStub.java | 0 .../cloud/tpu/v1/stub/TpuStubSettings.java | 0 .../google/cloud/tpu/v1/MockLocations.java | 0 .../cloud/tpu/v1/MockLocationsImpl.java | 0 .../java/com/google/cloud/tpu/v1/MockTpu.java | 0 .../com/google/cloud/tpu/v1/MockTpuImpl.java | 0 .../google/cloud/tpu/v1/TpuClientTest.java | 0 .../java/com/google/cloud/tpu/v1/TpuGrpc.java | 1168 +++ .../google/cloud/tpu/v1/AcceleratorType.java | 396 +- .../cloud/tpu/v1/AcceleratorTypeName.java | 0 .../tpu/v1/AcceleratorTypeOrBuilder.java | 36 +- .../google/cloud/tpu/v1/CloudTpuProto.java | 454 ++ .../cloud/tpu/v1/CreateNodeRequest.java | 499 +- .../tpu/v1/CreateNodeRequestOrBuilder.java | 52 +- .../cloud/tpu/v1/DeleteNodeRequest.java | 348 +- .../tpu/v1/DeleteNodeRequestOrBuilder.java | 29 + .../tpu/v1/GetAcceleratorTypeRequest.java | 355 +- .../GetAcceleratorTypeRequestOrBuilder.java | 29 + .../google/cloud/tpu/v1/GetNodeRequest.java | 341 +- .../cloud/tpu/v1/GetNodeRequestOrBuilder.java | 29 + .../tpu/v1/GetTensorFlowVersionRequest.java | 355 +- .../GetTensorFlowVersionRequestOrBuilder.java | 29 + .../tpu/v1/ListAcceleratorTypesRequest.java | 619 +- .../ListAcceleratorTypesRequestOrBuilder.java | 65 +- .../tpu/v1/ListAcceleratorTypesResponse.java | 581 +- ...ListAcceleratorTypesResponseOrBuilder.java | 63 +- .../google/cloud/tpu/v1/ListNodesRequest.java | 459 +- .../tpu/v1/ListNodesRequestOrBuilder.java | 47 +- .../cloud/tpu/v1/ListNodesResponse.java | 589 +- .../tpu/v1/ListNodesResponseOrBuilder.java | 64 +- .../tpu/v1/ListTensorFlowVersionsRequest.java | 622 +- ...istTensorFlowVersionsRequestOrBuilder.java | 65 +- .../v1/ListTensorFlowVersionsResponse.java | 573 +- ...stTensorFlowVersionsResponseOrBuilder.java | 63 +- .../com/google/cloud/tpu/v1/LocationName.java | 0 .../google/cloud/tpu/v1/NetworkEndpoint.java | 352 +- .../tpu/v1/NetworkEndpointOrBuilder.java | 30 +- .../java/com/google/cloud/tpu/v1/Node.java | 2667 +++---- .../com/google/cloud/tpu/v1/NodeName.java | 0 .../google/cloud/tpu/v1/NodeOrBuilder.java | 308 +- .../cloud/tpu/v1/OperationMetadata.java | 757 +- .../tpu/v1/OperationMetadataOrBuilder.java | 73 +- .../cloud/tpu/v1/ReimageNodeRequest.java | 399 +- .../tpu/v1/ReimageNodeRequestOrBuilder.java | 36 +- .../google/cloud/tpu/v1/SchedulingConfig.java | 317 +- .../tpu/v1/SchedulingConfigOrBuilder.java | 29 + .../google/cloud/tpu/v1/StartNodeRequest.java | 317 +- .../tpu/v1/StartNodeRequestOrBuilder.java | 29 + .../google/cloud/tpu/v1/StopNodeRequest.java | 317 +- .../tpu/v1/StopNodeRequestOrBuilder.java | 29 + .../java/com/google/cloud/tpu/v1/Symptom.java | 623 +- .../google/cloud/tpu/v1/SymptomOrBuilder.java | 50 +- .../cloud/tpu/v1/TensorFlowVersion.java | 399 +- .../cloud/tpu/v1/TensorFlowVersionName.java | 0 .../tpu/v1/TensorFlowVersionOrBuilder.java | 36 +- .../proto/google/cloud/tpu/v1/cloud_tpu.proto | 0 .../tpustubsettings/getnode/SyncGetNode.java | 0 .../SyncCreateSetCredentialsProvider.java | 0 .../v1/tpu/create/SyncCreateSetEndpoint.java | 0 .../v1/tpu/createnode/AsyncCreateNode.java | 0 .../v1/tpu/createnode/AsyncCreateNodeLRO.java | 0 .../tpu/v1/tpu/createnode/SyncCreateNode.java | 0 .../SyncCreateNodeLocationnameNodeString.java | 0 .../SyncCreateNodeStringNodeString.java | 0 .../v1/tpu/deletenode/AsyncDeleteNode.java | 0 .../v1/tpu/deletenode/AsyncDeleteNodeLRO.java | 0 .../tpu/v1/tpu/deletenode/SyncDeleteNode.java | 0 .../deletenode/SyncDeleteNodeNodename.java | 0 .../tpu/deletenode/SyncDeleteNodeString.java | 0 .../AsyncGetAcceleratorType.java | 0 .../SyncGetAcceleratorType.java | 0 ...GetAcceleratorTypeAcceleratortypename.java | 0 .../SyncGetAcceleratorTypeString.java | 0 .../v1/tpu/getlocation/AsyncGetLocation.java | 0 .../v1/tpu/getlocation/SyncGetLocation.java | 0 .../tpu/v1/tpu/getnode/AsyncGetNode.java | 0 .../cloud/tpu/v1/tpu/getnode/SyncGetNode.java | 0 .../v1/tpu/getnode/SyncGetNodeNodename.java | 0 .../tpu/v1/tpu/getnode/SyncGetNodeString.java | 0 .../AsyncGetTensorFlowVersion.java | 0 .../SyncGetTensorFlowVersion.java | 0 .../SyncGetTensorFlowVersionString.java | 0 ...ensorFlowVersionTensorflowversionname.java | 0 .../AsyncListAcceleratorTypes.java | 0 .../AsyncListAcceleratorTypesPaged.java | 0 .../SyncListAcceleratorTypes.java | 0 ...stAcceleratorTypesAcceleratortypename.java | 0 .../SyncListAcceleratorTypesString.java | 0 .../tpu/listlocations/AsyncListLocations.java | 0 .../AsyncListLocationsPaged.java | 0 .../tpu/listlocations/SyncListLocations.java | 0 .../tpu/v1/tpu/listnodes/AsyncListNodes.java | 0 .../v1/tpu/listnodes/AsyncListNodesPaged.java | 0 .../tpu/v1/tpu/listnodes/SyncListNodes.java | 0 .../listnodes/SyncListNodesLocationname.java | 0 .../v1/tpu/listnodes/SyncListNodesString.java | 0 .../AsyncListTensorFlowVersions.java | 0 .../AsyncListTensorFlowVersionsPaged.java | 0 .../SyncListTensorFlowVersions.java | 0 .../SyncListTensorFlowVersionsString.java | 0 ...nsorFlowVersionsTensorflowversionname.java | 0 .../v1/tpu/reimagenode/AsyncReimageNode.java | 0 .../tpu/reimagenode/AsyncReimageNodeLRO.java | 0 .../v1/tpu/reimagenode/SyncReimageNode.java | 0 .../tpu/v1/tpu/startnode/AsyncStartNode.java | 0 .../v1/tpu/startnode/AsyncStartNodeLRO.java | 0 .../tpu/v1/tpu/startnode/SyncStartNode.java | 0 .../tpu/v1/tpu/stopnode/AsyncStopNode.java | 0 .../tpu/v1/tpu/stopnode/AsyncStopNodeLRO.java | 0 .../tpu/v1/tpu/stopnode/SyncStopNode.java | 0 .../v1/tpusettings/getnode/SyncGetNode.java | 0 .../com/google/cloud/tpu/v2}/TpuClient.java | 383 +- .../com/google/cloud/tpu/v2}/TpuSettings.java | 68 +- .../google/cloud/tpu/v2}/gapic_metadata.json | 10 +- .../com/google/cloud/tpu/v2/package-info.java | 45 + .../tpu/v2/stub/GrpcTpuCallableFactory.java | 113 + .../cloud/tpu/v2}/stub/GrpcTpuStub.java | 159 +- .../v2/stub/HttpJsonTpuCallableFactory.java | 105 + .../cloud/tpu/v2/stub/HttpJsonTpuStub.java | 1118 +++ .../google/cloud/tpu/v2}/stub/TpuStub.java | 81 +- .../cloud/tpu/v2}/stub/TpuStubSettings.java | 230 +- .../google/cloud/tpu/v2/MockLocations.java | 59 + .../cloud/tpu/v2/MockLocationsImpl.java | 105 + .../java/com/google/cloud/tpu/v2/MockTpu.java | 59 + .../com/google/cloud/tpu/v2}/MockTpuImpl.java | 4 +- .../cloud/tpu/v2/TpuClientHttpJsonTest.java | 1406 ++++ .../google/cloud/tpu/v2}/TpuClientTest.java | 205 +- .../java/com/google/cloud/tpu/v2/TpuGrpc.java | 1340 ++++ .../google/cloud/tpu/v2/AcceleratorType.java | 739 ++ .../cloud/tpu/v2/AcceleratorTypeName.java | 227 + .../tpu/v2/AcceleratorTypeOrBuilder.java | 49 + .../com/google/cloud/tpu/v2/AccessConfig.java | 574 ++ .../cloud/tpu/v2/AccessConfigOrBuilder.java | 29 + .../com/google/cloud/tpu/v2/AttachedDisk.java | 869 ++ .../cloud/tpu/v2/AttachedDiskOrBuilder.java | 54 + .../google/cloud/tpu/v2/CloudTpuProto.java | 658 ++ .../cloud/tpu/v2/CreateNodeRequest.java | 969 +++ .../tpu/v2/CreateNodeRequestOrBuilder.java | 76 + .../cloud/tpu/v2/DeleteNodeRequest.java | 574 ++ .../tpu/v2/DeleteNodeRequestOrBuilder.java | 29 + .../v2/GenerateServiceIdentityRequest.java | 574 ++ ...nerateServiceIdentityRequestOrBuilder.java | 29 + .../v2/GenerateServiceIdentityResponse.java | 639 ++ ...erateServiceIdentityResponseOrBuilder.java | 36 + .../tpu/v2/GetAcceleratorTypeRequest.java | 574 ++ .../GetAcceleratorTypeRequestOrBuilder.java | 29 + .../tpu/v2/GetGuestAttributesRequest.java | 992 +++ .../GetGuestAttributesRequestOrBuilder.java | 94 + .../tpu/v2/GetGuestAttributesResponse.java | 852 ++ .../GetGuestAttributesResponseOrBuilder.java | 53 + .../google/cloud/tpu/v2/GetNodeRequest.java | 574 ++ .../cloud/tpu/v2/GetNodeRequestOrBuilder.java | 29 + .../tpu/v2/GetRuntimeVersionRequest.java | 574 ++ .../v2/GetRuntimeVersionRequestOrBuilder.java | 29 + .../google/cloud/tpu/v2/GuestAttributes.java | 818 ++ .../cloud/tpu/v2/GuestAttributesEntry.java | 904 +++ .../tpu/v2/GuestAttributesEntryOrBuilder.java | 69 + .../tpu/v2/GuestAttributesOrBuilder.java | 60 + .../cloud/tpu/v2/GuestAttributesValue.java | 852 ++ .../tpu/v2/GuestAttributesValueOrBuilder.java | 53 + .../tpu/v2/ListAcceleratorTypesRequest.java | 1149 +++ .../ListAcceleratorTypesRequestOrBuilder.java | 99 + .../tpu/v2/ListAcceleratorTypesResponse.java | 1255 +++ ...ListAcceleratorTypesResponseOrBuilder.java | 114 + .../google/cloud/tpu/v2/ListNodesRequest.java | 819 ++ .../tpu/v2/ListNodesRequestOrBuilder.java | 59 + .../cloud/tpu/v2/ListNodesResponse.java | 1255 +++ .../tpu/v2/ListNodesResponseOrBuilder.java | 114 + .../tpu/v2/ListRuntimeVersionsRequest.java | 1149 +++ .../ListRuntimeVersionsRequestOrBuilder.java | 99 + .../tpu/v2/ListRuntimeVersionsResponse.java | 1255 +++ .../ListRuntimeVersionsResponseOrBuilder.java | 114 + .../com/google/cloud/tpu/v2/LocationName.java | 192 + .../google/cloud/tpu/v2/NetworkConfig.java | 938 +++ .../cloud/tpu/v2/NetworkConfigOrBuilder.java | 79 + .../google/cloud/tpu/v2/NetworkEndpoint.java | 884 ++ .../tpu/v2/NetworkEndpointOrBuilder.java | 66 + .../java/com/google/cloud/tpu/v2/Node.java | 6036 ++++++++++++++ .../com/google/cloud/tpu/v2/NodeName.java | 217 + .../google/cloud/tpu/v2/NodeOrBuilder.java | 654 ++ .../cloud/tpu/v2/OperationMetadata.java | 1617 ++++ .../tpu/v2/OperationMetadataOrBuilder.java | 155 + .../google/cloud/tpu/v2/RuntimeVersion.java | 739 ++ .../cloud/tpu/v2/RuntimeVersionName.java | 227 + .../cloud/tpu/v2/RuntimeVersionOrBuilder.java | 49 + .../google/cloud/tpu/v2/SchedulingConfig.java | 571 ++ .../tpu/v2/SchedulingConfigOrBuilder.java | 29 + .../google/cloud/tpu/v2/ServiceAccount.java | 834 ++ .../cloud/tpu/v2/ServiceAccountOrBuilder.java | 76 + .../google/cloud/tpu/v2/ServiceIdentity.java | 574 ++ .../tpu/v2/ServiceIdentityOrBuilder.java | 29 + .../cloud/tpu/v2/ShieldedInstanceConfig.java | 490 ++ .../v2/ShieldedInstanceConfigOrBuilder.java | 19 + .../google/cloud/tpu/v2/StartNodeRequest.java | 574 ++ .../tpu/v2/StartNodeRequestOrBuilder.java | 29 + .../google/cloud/tpu/v2/StopNodeRequest.java | 574 ++ .../tpu/v2/StopNodeRequestOrBuilder.java | 29 + .../java/com/google/cloud/tpu/v2/Symptom.java | 1308 +++ .../google/cloud/tpu/v2/SymptomOrBuilder.java | 95 + .../cloud/tpu/v2/UpdateNodeRequest.java | 893 +++ .../tpu/v2/UpdateNodeRequestOrBuilder.java | 69 + .../google/cloud/tpu/v2}/cloud_tpu.proto | 216 +- .../tpustubsettings/getnode/SyncGetNode.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../v2/tpu/create/SyncCreateSetEndpoint.java | 40 + .../v2/tpu/createnode/AsyncCreateNode.java | 52 + .../v2/tpu/createnode/AsyncCreateNodeLRO.java | 53 + .../tpu/v2/tpu/createnode/SyncCreateNode.java | 48 + .../SyncCreateNodeLocationnameNodeString.java | 44 + .../SyncCreateNodeStringNodeString.java | 44 + .../v2/tpu/deletenode/AsyncDeleteNode.java | 49 + .../v2/tpu/deletenode/AsyncDeleteNodeLRO.java | 51 + .../tpu/v2/tpu/deletenode/SyncDeleteNode.java | 46 + .../deletenode/SyncDeleteNodeNodename.java | 42 + .../tpu/deletenode/SyncDeleteNodeString.java | 42 + .../AsyncGenerateServiceIdentity.java | 50 + .../SyncGenerateServiceIdentity.java | 46 + .../AsyncGetAcceleratorType.java | 52 + .../SyncGetAcceleratorType.java | 48 + ...GetAcceleratorTypeAcceleratortypename.java | 43 + .../SyncGetAcceleratorTypeString.java | 43 + .../AsyncGetGuestAttributes.java | 53 + .../SyncGetGuestAttributes.java | 49 + .../v2/tpu/getlocation/AsyncGetLocation.java | 45 + .../v2/tpu/getlocation/SyncGetLocation.java | 42 + .../tpu/v2/tpu/getnode/AsyncGetNode.java | 49 + .../cloud/tpu/v2/tpu/getnode/SyncGetNode.java | 46 + .../v2/tpu/getnode/SyncGetNodeNodename.java | 42 + .../tpu/v2/tpu/getnode/SyncGetNodeString.java | 42 + .../AsyncGetRuntimeVersion.java | 50 + .../SyncGetRuntimeVersion.java | 47 + ...ncGetRuntimeVersionRuntimeversionname.java | 43 + .../SyncGetRuntimeVersionString.java | 43 + .../AsyncListAcceleratorTypes.java | 56 + .../AsyncListAcceleratorTypesPaged.java | 64 + .../SyncListAcceleratorTypes.java | 52 + .../SyncListAcceleratorTypesLocationname.java | 44 + .../SyncListAcceleratorTypesString.java | 44 + .../tpu/listlocations/AsyncListLocations.java | 53 + .../AsyncListLocationsPaged.java | 61 + .../tpu/listlocations/SyncListLocations.java | 50 + .../tpu/v2/tpu/listnodes/AsyncListNodes.java | 53 + .../v2/tpu/listnodes/AsyncListNodesPaged.java | 61 + .../tpu/v2/tpu/listnodes/SyncListNodes.java | 50 + .../listnodes/SyncListNodesLocationname.java | 44 + .../v2/tpu/listnodes/SyncListNodesString.java | 44 + .../AsyncListRuntimeVersions.java | 56 + .../AsyncListRuntimeVersionsPaged.java | 64 + .../SyncListRuntimeVersions.java | 52 + .../SyncListRuntimeVersionsLocationname.java | 44 + .../SyncListRuntimeVersionsString.java | 44 + .../tpu/v2/tpu/startnode/AsyncStartNode.java | 49 + .../v2/tpu/startnode/AsyncStartNodeLRO.java | 51 + .../tpu/v2/tpu/startnode/SyncStartNode.java | 46 + .../tpu/v2/tpu/stopnode/AsyncStopNode.java | 49 + .../tpu/v2/tpu/stopnode/AsyncStopNodeLRO.java | 51 + .../tpu/v2/tpu/stopnode/SyncStopNode.java | 46 + .../v2/tpu/updatenode/AsyncUpdateNode.java | 51 + .../v2/tpu/updatenode/AsyncUpdateNodeLRO.java | 52 + .../tpu/v2/tpu/updatenode/SyncUpdateNode.java | 47 + .../SyncUpdateNodeNodeFieldmask.java | 43 + .../v2/tpusettings/getnode/SyncGetNode.java | 45 + .../google/cloud/tpu/v2alpha1/TpuClient.java | 3001 +++++++ .../cloud/tpu/v2alpha1/TpuSettings.java | 523 ++ .../cloud/tpu/v2alpha1/gapic_metadata.json | 78 + .../cloud/tpu/v2alpha1/package-info.java | 0 .../v2alpha1/stub/GrpcTpuCallableFactory.java | 0 .../cloud/tpu/v2alpha1/stub/GrpcTpuStub.java | 954 +++ .../cloud/tpu/v2alpha1/stub/TpuStub.java | 234 + .../tpu/v2alpha1/stub/TpuStubSettings.java | 1481 ++++ .../cloud/tpu/v2alpha1/MockLocations.java | 59 + .../cloud/tpu/v2alpha1/MockLocationsImpl.java | 105 + .../google/cloud/tpu/v2alpha1/MockTpu.java | 0 .../cloud/tpu/v2alpha1/MockTpuImpl.java | 438 + .../cloud/tpu/v2alpha1/TpuClientTest.java | 1727 ++++ .../google/cloud/tpu/v2alpha1/TpuGrpc.java | 1770 +++++ .../cloud/tpu/v2alpha1/AcceleratorType.java | 413 +- .../tpu/v2alpha1/AcceleratorTypeName.java | 0 .../v2alpha1/AcceleratorTypeOrBuilder.java | 49 + .../cloud/tpu/v2alpha1/AccessConfig.java | 320 +- .../tpu/v2alpha1/AccessConfigOrBuilder.java | 27 +- .../cloud/tpu/v2alpha1/AttachedDisk.java | 454 +- .../tpu/v2alpha1/AttachedDiskOrBuilder.java | 33 +- .../cloud/tpu/v2alpha1/CloudTpuProto.java | 1014 +++ .../cloud/tpu/v2alpha1/CreateNodeRequest.java | 700 +- .../v2alpha1/CreateNodeRequestOrBuilder.java | 81 +- .../v2alpha1/CreateQueuedResourceRequest.java | 1141 +++ .../CreateQueuedResourceRequestOrBuilder.java | 98 + .../cloud/tpu/v2alpha1/DeleteNodeRequest.java | 514 +- .../v2alpha1/DeleteNodeRequestOrBuilder.java | 49 + .../v2alpha1/DeleteQueuedResourceRequest.java | 739 ++ .../DeleteQueuedResourceRequestOrBuilder.java | 49 + .../GenerateServiceIdentityRequest.java | 374 +- ...nerateServiceIdentityRequestOrBuilder.java | 29 + .../GenerateServiceIdentityResponse.java | 356 +- ...erateServiceIdentityResponseOrBuilder.java | 26 +- .../v2alpha1/GetAcceleratorTypeRequest.java | 364 +- .../GetAcceleratorTypeRequestOrBuilder.java | 29 + .../v2alpha1/GetGuestAttributesRequest.java | 546 +- .../GetGuestAttributesRequestOrBuilder.java | 62 +- .../v2alpha1/GetGuestAttributesResponse.java | 393 +- .../GetGuestAttributesResponseOrBuilder.java | 36 +- .../cloud/tpu/v2alpha1/GetNodeRequest.java | 348 +- .../tpu/v2alpha1/GetNodeRequestOrBuilder.java | 29 + .../v2alpha1/GetQueuedResourceRequest.java | 574 ++ .../GetQueuedResourceRequestOrBuilder.java | 29 + .../v2alpha1/GetRuntimeVersionRequest.java | 364 +- .../GetRuntimeVersionRequestOrBuilder.java | 29 + .../cloud/tpu/v2alpha1/GuestAttributes.java | 406 +- .../tpu/v2alpha1/GuestAttributesEntry.java | 485 +- .../GuestAttributesEntryOrBuilder.java | 45 +- .../v2alpha1/GuestAttributesOrBuilder.java | 35 +- .../tpu/v2alpha1/GuestAttributesValue.java | 405 +- .../GuestAttributesValueOrBuilder.java | 36 +- .../v2alpha1/ListAcceleratorTypesRequest.java | 628 +- .../ListAcceleratorTypesRequestOrBuilder.java | 65 +- .../ListAcceleratorTypesResponse.java | 576 +- ...ListAcceleratorTypesResponseOrBuilder.java | 63 +- .../cloud/tpu/v2alpha1/ListNodesRequest.java | 462 +- .../v2alpha1/ListNodesRequestOrBuilder.java | 47 +- .../cloud/tpu/v2alpha1/ListNodesResponse.java | 590 +- .../v2alpha1/ListNodesResponseOrBuilder.java | 64 +- .../v2alpha1/ListQueuedResourcesRequest.java | 819 ++ .../ListQueuedResourcesRequestOrBuilder.java | 59 + .../v2alpha1/ListQueuedResourcesResponse.java | 1255 +++ .../ListQueuedResourcesResponseOrBuilder.java | 114 + .../v2alpha1/ListRuntimeVersionsRequest.java | 628 +- .../ListRuntimeVersionsRequestOrBuilder.java | 65 +- .../v2alpha1/ListRuntimeVersionsResponse.java | 575 +- .../ListRuntimeVersionsResponseOrBuilder.java | 63 +- .../cloud/tpu/v2alpha1/LocationName.java | 0 .../cloud/tpu/v2alpha1/NetworkConfig.java | 524 +- .../tpu/v2alpha1/NetworkConfigOrBuilder.java | 51 +- .../cloud/tpu/v2alpha1/NetworkEndpoint.java | 441 +- .../v2alpha1/NetworkEndpointOrBuilder.java | 38 +- .../com/google/cloud/tpu/v2alpha1/Node.java | 3258 +++----- .../google/cloud/tpu/v2alpha1/NodeName.java | 0 .../cloud/tpu/v2alpha1/NodeOrBuilder.java | 375 +- .../cloud/tpu/v2alpha1/OperationMetadata.java | 760 +- .../v2alpha1/OperationMetadataOrBuilder.java | 73 +- .../cloud/tpu/v2alpha1/QueuedResource.java | 7075 +++++++++++++++++ .../tpu/v2alpha1/QueuedResourceName.java | 227 + .../tpu/v2alpha1/QueuedResourceOrBuilder.java | 168 + .../tpu/v2alpha1/QueuedResourceState.java | 6463 +++++++++++++++ .../QueuedResourceStateOrBuilder.java | 246 + .../cloud/tpu/v2alpha1/RuntimeVersion.java | 399 +- .../tpu/v2alpha1/RuntimeVersionName.java | 0 .../tpu/v2alpha1/RuntimeVersionOrBuilder.java | 36 +- .../cloud/tpu/v2alpha1/SchedulingConfig.java | 320 +- .../v2alpha1/SchedulingConfigOrBuilder.java | 29 + .../cloud/tpu/v2alpha1/ServiceAccount.java | 427 +- .../tpu/v2alpha1/ServiceAccountOrBuilder.java | 45 +- .../cloud/tpu/v2alpha1/ServiceIdentity.java | 320 +- .../v2alpha1/ServiceIdentityOrBuilder.java | 29 + .../tpu/v2alpha1/ShieldedInstanceConfig.java | 289 +- .../ShieldedInstanceConfigOrBuilder.java | 19 + .../SimulateMaintenanceEventRequest.java | 853 ++ ...ulateMaintenanceEventRequestOrBuilder.java | 82 + .../cloud/tpu/v2alpha1/StartNodeRequest.java | 348 +- .../v2alpha1/StartNodeRequestOrBuilder.java | 29 + .../cloud/tpu/v2alpha1/StopNodeRequest.java | 348 +- .../v2alpha1/StopNodeRequestOrBuilder.java | 29 + .../google/cloud/tpu/v2alpha1/Symptom.java | 636 +- .../cloud/tpu/v2alpha1/SymptomOrBuilder.java | 50 +- .../cloud/tpu/v2alpha1/UpdateNodeRequest.java | 515 +- .../v2alpha1/UpdateNodeRequestOrBuilder.java | 61 +- .../google/cloud/tpu/v2alpha1/cloud_tpu.proto | 1169 +++ .../tpustubsettings/getnode/SyncGetNode.java | 0 .../SyncCreateSetCredentialsProvider.java | 0 .../tpu/create/SyncCreateSetEndpoint.java | 0 .../tpu/createnode/AsyncCreateNode.java | 1 + .../tpu/createnode/AsyncCreateNodeLRO.java | 1 + .../tpu/createnode/SyncCreateNode.java | 1 + .../SyncCreateNodeLocationnameNodeString.java | 0 .../SyncCreateNodeStringNodeString.java | 0 .../AsyncCreateQueuedResource.java | 53 + .../AsyncCreateQueuedResourceLRO.java | 54 + .../SyncCreateQueuedResource.java | 49 + ...ourceLocationnameQueuedresourceString.java | 45 + ...uedResourceStringQueuedresourceString.java | 45 + .../tpu/deletenode/AsyncDeleteNode.java | 3 +- .../tpu/deletenode/AsyncDeleteNodeLRO.java | 7 +- .../tpu/deletenode/SyncDeleteNode.java | 5 +- .../deletenode/SyncDeleteNodeNodename.java | 4 +- .../tpu/deletenode/SyncDeleteNodeString.java | 4 +- .../AsyncDeleteQueuedResource.java | 51 + .../AsyncDeleteQueuedResourceLRO.java | 53 + .../SyncDeleteQueuedResource.java | 48 + ...eleteQueuedResourceQueuedresourcename.java | 43 + .../SyncDeleteQueuedResourceString.java | 43 + .../AsyncGenerateServiceIdentity.java | 0 .../SyncGenerateServiceIdentity.java | 0 .../AsyncGetAcceleratorType.java | 0 .../SyncGetAcceleratorType.java | 0 ...GetAcceleratorTypeAcceleratortypename.java | 0 .../SyncGetAcceleratorTypeString.java | 0 .../AsyncGetGuestAttributes.java | 0 .../SyncGetGuestAttributes.java | 0 .../tpu/getlocation/AsyncGetLocation.java | 45 + .../tpu/getlocation/SyncGetLocation.java | 42 + .../v2alpha1/tpu/getnode/AsyncGetNode.java | 0 .../tpu/v2alpha1/tpu/getnode/SyncGetNode.java | 0 .../tpu/getnode/SyncGetNodeNodename.java | 0 .../tpu/getnode/SyncGetNodeString.java | 0 .../AsyncGetQueuedResource.java | 50 + .../SyncGetQueuedResource.java | 47 + ...ncGetQueuedResourceQueuedresourcename.java | 43 + .../SyncGetQueuedResourceString.java | 43 + .../AsyncGetRuntimeVersion.java | 0 .../SyncGetRuntimeVersion.java | 0 ...ncGetRuntimeVersionRuntimeversionname.java | 0 .../SyncGetRuntimeVersionString.java | 0 .../AsyncListAcceleratorTypes.java | 6 +- .../AsyncListAcceleratorTypesPaged.java | 6 +- .../SyncListAcceleratorTypes.java | 6 +- .../SyncListAcceleratorTypesLocationname.java | 15 +- .../SyncListAcceleratorTypesString.java | 5 +- .../tpu/listlocations/AsyncListLocations.java | 53 + .../AsyncListLocationsPaged.java | 61 + .../tpu/listlocations/SyncListLocations.java | 50 + .../tpu/listnodes/AsyncListNodes.java | 4 +- .../tpu/listnodes/AsyncListNodesPaged.java | 4 +- .../v2alpha1/tpu/listnodes/SyncListNodes.java | 4 +- .../listnodes/SyncListNodesLocationname.java | 14 +- .../tpu/listnodes/SyncListNodesString.java | 4 +- .../AsyncListQueuedResources.java | 54 + .../AsyncListQueuedResourcesPaged.java | 62 + .../SyncListQueuedResources.java | 50 + .../SyncListQueuedResourcesLocationname.java | 44 + .../SyncListQueuedResourcesString.java | 44 + .../AsyncListRuntimeVersions.java | 5 +- .../AsyncListRuntimeVersionsPaged.java | 5 +- .../SyncListRuntimeVersions.java | 5 +- .../SyncListRuntimeVersionsLocationname.java | 15 +- .../SyncListRuntimeVersionsString.java | 5 +- .../AsyncSimulateMaintenanceEvent.java | 52 + .../AsyncSimulateMaintenanceEventLRO.java | 53 + .../SyncSimulateMaintenanceEvent.java | 48 + .../tpu/startnode/AsyncStartNode.java | 6 +- .../tpu/startnode/AsyncStartNodeLRO.java | 6 +- .../v2alpha1/tpu/startnode/SyncStartNode.java | 6 +- .../v2alpha1/tpu/stopnode/AsyncStopNode.java | 6 +- .../tpu/stopnode/AsyncStopNodeLRO.java | 6 +- .../v2alpha1/tpu/stopnode/SyncStopNode.java | 6 +- .../tpu/updatenode/AsyncUpdateNode.java | 0 .../tpu/updatenode/AsyncUpdateNodeLRO.java | 0 .../tpu/updatenode/SyncUpdateNode.java | 0 .../SyncUpdateNodeNodeFieldmask.java | 0 .../tpusettings/getnode/SyncGetNode.java | 0 478 files changed, 95736 insertions(+), 25551 deletions(-) delete mode 100644 java-tpu/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java delete mode 100644 java-tpu/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java delete mode 100644 java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuClient.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuSettings.java (99%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/gapic_metadata.json (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/package-info.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuCallableFactory.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuStub.java (99%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStub.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStubSettings.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocations.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocationsImpl.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpu.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpuImpl.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/TpuClientTest.java (100%) create mode 100644 owl-bot-staging/java-tpu/v1/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorType.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeName.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeOrBuilder.java (51%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequest.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequestOrBuilder.java (57%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequest.java (60%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequest.java (61%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequest.java (61%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequest.java (61%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequest.java (67%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequestOrBuilder.java (57%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponse.java (73%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponseOrBuilder.java (70%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequest.java (65%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequestOrBuilder.java (50%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponse.java (71%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponseOrBuilder.java (67%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequest.java (67%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequestOrBuilder.java (57%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponse.java (73%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponseOrBuilder.java (70%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/LocationName.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpoint.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpointOrBuilder.java (51%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Node.java (70%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeName.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeOrBuilder.java (72%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadata.java (72%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadataOrBuilder.java (75%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequest.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequestOrBuilder.java (53%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfig.java (66%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequest.java (64%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequest.java (64%) create mode 100644 owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Symptom.java (71%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SymptomOrBuilder.java (71%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersion.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionName.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionOrBuilder.java (51%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/proto-google-cloud-tpu-v1/src/main/proto/google/cloud/tpu/v1/cloud_tpu.proto (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/stub/tpustubsettings/getnode/SyncGetNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetCredentialsProvider.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetEndpoint.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNodeLRO.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeStringNodeString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNodeLRO.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeNodename.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/AsyncGetAcceleratorType.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorType.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/AsyncGetLocation.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/SyncGetLocation.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/AsyncGetNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeNodename.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/AsyncGetTensorFlowVersion.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersion.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionTensorflowversionname.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocations.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocationsPaged.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/SyncListLocations.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodes.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodesPaged.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodes.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesLocationname.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersions.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersionsPaged.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersions.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsTensorflowversionname.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNodeLRO.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/SyncReimageNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNodeLRO.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/SyncStartNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNodeLRO.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/SyncStopNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v1}/samples/snippets/generated/com/google/cloud/tpu/v1/tpusettings/getnode/SyncGetNode.java (100%) rename {java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2}/TpuClient.java (84%) rename {java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2}/TpuSettings.java (85%) rename {java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2}/gapic_metadata.json (87%) create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/package-info.java create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/GrpcTpuCallableFactory.java rename {java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2}/stub/GrpcTpuStub.java (81%) create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuCallableFactory.java create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuStub.java rename {java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2}/stub/TpuStub.java (68%) rename {java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2}/stub/TpuStubSettings.java (82%) create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocations.java create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocationsImpl.java create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockTpu.java rename {java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2}/MockTpuImpl.java (99%) create mode 100644 owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/TpuClientHttpJsonTest.java rename {java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2}/TpuClientTest.java (88%) create mode 100644 owl-bot-staging/java-tpu/v2/grpc-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/TpuGrpc.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorType.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeName.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfig.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfigOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDisk.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDiskOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CloudTpuProto.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CreateNodeRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CreateNodeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponse.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponseOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponse.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributes.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntry.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntryOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValue.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValueOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponse.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponse.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponse.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/LocationName.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfig.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfigOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpoint.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpointOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Node.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeName.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadata.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersion.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionName.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfig.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfigOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccount.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccountOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentity.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentityOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfig.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfigOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Symptom.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SymptomOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequest.java create mode 100644 owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequestOrBuilder.java rename {java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1 => owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/proto/google/cloud/tpu/v2}/cloud_tpu.proto (81%) create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/stub/tpustubsettings/getnode/SyncGetNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNodeLRO.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeLocationnameNodeString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeStringNodeString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNodeLRO.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeNodename.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/AsyncGetAcceleratorType.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorType.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/AsyncGetGuestAttributes.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/SyncGetGuestAttributes.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/AsyncGetLocation.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/SyncGetLocation.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/AsyncGetNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeNodename.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/AsyncGetRuntimeVersion.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersion.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypes.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocations.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocationsPaged.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/SyncListLocations.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodes.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodesPaged.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodes.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesLocationname.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersions.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersions.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsString.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNodeLRO.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/SyncStartNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNodeLRO.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/SyncStopNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNodeLRO.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNode.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java create mode 100644 owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpusettings/getnode/SyncGetNode.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuClient.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuSettings.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/gapic_metadata.json rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/package-info.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuCallableFactory.java (100%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuStub.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStub.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStubSettings.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocations.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocationsImpl.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpu.java (100%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpuImpl.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/TpuClientTest.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorType.java (65%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeName.java (100%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfig.java (65%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfigOrBuilder.java (52%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDisk.java (68%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDiskOrBuilder.java (66%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequest.java (59%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequestOrBuilder.java (54%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequest.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequest.java (52%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequest.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequest.java (59%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponse.java (64%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponseOrBuilder.java (59%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequest.java (60%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequest.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequestOrBuilder.java (61%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponse.java (71%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponseOrBuilder.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequest.java (61%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequest.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequest.java (60%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributes.java (69%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntry.java (67%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntryOrBuilder.java (58%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesOrBuilder.java (69%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValue.java (70%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValueOrBuilder.java (65%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequest.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequestOrBuilder.java (57%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponse.java (72%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponseOrBuilder.java (71%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequest.java (65%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequestOrBuilder.java (50%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponse.java (71%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponseOrBuilder.java (69%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequest.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponse.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponseOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequest.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequestOrBuilder.java (57%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponse.java (72%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponseOrBuilder.java (70%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/LocationName.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfig.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfigOrBuilder.java (68%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpoint.java (69%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpointOrBuilder.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Node.java (69%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeName.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeOrBuilder.java (72%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadata.java (72%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadataOrBuilder.java (75%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResource.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceName.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceState.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceStateOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersion.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionName.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionOrBuilder.java (52%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfig.java (66%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccount.java (69%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccountOrBuilder.java (68%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentity.java (65%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfig.java (64%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequest.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequest.java (62%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequest.java (62%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Symptom.java (70%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SymptomOrBuilder.java (71%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequest.java (66%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequestOrBuilder.java (61%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1/cloud_tpu.proto rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/stub/tpustubsettings/getnode/SyncGetNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetCredentialsProvider.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetEndpoint.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNode.java (97%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNodeLRO.java (97%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNode.java (97%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeStringNodeString.java (100%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResource.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResourceLRO.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResource.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceLocationnameQueuedresourceString.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceStringQueuedresourceString.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNode.java (96%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNodeLRO.java (92%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNode.java (92%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeNodename.java (93%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeString.java (93%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResource.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResourceLRO.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResource.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceQueuedresourcename.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceString.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/AsyncGetAcceleratorType.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorType.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/AsyncGetGuestAttributes.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/SyncGetGuestAttributes.java (100%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/AsyncGetLocation.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/SyncGetLocation.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/AsyncGetNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeNodename.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeString.java (100%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/AsyncGetQueuedResource.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResource.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceQueuedresourcename.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceString.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/AsyncGetRuntimeVersion.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersion.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionString.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java (91%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java (92%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java (90%) rename java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java => owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java (72%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java (90%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocations.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocationsPaged.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/SyncListLocations.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodes.java (93%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodesPaged.java (94%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodes.java (93%) rename java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesNodename.java => owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesLocationname.java (77%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesString.java (92%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResources.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResourcesPaged.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResources.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesLocationname.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesString.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersions.java (92%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java (93%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersions.java (91%) rename java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsRuntimeversionname.java => owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java (73%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsString.java (90%) create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java create mode 100644 owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNode.java (88%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNodeLRO.java (89%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/SyncStartNode.java (87%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNode.java (88%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNodeLRO.java (89%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/SyncStopNode.java (87%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNodeLRO.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNode.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java (100%) rename {java-tpu => owl-bot-staging/java-tpu/v2alpha1}/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpusettings/getnode/SyncGetNode.java (100%) diff --git a/java-tpu/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java b/java-tpu/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java deleted file mode 100644 index 9820ab5a867f..000000000000 --- a/java-tpu/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java +++ /dev/null @@ -1,1463 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.tpu.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Manages TPU nodes and other resources
- * TPU API v1
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/tpu/v1/cloud_tpu.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class TpuGrpc { - - private TpuGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.tpu.v1.Tpu"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListNodesRequest, com.google.cloud.tpu.v1.ListNodesResponse> - getListNodesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNodes", - requestType = com.google.cloud.tpu.v1.ListNodesRequest.class, - responseType = com.google.cloud.tpu.v1.ListNodesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListNodesRequest, com.google.cloud.tpu.v1.ListNodesResponse> - getListNodesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListNodesRequest, com.google.cloud.tpu.v1.ListNodesResponse> - getListNodesMethod; - if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { - TpuGrpc.getListNodesMethod = - getListNodesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNodes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.ListNodesRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.ListNodesResponse.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListNodes")) - .build(); - } - } - } - return getListNodesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetNodeRequest, com.google.cloud.tpu.v1.Node> - getGetNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNode", - requestType = com.google.cloud.tpu.v1.GetNodeRequest.class, - responseType = com.google.cloud.tpu.v1.Node.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetNodeRequest, com.google.cloud.tpu.v1.Node> - getGetNodeMethod() { - io.grpc.MethodDescriptor - getGetNodeMethod; - if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { - TpuGrpc.getGetNodeMethod = - getGetNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.GetNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.Node.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetNode")) - .build(); - } - } - } - return getGetNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.CreateNodeRequest, com.google.longrunning.Operation> - getCreateNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNode", - requestType = com.google.cloud.tpu.v1.CreateNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.CreateNodeRequest, com.google.longrunning.Operation> - getCreateNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.CreateNodeRequest, com.google.longrunning.Operation> - getCreateNodeMethod; - if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { - TpuGrpc.getCreateNodeMethod = - getCreateNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.CreateNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("CreateNode")) - .build(); - } - } - } - return getCreateNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.DeleteNodeRequest, com.google.longrunning.Operation> - getDeleteNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteNode", - requestType = com.google.cloud.tpu.v1.DeleteNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.DeleteNodeRequest, com.google.longrunning.Operation> - getDeleteNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.DeleteNodeRequest, com.google.longrunning.Operation> - getDeleteNodeMethod; - if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { - TpuGrpc.getDeleteNodeMethod = - getDeleteNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.DeleteNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("DeleteNode")) - .build(); - } - } - } - return getDeleteNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ReimageNodeRequest, com.google.longrunning.Operation> - getReimageNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ReimageNode", - requestType = com.google.cloud.tpu.v1.ReimageNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ReimageNodeRequest, com.google.longrunning.Operation> - getReimageNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ReimageNodeRequest, com.google.longrunning.Operation> - getReimageNodeMethod; - if ((getReimageNodeMethod = TpuGrpc.getReimageNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getReimageNodeMethod = TpuGrpc.getReimageNodeMethod) == null) { - TpuGrpc.getReimageNodeMethod = - getReimageNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReimageNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.ReimageNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ReimageNode")) - .build(); - } - } - } - return getReimageNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.StopNodeRequest, com.google.longrunning.Operation> - getStopNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StopNode", - requestType = com.google.cloud.tpu.v1.StopNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.StopNodeRequest, com.google.longrunning.Operation> - getStopNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.StopNodeRequest, com.google.longrunning.Operation> - getStopNodeMethod; - if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { - TpuGrpc.getStopNodeMethod = - getStopNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.StopNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StopNode")) - .build(); - } - } - } - return getStopNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.StartNodeRequest, com.google.longrunning.Operation> - getStartNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StartNode", - requestType = com.google.cloud.tpu.v1.StartNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.StartNodeRequest, com.google.longrunning.Operation> - getStartNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.StartNodeRequest, com.google.longrunning.Operation> - getStartNodeMethod; - if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { - TpuGrpc.getStartNodeMethod = - getStartNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.StartNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StartNode")) - .build(); - } - } - } - return getStartNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest, - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse> - getListTensorFlowVersionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListTensorFlowVersions", - requestType = com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.class, - responseType = com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest, - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse> - getListTensorFlowVersionsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest, - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse> - getListTensorFlowVersionsMethod; - if ((getListTensorFlowVersionsMethod = TpuGrpc.getListTensorFlowVersionsMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getListTensorFlowVersionsMethod = TpuGrpc.getListTensorFlowVersionsMethod) == null) { - TpuGrpc.getListTensorFlowVersionsMethod = - getListTensorFlowVersionsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListTensorFlowVersions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new TpuMethodDescriptorSupplier("ListTensorFlowVersions")) - .build(); - } - } - } - return getListTensorFlowVersionsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest, - com.google.cloud.tpu.v1.TensorFlowVersion> - getGetTensorFlowVersionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTensorFlowVersion", - requestType = com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.class, - responseType = com.google.cloud.tpu.v1.TensorFlowVersion.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest, - com.google.cloud.tpu.v1.TensorFlowVersion> - getGetTensorFlowVersionMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest, - com.google.cloud.tpu.v1.TensorFlowVersion> - getGetTensorFlowVersionMethod; - if ((getGetTensorFlowVersionMethod = TpuGrpc.getGetTensorFlowVersionMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGetTensorFlowVersionMethod = TpuGrpc.getGetTensorFlowVersionMethod) == null) { - TpuGrpc.getGetTensorFlowVersionMethod = - getGetTensorFlowVersionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetTensorFlowVersion")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.TensorFlowVersion.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetTensorFlowVersion")) - .build(); - } - } - } - return getGetTensorFlowVersionMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse> - getListAcceleratorTypesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAcceleratorTypes", - requestType = com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.class, - responseType = com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse> - getListAcceleratorTypesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse> - getListAcceleratorTypesMethod; - if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { - TpuGrpc.getListAcceleratorTypesMethod = - getListAcceleratorTypesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListAcceleratorTypes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse - .getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListAcceleratorTypes")) - .build(); - } - } - } - return getListAcceleratorTypesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v1.AcceleratorType> - getGetAcceleratorTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAcceleratorType", - requestType = com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.class, - responseType = com.google.cloud.tpu.v1.AcceleratorType.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v1.AcceleratorType> - getGetAcceleratorTypeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v1.AcceleratorType> - getGetAcceleratorTypeMethod; - if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { - TpuGrpc.getGetAcceleratorTypeMethod = - getGetAcceleratorTypeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAcceleratorType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v1.AcceleratorType.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetAcceleratorType")) - .build(); - } - } - } - return getGetAcceleratorTypeMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static TpuStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TpuStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuStub(channel, callOptions); - } - }; - return TpuStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static TpuBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TpuBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuBlockingStub(channel, callOptions); - } - }; - return TpuBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static TpuFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TpuFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuFutureStub(channel, callOptions); - } - }; - return TpuFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v1
-   * 
- */ - public abstract static class TpuImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public void listNodes( - com.google.cloud.tpu.v1.ListNodesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public void getNode( - com.google.cloud.tpu.v1.GetNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public void createNode( - com.google.cloud.tpu.v1.CreateNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public void deleteNode( - com.google.cloud.tpu.v1.DeleteNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Reimages a node's OS.
-     * 
- */ - public void reimageNode( - com.google.cloud.tpu.v1.ReimageNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getReimageNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Stops a node, this operation is only available with single TPU nodes.
-     * 
- */ - public void stopNode( - com.google.cloud.tpu.v1.StopNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public void startNode( - com.google.cloud.tpu.v1.StartNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * List TensorFlow versions supported by this API.
-     * 
- */ - public void listTensorFlowVersions( - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListTensorFlowVersionsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets TensorFlow Version.
-     * 
- */ - public void getTensorFlowVersion( - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetTensorFlowVersionMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public void listAcceleratorTypes( - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAcceleratorTypesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public void getAcceleratorType( - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetAcceleratorTypeMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListNodesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.ListNodesRequest, - com.google.cloud.tpu.v1.ListNodesResponse>(this, METHODID_LIST_NODES))) - .addMethod( - getGetNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.GetNodeRequest, com.google.cloud.tpu.v1.Node>( - this, METHODID_GET_NODE))) - .addMethod( - getCreateNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.CreateNodeRequest, com.google.longrunning.Operation>( - this, METHODID_CREATE_NODE))) - .addMethod( - getDeleteNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.DeleteNodeRequest, com.google.longrunning.Operation>( - this, METHODID_DELETE_NODE))) - .addMethod( - getReimageNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.ReimageNodeRequest, com.google.longrunning.Operation>( - this, METHODID_REIMAGE_NODE))) - .addMethod( - getStopNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.StopNodeRequest, com.google.longrunning.Operation>( - this, METHODID_STOP_NODE))) - .addMethod( - getStartNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.StartNodeRequest, com.google.longrunning.Operation>( - this, METHODID_START_NODE))) - .addMethod( - getListTensorFlowVersionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest, - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse>( - this, METHODID_LIST_TENSOR_FLOW_VERSIONS))) - .addMethod( - getGetTensorFlowVersionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest, - com.google.cloud.tpu.v1.TensorFlowVersion>( - this, METHODID_GET_TENSOR_FLOW_VERSION))) - .addMethod( - getListAcceleratorTypesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse>( - this, METHODID_LIST_ACCELERATOR_TYPES))) - .addMethod( - getGetAcceleratorTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v1.AcceleratorType>( - this, METHODID_GET_ACCELERATOR_TYPE))) - .build(); - } - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v1
-   * 
- */ - public static final class TpuStub extends io.grpc.stub.AbstractAsyncStub { - private TpuStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TpuStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public void listNodes( - com.google.cloud.tpu.v1.ListNodesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNodesMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public void getNode( - com.google.cloud.tpu.v1.GetNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public void createNode( - com.google.cloud.tpu.v1.CreateNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public void deleteNode( - com.google.cloud.tpu.v1.DeleteNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Reimages a node's OS.
-     * 
- */ - public void reimageNode( - com.google.cloud.tpu.v1.ReimageNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getReimageNodeMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Stops a node, this operation is only available with single TPU nodes.
-     * 
- */ - public void stopNode( - com.google.cloud.tpu.v1.StopNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStopNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public void startNode( - com.google.cloud.tpu.v1.StartNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStartNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * List TensorFlow versions supported by this API.
-     * 
- */ - public void listTensorFlowVersions( - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListTensorFlowVersionsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets TensorFlow Version.
-     * 
- */ - public void getTensorFlowVersion( - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTensorFlowVersionMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public void listAcceleratorTypes( - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public void getAcceleratorType( - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v1
-   * 
- */ - public static final class TpuBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private TpuBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TpuBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public com.google.cloud.tpu.v1.ListNodesResponse listNodes( - com.google.cloud.tpu.v1.ListNodesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNodesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public com.google.cloud.tpu.v1.Node getNode(com.google.cloud.tpu.v1.GetNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public com.google.longrunning.Operation createNode( - com.google.cloud.tpu.v1.CreateNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public com.google.longrunning.Operation deleteNode( - com.google.cloud.tpu.v1.DeleteNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Reimages a node's OS.
-     * 
- */ - public com.google.longrunning.Operation reimageNode( - com.google.cloud.tpu.v1.ReimageNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getReimageNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Stops a node, this operation is only available with single TPU nodes.
-     * 
- */ - public com.google.longrunning.Operation stopNode( - com.google.cloud.tpu.v1.StopNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getStopNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public com.google.longrunning.Operation startNode( - com.google.cloud.tpu.v1.StartNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getStartNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * List TensorFlow versions supported by this API.
-     * 
- */ - public com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse listTensorFlowVersions( - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListTensorFlowVersionsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets TensorFlow Version.
-     * 
- */ - public com.google.cloud.tpu.v1.TensorFlowVersion getTensorFlowVersion( - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTensorFlowVersionMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public com.google.cloud.tpu.v1.ListAcceleratorTypesResponse listAcceleratorTypes( - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAcceleratorTypesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public com.google.cloud.tpu.v1.AcceleratorType getAcceleratorType( - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAcceleratorTypeMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v1
-   * 
- */ - public static final class TpuFutureStub extends io.grpc.stub.AbstractFutureStub { - private TpuFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TpuFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v1.ListNodesResponse> - listNodes(com.google.cloud.tpu.v1.ListNodesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNodesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getNode( - com.google.cloud.tpu.v1.GetNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createNode(com.google.cloud.tpu.v1.CreateNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteNode(com.google.cloud.tpu.v1.DeleteNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Reimages a node's OS.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - reimageNode(com.google.cloud.tpu.v1.ReimageNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getReimageNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Stops a node, this operation is only available with single TPU nodes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - stopNode(com.google.cloud.tpu.v1.StopNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getStopNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - startNode(com.google.cloud.tpu.v1.StartNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getStartNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * List TensorFlow versions supported by this API.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse> - listTensorFlowVersions(com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListTensorFlowVersionsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets TensorFlow Version.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v1.TensorFlowVersion> - getTensorFlowVersion(com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTensorFlowVersionMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse> - listAcceleratorTypes(com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v1.AcceleratorType> - getAcceleratorType(com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_NODES = 0; - private static final int METHODID_GET_NODE = 1; - private static final int METHODID_CREATE_NODE = 2; - private static final int METHODID_DELETE_NODE = 3; - private static final int METHODID_REIMAGE_NODE = 4; - private static final int METHODID_STOP_NODE = 5; - private static final int METHODID_START_NODE = 6; - private static final int METHODID_LIST_TENSOR_FLOW_VERSIONS = 7; - private static final int METHODID_GET_TENSOR_FLOW_VERSION = 8; - private static final int METHODID_LIST_ACCELERATOR_TYPES = 9; - private static final int METHODID_GET_ACCELERATOR_TYPE = 10; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final TpuImplBase serviceImpl; - private final int methodId; - - MethodHandlers(TpuImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_NODES: - serviceImpl.listNodes( - (com.google.cloud.tpu.v1.ListNodesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_NODE: - serviceImpl.getNode( - (com.google.cloud.tpu.v1.GetNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_NODE: - serviceImpl.createNode( - (com.google.cloud.tpu.v1.CreateNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_NODE: - serviceImpl.deleteNode( - (com.google.cloud.tpu.v1.DeleteNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REIMAGE_NODE: - serviceImpl.reimageNode( - (com.google.cloud.tpu.v1.ReimageNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_STOP_NODE: - serviceImpl.stopNode( - (com.google.cloud.tpu.v1.StopNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_START_NODE: - serviceImpl.startNode( - (com.google.cloud.tpu.v1.StartNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_TENSOR_FLOW_VERSIONS: - serviceImpl.listTensorFlowVersions( - (com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_TENSOR_FLOW_VERSION: - serviceImpl.getTensorFlowVersion( - (com.google.cloud.tpu.v1.GetTensorFlowVersionRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_ACCELERATOR_TYPES: - serviceImpl.listAcceleratorTypes( - (com.google.cloud.tpu.v1.ListAcceleratorTypesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_ACCELERATOR_TYPE: - serviceImpl.getAcceleratorType( - (com.google.cloud.tpu.v1.GetAcceleratorTypeRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class TpuBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - TpuBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Tpu"); - } - } - - private static final class TpuFileDescriptorSupplier extends TpuBaseDescriptorSupplier { - TpuFileDescriptorSupplier() {} - } - - private static final class TpuMethodDescriptorSupplier extends TpuBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - TpuMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (TpuGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new TpuFileDescriptorSupplier()) - .addMethod(getListNodesMethod()) - .addMethod(getGetNodeMethod()) - .addMethod(getCreateNodeMethod()) - .addMethod(getDeleteNodeMethod()) - .addMethod(getReimageNodeMethod()) - .addMethod(getStopNodeMethod()) - .addMethod(getStartNodeMethod()) - .addMethod(getListTensorFlowVersionsMethod()) - .addMethod(getGetTensorFlowVersionMethod()) - .addMethod(getListAcceleratorTypesMethod()) - .addMethod(getGetAcceleratorTypeMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-tpu/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java b/java-tpu/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java deleted file mode 100644 index 2482cf27aba1..000000000000 --- a/java-tpu/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java +++ /dev/null @@ -1,1721 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.tpu.v2alpha1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Manages TPU nodes and other resources
- * TPU API v2alpha1
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/tpu/v2alpha1/cloud_tpu.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class TpuGrpc { - - private TpuGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.tpu.v2alpha1.Tpu"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListNodesRequest, - com.google.cloud.tpu.v2alpha1.ListNodesResponse> - getListNodesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNodes", - requestType = com.google.cloud.tpu.v2alpha1.ListNodesRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.ListNodesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListNodesRequest, - com.google.cloud.tpu.v2alpha1.ListNodesResponse> - getListNodesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListNodesRequest, - com.google.cloud.tpu.v2alpha1.ListNodesResponse> - getListNodesMethod; - if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { - TpuGrpc.getListNodesMethod = - getListNodesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNodes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.ListNodesRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.ListNodesResponse.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListNodes")) - .build(); - } - } - } - return getListNodesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetNodeRequest, com.google.cloud.tpu.v2alpha1.Node> - getGetNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNode", - requestType = com.google.cloud.tpu.v2alpha1.GetNodeRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.Node.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetNodeRequest, com.google.cloud.tpu.v2alpha1.Node> - getGetNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetNodeRequest, com.google.cloud.tpu.v2alpha1.Node> - getGetNodeMethod; - if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { - TpuGrpc.getGetNodeMethod = - getGetNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.GetNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetNode")) - .build(); - } - } - } - return getGetNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.CreateNodeRequest, com.google.longrunning.Operation> - getCreateNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNode", - requestType = com.google.cloud.tpu.v2alpha1.CreateNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.CreateNodeRequest, com.google.longrunning.Operation> - getCreateNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.CreateNodeRequest, com.google.longrunning.Operation> - getCreateNodeMethod; - if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { - TpuGrpc.getCreateNodeMethod = - getCreateNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.CreateNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("CreateNode")) - .build(); - } - } - } - return getCreateNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest, com.google.longrunning.Operation> - getDeleteNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteNode", - requestType = com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest, com.google.longrunning.Operation> - getDeleteNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest, com.google.longrunning.Operation> - getDeleteNodeMethod; - if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { - TpuGrpc.getDeleteNodeMethod = - getDeleteNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("DeleteNode")) - .build(); - } - } - } - return getDeleteNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.StopNodeRequest, com.google.longrunning.Operation> - getStopNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StopNode", - requestType = com.google.cloud.tpu.v2alpha1.StopNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.StopNodeRequest, com.google.longrunning.Operation> - getStopNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.StopNodeRequest, com.google.longrunning.Operation> - getStopNodeMethod; - if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { - TpuGrpc.getStopNodeMethod = - getStopNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.StopNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StopNode")) - .build(); - } - } - } - return getStopNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.StartNodeRequest, com.google.longrunning.Operation> - getStartNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StartNode", - requestType = com.google.cloud.tpu.v2alpha1.StartNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.StartNodeRequest, com.google.longrunning.Operation> - getStartNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.StartNodeRequest, com.google.longrunning.Operation> - getStartNodeMethod; - if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { - TpuGrpc.getStartNodeMethod = - getStartNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.StartNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StartNode")) - .build(); - } - } - } - return getStartNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest, com.google.longrunning.Operation> - getUpdateNodeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateNode", - requestType = com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest, com.google.longrunning.Operation> - getUpdateNodeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest, com.google.longrunning.Operation> - getUpdateNodeMethod; - if ((getUpdateNodeMethod = TpuGrpc.getUpdateNodeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getUpdateNodeMethod = TpuGrpc.getUpdateNodeMethod) == null) { - TpuGrpc.getUpdateNodeMethod = - getUpdateNodeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNode")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("UpdateNode")) - .build(); - } - } - } - return getUpdateNodeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse> - getGenerateServiceIdentityMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GenerateServiceIdentity", - requestType = com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse> - getGenerateServiceIdentityMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse> - getGenerateServiceIdentityMethod; - if ((getGenerateServiceIdentityMethod = TpuGrpc.getGenerateServiceIdentityMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGenerateServiceIdentityMethod = TpuGrpc.getGenerateServiceIdentityMethod) == null) { - TpuGrpc.getGenerateServiceIdentityMethod = - getGenerateServiceIdentityMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GenerateServiceIdentity")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new TpuMethodDescriptorSupplier("GenerateServiceIdentity")) - .build(); - } - } - } - return getGenerateServiceIdentityMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse> - getListAcceleratorTypesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAcceleratorTypes", - requestType = com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse> - getListAcceleratorTypesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse> - getListAcceleratorTypesMethod; - if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { - TpuGrpc.getListAcceleratorTypesMethod = - getListAcceleratorTypesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListAcceleratorTypes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse - .getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListAcceleratorTypes")) - .build(); - } - } - } - return getListAcceleratorTypesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v2alpha1.AcceleratorType> - getGetAcceleratorTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAcceleratorType", - requestType = com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.AcceleratorType.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v2alpha1.AcceleratorType> - getGetAcceleratorTypeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v2alpha1.AcceleratorType> - getGetAcceleratorTypeMethod; - if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { - TpuGrpc.getGetAcceleratorTypeMethod = - getGetAcceleratorTypeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAcceleratorType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.AcceleratorType.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetAcceleratorType")) - .build(); - } - } - } - return getGetAcceleratorTypeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse> - getListRuntimeVersionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListRuntimeVersions", - requestType = com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse> - getListRuntimeVersionsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse> - getListRuntimeVersionsMethod; - if ((getListRuntimeVersionsMethod = TpuGrpc.getListRuntimeVersionsMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getListRuntimeVersionsMethod = TpuGrpc.getListRuntimeVersionsMethod) == null) { - TpuGrpc.getListRuntimeVersionsMethod = - getListRuntimeVersionsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListRuntimeVersions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListRuntimeVersions")) - .build(); - } - } - } - return getListRuntimeVersionsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest, - com.google.cloud.tpu.v2alpha1.RuntimeVersion> - getGetRuntimeVersionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetRuntimeVersion", - requestType = com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.RuntimeVersion.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest, - com.google.cloud.tpu.v2alpha1.RuntimeVersion> - getGetRuntimeVersionMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest, - com.google.cloud.tpu.v2alpha1.RuntimeVersion> - getGetRuntimeVersionMethod; - if ((getGetRuntimeVersionMethod = TpuGrpc.getGetRuntimeVersionMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGetRuntimeVersionMethod = TpuGrpc.getGetRuntimeVersionMethod) == null) { - TpuGrpc.getGetRuntimeVersionMethod = - getGetRuntimeVersionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRuntimeVersion")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.RuntimeVersion.getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetRuntimeVersion")) - .build(); - } - } - } - return getGetRuntimeVersionMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse> - getGetGuestAttributesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetGuestAttributes", - requestType = com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.class, - responseType = com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse> - getGetGuestAttributesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse> - getGetGuestAttributesMethod; - if ((getGetGuestAttributesMethod = TpuGrpc.getGetGuestAttributesMethod) == null) { - synchronized (TpuGrpc.class) { - if ((getGetGuestAttributesMethod = TpuGrpc.getGetGuestAttributesMethod) == null) { - TpuGrpc.getGetGuestAttributesMethod = - getGetGuestAttributesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGuestAttributes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse - .getDefaultInstance())) - .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetGuestAttributes")) - .build(); - } - } - } - return getGetGuestAttributesMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static TpuStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TpuStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuStub(channel, callOptions); - } - }; - return TpuStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static TpuBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TpuBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuBlockingStub(channel, callOptions); - } - }; - return TpuBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static TpuFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TpuFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuFutureStub(channel, callOptions); - } - }; - return TpuFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v2alpha1
-   * 
- */ - public abstract static class TpuImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public void listNodes( - com.google.cloud.tpu.v2alpha1.ListNodesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public void getNode( - com.google.cloud.tpu.v2alpha1.GetNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public void createNode( - com.google.cloud.tpu.v2alpha1.CreateNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public void deleteNode( - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Stops a node. This operation is only available with single TPU nodes.
-     * 
- */ - public void stopNode( - com.google.cloud.tpu.v2alpha1.StopNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public void startNode( - com.google.cloud.tpu.v2alpha1.StartNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the configurations of a node.
-     * 
- */ - public void updateNode( - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver); - } - - /** - * - * - *
-     * Generates the Cloud TPU service identity for the project.
-     * 
- */ - public void generateServiceIdentity( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGenerateServiceIdentityMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public void listAcceleratorTypes( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAcceleratorTypesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public void getAcceleratorType( - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetAcceleratorTypeMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists runtime versions supported by this API.
-     * 
- */ - public void listRuntimeVersions( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListRuntimeVersionsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a runtime version.
-     * 
- */ - public void getRuntimeVersion( - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetRuntimeVersionMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves the guest attributes for the node.
-     * 
- */ - public void getGuestAttributes( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetGuestAttributesMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListNodesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.ListNodesRequest, - com.google.cloud.tpu.v2alpha1.ListNodesResponse>(this, METHODID_LIST_NODES))) - .addMethod( - getGetNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.GetNodeRequest, - com.google.cloud.tpu.v2alpha1.Node>(this, METHODID_GET_NODE))) - .addMethod( - getCreateNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.CreateNodeRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_NODE))) - .addMethod( - getDeleteNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_NODE))) - .addMethod( - getStopNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.StopNodeRequest, - com.google.longrunning.Operation>(this, METHODID_STOP_NODE))) - .addMethod( - getStartNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.StartNodeRequest, - com.google.longrunning.Operation>(this, METHODID_START_NODE))) - .addMethod( - getUpdateNodeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest, - com.google.longrunning.Operation>(this, METHODID_UPDATE_NODE))) - .addMethod( - getGenerateServiceIdentityMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>( - this, METHODID_GENERATE_SERVICE_IDENTITY))) - .addMethod( - getListAcceleratorTypesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>( - this, METHODID_LIST_ACCELERATOR_TYPES))) - .addMethod( - getGetAcceleratorTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest, - com.google.cloud.tpu.v2alpha1.AcceleratorType>( - this, METHODID_GET_ACCELERATOR_TYPE))) - .addMethod( - getListRuntimeVersionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>( - this, METHODID_LIST_RUNTIME_VERSIONS))) - .addMethod( - getGetRuntimeVersionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest, - com.google.cloud.tpu.v2alpha1.RuntimeVersion>( - this, METHODID_GET_RUNTIME_VERSION))) - .addMethod( - getGetGuestAttributesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>( - this, METHODID_GET_GUEST_ATTRIBUTES))) - .build(); - } - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v2alpha1
-   * 
- */ - public static final class TpuStub extends io.grpc.stub.AbstractAsyncStub { - private TpuStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TpuStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public void listNodes( - com.google.cloud.tpu.v2alpha1.ListNodesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNodesMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public void getNode( - com.google.cloud.tpu.v2alpha1.GetNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public void createNode( - com.google.cloud.tpu.v2alpha1.CreateNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public void deleteNode( - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Stops a node. This operation is only available with single TPU nodes.
-     * 
- */ - public void stopNode( - com.google.cloud.tpu.v2alpha1.StopNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStopNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public void startNode( - com.google.cloud.tpu.v2alpha1.StartNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStartNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Updates the configurations of a node.
-     * 
- */ - public void updateNode( - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateNodeMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Generates the Cloud TPU service identity for the project.
-     * 
- */ - public void generateServiceIdentity( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGenerateServiceIdentityMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public void listAcceleratorTypes( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public void getAcceleratorType( - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists runtime versions supported by this API.
-     * 
- */ - public void listRuntimeVersions( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListRuntimeVersionsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a runtime version.
-     * 
- */ - public void getRuntimeVersion( - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves the guest attributes for the node.
-     * 
- */ - public void getGuestAttributes( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetGuestAttributesMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v2alpha1
-   * 
- */ - public static final class TpuBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private TpuBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TpuBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.ListNodesResponse listNodes( - com.google.cloud.tpu.v2alpha1.ListNodesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNodesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.Node getNode( - com.google.cloud.tpu.v2alpha1.GetNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public com.google.longrunning.Operation createNode( - com.google.cloud.tpu.v2alpha1.CreateNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public com.google.longrunning.Operation deleteNode( - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Stops a node. This operation is only available with single TPU nodes.
-     * 
- */ - public com.google.longrunning.Operation stopNode( - com.google.cloud.tpu.v2alpha1.StopNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getStopNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public com.google.longrunning.Operation startNode( - com.google.cloud.tpu.v2alpha1.StartNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getStartNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the configurations of a node.
-     * 
- */ - public com.google.longrunning.Operation updateNode( - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateNodeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Generates the Cloud TPU service identity for the project.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse generateServiceIdentity( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGenerateServiceIdentityMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse listAcceleratorTypes( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAcceleratorTypesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.AcceleratorType getAcceleratorType( - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAcceleratorTypeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists runtime versions supported by this API.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse listRuntimeVersions( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListRuntimeVersionsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a runtime version.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.RuntimeVersion getRuntimeVersion( - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetRuntimeVersionMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves the guest attributes for the node.
-     * 
- */ - public com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse getGuestAttributes( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetGuestAttributesMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Manages TPU nodes and other resources
-   * TPU API v2alpha1
-   * 
- */ - public static final class TpuFutureStub extends io.grpc.stub.AbstractFutureStub { - private TpuFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TpuFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TpuFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists nodes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v2alpha1.ListNodesResponse> - listNodes(com.google.cloud.tpu.v2alpha1.ListNodesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNodesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getNode(com.google.cloud.tpu.v2alpha1.GetNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createNode(com.google.cloud.tpu.v2alpha1.CreateNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteNode(com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Stops a node. This operation is only available with single TPU nodes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - stopNode(com.google.cloud.tpu.v2alpha1.StopNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getStopNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Starts a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - startNode(com.google.cloud.tpu.v2alpha1.StartNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getStartNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the configurations of a node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateNode(com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateNodeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Generates the Cloud TPU service identity for the project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse> - generateServiceIdentity( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGenerateServiceIdentityMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists accelerator types supported by this API.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse> - listAcceleratorTypes(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets AcceleratorType.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v2alpha1.AcceleratorType> - getAcceleratorType(com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists runtime versions supported by this API.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse> - listRuntimeVersions(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListRuntimeVersionsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a runtime version.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v2alpha1.RuntimeVersion> - getRuntimeVersion(com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves the guest attributes for the node.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse> - getGuestAttributes(com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetGuestAttributesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_NODES = 0; - private static final int METHODID_GET_NODE = 1; - private static final int METHODID_CREATE_NODE = 2; - private static final int METHODID_DELETE_NODE = 3; - private static final int METHODID_STOP_NODE = 4; - private static final int METHODID_START_NODE = 5; - private static final int METHODID_UPDATE_NODE = 6; - private static final int METHODID_GENERATE_SERVICE_IDENTITY = 7; - private static final int METHODID_LIST_ACCELERATOR_TYPES = 8; - private static final int METHODID_GET_ACCELERATOR_TYPE = 9; - private static final int METHODID_LIST_RUNTIME_VERSIONS = 10; - private static final int METHODID_GET_RUNTIME_VERSION = 11; - private static final int METHODID_GET_GUEST_ATTRIBUTES = 12; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final TpuImplBase serviceImpl; - private final int methodId; - - MethodHandlers(TpuImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_NODES: - serviceImpl.listNodes( - (com.google.cloud.tpu.v2alpha1.ListNodesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_NODE: - serviceImpl.getNode( - (com.google.cloud.tpu.v2alpha1.GetNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_NODE: - serviceImpl.createNode( - (com.google.cloud.tpu.v2alpha1.CreateNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_NODE: - serviceImpl.deleteNode( - (com.google.cloud.tpu.v2alpha1.DeleteNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_STOP_NODE: - serviceImpl.stopNode( - (com.google.cloud.tpu.v2alpha1.StopNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_START_NODE: - serviceImpl.startNode( - (com.google.cloud.tpu.v2alpha1.StartNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_NODE: - serviceImpl.updateNode( - (com.google.cloud.tpu.v2alpha1.UpdateNodeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GENERATE_SERVICE_IDENTITY: - serviceImpl.generateServiceIdentity( - (com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>) - responseObserver); - break; - case METHODID_LIST_ACCELERATOR_TYPES: - serviceImpl.listAcceleratorTypes( - (com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>) - responseObserver); - break; - case METHODID_GET_ACCELERATOR_TYPE: - serviceImpl.getAcceleratorType( - (com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_RUNTIME_VERSIONS: - serviceImpl.listRuntimeVersions( - (com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>) - responseObserver); - break; - case METHODID_GET_RUNTIME_VERSION: - serviceImpl.getRuntimeVersion( - (com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_GUEST_ATTRIBUTES: - serviceImpl.getGuestAttributes( - (com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class TpuBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - TpuBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Tpu"); - } - } - - private static final class TpuFileDescriptorSupplier extends TpuBaseDescriptorSupplier { - TpuFileDescriptorSupplier() {} - } - - private static final class TpuMethodDescriptorSupplier extends TpuBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - TpuMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (TpuGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new TpuFileDescriptorSupplier()) - .addMethod(getListNodesMethod()) - .addMethod(getGetNodeMethod()) - .addMethod(getCreateNodeMethod()) - .addMethod(getDeleteNodeMethod()) - .addMethod(getStopNodeMethod()) - .addMethod(getStartNodeMethod()) - .addMethod(getUpdateNodeMethod()) - .addMethod(getGenerateServiceIdentityMethod()) - .addMethod(getListAcceleratorTypesMethod()) - .addMethod(getGetAcceleratorTypeMethod()) - .addMethod(getListRuntimeVersionsMethod()) - .addMethod(getGetRuntimeVersionMethod()) - .addMethod(getGetGuestAttributesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java deleted file mode 100644 index f6a47cfdaf68..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java +++ /dev/null @@ -1,513 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public final class CloudTpuProto { - private CloudTpuProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_Node_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_Node_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v1_Symptom_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n#google/cloud/tpu/v1/cloud_tpu.proto\022\023g" - + "oogle.cloud.tpu.v1\032\034google/api/annotatio" - + "ns.proto\032\027google/api/client.proto\032\037googl" - + "e/api/field_behavior.proto\032\031google/api/r" - + "esource.proto\032#google/longrunning/operat" - + "ions.proto\032\037google/protobuf/timestamp.pr" - + "oto\"9\n\020SchedulingConfig\022\023\n\013preemptible\030\001" - + " \001(\010\022\020\n\010reserved\030\002 \001(\010\"3\n\017NetworkEndpoin" - + "t\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port\030\002 \001(\005\"\264\n\n\004" - + "Node\022\024\n\004name\030\001 \001(\tB\006\340A\005\340A\003\022\023\n\013descriptio" - + "n\030\003 \001(\t\022\035\n\020accelerator_type\030\005 \001(\tB\003\340A\002\022\026" - + "\n\nip_address\030\010 \001(\tB\002\030\001\022\020\n\004port\030\016 \001(\tB\002\030\001" - + "\0223\n\005state\030\t \001(\0162\037.google.cloud.tpu.v1.No" - + "de.StateB\003\340A\003\022\037\n\022health_description\030\n \001(" - + "\tB\003\340A\003\022\037\n\022tensorflow_version\030\013 \001(\tB\003\340A\002\022" - + "\017\n\007network\030\014 \001(\t\022\022\n\ncidr_block\030\r \001(\t\022\034\n\017" - + "service_account\030\017 \001(\tB\003\340A\003\0224\n\013create_tim" - + "e\030\020 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\022@\n\021scheduling_config\030\021 \001(\0132%.google.clo" - + "ud.tpu.v1.SchedulingConfig\022D\n\021network_en" - + "dpoints\030\025 \003(\0132$.google.cloud.tpu.v1.Netw" - + "orkEndpointB\003\340A\003\0220\n\006health\030\026 \001(\0162 .googl" - + "e.cloud.tpu.v1.Node.Health\0225\n\006labels\030\030 \003" - + "(\0132%.google.cloud.tpu.v1.Node.LabelsEntr" - + "y\022\036\n\026use_service_networking\030\033 \001(\010\022>\n\013api" - + "_version\030& \001(\0162$.google.cloud.tpu.v1.Nod" - + "e.ApiVersionB\003\340A\003\0223\n\010symptoms\030\' \003(\0132\034.go" - + "ogle.cloud.tpu.v1.SymptomB\003\340A\003\032-\n\013Labels" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\341\001" - + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATI" - + "NG\020\001\022\t\n\005READY\020\002\022\016\n\nRESTARTING\020\003\022\r\n\tREIMA" - + "GING\020\004\022\014\n\010DELETING\020\005\022\r\n\tREPAIRING\020\006\022\013\n\007S" - + "TOPPED\020\010\022\014\n\010STOPPING\020\t\022\014\n\010STARTING\020\n\022\r\n\t" - + "PREEMPTED\020\013\022\016\n\nTERMINATED\020\014\022\n\n\006HIDING\020\r\022" - + "\n\n\006HIDDEN\020\016\022\014\n\010UNHIDING\020\017\"\211\001\n\006Health\022\026\n\022" - + "HEALTH_UNSPECIFIED\020\000\022\013\n\007HEALTHY\020\001\022\030\n\024DEP" - + "RECATED_UNHEALTHY\020\002\022\013\n\007TIMEOUT\020\003\022\030\n\024UNHE" - + "ALTHY_TENSORFLOW\020\004\022\031\n\025UNHEALTHY_MAINTENA" - + "NCE\020\005\"O\n\nApiVersion\022\033\n\027API_VERSION_UNSPE" - + "CIFIED\020\000\022\r\n\tV1_ALPHA1\020\001\022\006\n\002V1\020\002\022\r\n\tV2_AL" - + "PHA1\020\003:R\352AO\n\027tpu.googleapis.com/Node\0224pr" - + "ojects/{project}/locations/{location}/no" - + "des/{node}\"j\n\020ListNodesRequest\022/\n\006parent" - + "\030\001 \001(\tB\037\340A\002\372A\031\022\027tpu.googleapis.com/Node\022" - + "\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k" - + "\n\021ListNodesResponse\022(\n\005nodes\030\001 \003(\0132\031.goo" - + "gle.cloud.tpu.v1.Node\022\027\n\017next_page_token" - + "\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"?\n\016GetNodeRe" - + "quest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googlea" - + "pis.com/Node\"\203\001\n\021CreateNodeRequest\022/\n\006pa" - + "rent\030\001 \001(\tB\037\340A\002\372A\031\022\027tpu.googleapis.com/N" - + "ode\022\017\n\007node_id\030\002 \001(\t\022,\n\004node\030\003 \001(\0132\031.goo" - + "gle.cloud.tpu.v1.NodeB\003\340A\002\"B\n\021DeleteNode" - + "Request\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googl" - + "eapis.com/Node\">\n\022ReimageNodeRequest\022\014\n\004" - + "name\030\001 \001(\t\022\032\n\022tensorflow_version\030\002 \001(\t\"\037" - + "\n\017StopNodeRequest\022\014\n\004name\030\001 \001(\t\" \n\020Start" - + "NodeRequest\022\014\n\004name\030\001 \001(\t\"\257\001\n\021TensorFlow" - + "Version\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 \001(\t:{" - + "\352Ax\n$tpu.googleapis.com/TensorFlowVersio" - + "n\022Pprojects/{project}/locations/{locatio" - + "n}/tensorFlowVersions/{tensor_flow_versi" - + "on}\"Y\n\033GetTensorFlowVersionRequest\022:\n\004na" - + "me\030\001 \001(\tB,\340A\002\372A&\n$tpu.googleapis.com/Ten" - + "sorFlowVersion\"\246\001\n\035ListTensorFlowVersion" - + "sRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$tpu.go" - + "ogleapis.com/TensorFlowVersion\022\021\n\tpage_s" - + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030" - + "\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\223\001\n\036ListTensorFl" - + "owVersionsResponse\022C\n\023tensorflow_version" - + "s\030\001 \003(\0132&.google.cloud.tpu.v1.TensorFlow" - + "Version\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" - + "achable\030\003 \003(\t\"\243\001\n\017AcceleratorType\022\014\n\004nam" - + "e\030\001 \001(\t\022\014\n\004type\030\002 \001(\t:t\352Aq\n\"tpu.googleap" - + "is.com/AcceleratorType\022Kprojects/{projec" - + "t}/locations/{location}/acceleratorTypes" - + "/{accelerator_type}\"U\n\031GetAcceleratorTyp" - + "eRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"tpu.goog" - + "leapis.com/AcceleratorType\"\242\001\n\033ListAccel" - + "eratorTypesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" - + "A$\n\"tpu.googleapis.com/AcceleratorType\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n" - + "\006filter\030\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\215\001\n\034List" - + "AcceleratorTypesResponse\022?\n\021accelerator_" - + "types\030\001 \003(\0132$.google.cloud.tpu.v1.Accele" - + "ratorType\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013un" - + "reachable\030\003 \003(\t\"\326\001\n\021OperationMetadata\022/\n" - + "\013create_time\030\001 \001(\0132\032.google.protobuf.Tim" - + "estamp\022,\n\010end_time\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004verb\030\004 \001" - + "(\t\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020cancel_requ" - + "ested\030\006 \001(\010\022\023\n\013api_version\030\007 \001(\t\"\305\002\n\007Sym" - + "ptom\022/\n\013create_time\030\001 \001(\0132\032.google.proto" - + "buf.Timestamp\022>\n\014symptom_type\030\002 \001(\0162(.go" - + "ogle.cloud.tpu.v1.Symptom.SymptomType\022\017\n" - + "\007details\030\003 \001(\t\022\021\n\tworker_id\030\004 \001(\t\"\244\001\n\013Sy" - + "mptomType\022\034\n\030SYMPTOM_TYPE_UNSPECIFIED\020\000\022" - + "\016\n\nLOW_MEMORY\020\001\022\021\n\rOUT_OF_MEMORY\020\002\022\025\n\021EX" - + "ECUTE_TIMED_OUT\020\003\022\023\n\017MESH_BUILD_FAIL\020\004\022\025" - + "\n\021HBM_OUT_OF_MEMORY\020\005\022\021\n\rPROJECT_ABUSE\020\006" - + "2\336\017\n\003Tpu\022\226\001\n\tListNodes\022%.google.cloud.tp" - + "u.v1.ListNodesRequest\032&.google.cloud.tpu" - + ".v1.ListNodesResponse\":\202\323\344\223\002+\022)/v1/{pare" - + "nt=projects/*/locations/*}/nodes\332A\006paren" - + "t\022\203\001\n\007GetNode\022#.google.cloud.tpu.v1.GetN" - + "odeRequest\032\031.google.cloud.tpu.v1.Node\"8\202" - + "\323\344\223\002+\022)/v1/{name=projects/*/locations/*/" - + "nodes/*}\332A\004name\022\276\001\n\nCreateNode\022&.google." - + "cloud.tpu.v1.CreateNodeRequest\032\035.google." - + "longrunning.Operation\"i\202\323\344\223\0021\")/v1/{pare" - + "nt=projects/*/locations/*}/nodes:\004node\332A" - + "\023parent,node,node_id\312A\031\n\004Node\022\021Operation" - + "Metadata\022\251\001\n\nDeleteNode\022&.google.cloud.t" - + "pu.v1.DeleteNodeRequest\032\035.google.longrun" - + "ning.Operation\"T\202\323\344\223\002+*)/v1/{name=projec" - + "ts/*/locations/*/nodes/*}\332A\004name\312A\031\n\004Nod" - + "e\022\021OperationMetadata\022\257\001\n\013ReimageNode\022\'.g" - + "oogle.cloud.tpu.v1.ReimageNodeRequest\032\035." - + "google.longrunning.Operation\"X\202\323\344\223\0026\"1/v" - + "1/{name=projects/*/locations/*/nodes/*}:" - + "reimage:\001*\312A\031\n\004Node\022\021OperationMetadata\022\246" - + "\001\n\010StopNode\022$.google.cloud.tpu.v1.StopNo" - + "deRequest\032\035.google.longrunning.Operation" - + "\"U\202\323\344\223\0023\"./v1/{name=projects/*/locations" - + "/*/nodes/*}:stop:\001*\312A\031\n\004Node\022\021OperationM" - + "etadata\022\251\001\n\tStartNode\022%.google.cloud.tpu" - + ".v1.StartNodeRequest\032\035.google.longrunnin" - + "g.Operation\"V\202\323\344\223\0024\"//v1/{name=projects/" - + "*/locations/*/nodes/*}:start:\001*\312A\031\n\004Node" - + "\022\021OperationMetadata\022\312\001\n\026ListTensorFlowVe" - + "rsions\0222.google.cloud.tpu.v1.ListTensorF" - + "lowVersionsRequest\0323.google.cloud.tpu.v1" - + ".ListTensorFlowVersionsResponse\"G\202\323\344\223\0028\022" - + "6/v1/{parent=projects/*/locations/*}/ten" - + "sorflowVersions\332A\006parent\022\267\001\n\024GetTensorFl" - + "owVersion\0220.google.cloud.tpu.v1.GetTenso" - + "rFlowVersionRequest\032&.google.cloud.tpu.v" - + "1.TensorFlowVersion\"E\202\323\344\223\0028\0226/v1/{name=p" - + "rojects/*/locations/*/tensorflowVersions" - + "/*}\332A\004name\022\302\001\n\024ListAcceleratorTypes\0220.go" - + "ogle.cloud.tpu.v1.ListAcceleratorTypesRe" - + "quest\0321.google.cloud.tpu.v1.ListAccelera" - + "torTypesResponse\"E\202\323\344\223\0026\0224/v1/{parent=pr" - + "ojects/*/locations/*}/acceleratorTypes\332A" - + "\006parent\022\257\001\n\022GetAcceleratorType\022..google." - + "cloud.tpu.v1.GetAcceleratorTypeRequest\032$" - + ".google.cloud.tpu.v1.AcceleratorType\"C\202\323" - + "\344\223\0026\0224/v1/{name=projects/*/locations/*/a" - + "cceleratorTypes/*}\332A\004name\032F\312A\022tpu.google" - + "apis.com\322A.https://www.googleapis.com/au" - + "th/cloud-platformBb\n\027com.google.cloud.tp" - + "u.v1B\rCloudTpuProtoP\001Z6google.golang.org" - + "/genproto/googleapis/cloud/tpu/v1;tpub\006p" - + "roto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor, - new java.lang.String[] { - "Preemptible", "Reserved", - }); - internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor, - new java.lang.String[] { - "IpAddress", "Port", - }); - internal_static_google_cloud_tpu_v1_Node_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_Node_descriptor, - new java.lang.String[] { - "Name", - "Description", - "AcceleratorType", - "IpAddress", - "Port", - "State", - "HealthDescription", - "TensorflowVersion", - "Network", - "CidrBlock", - "ServiceAccount", - "CreateTime", - "SchedulingConfig", - "NetworkEndpoints", - "Health", - "Labels", - "UseServiceNetworking", - "ApiVersion", - "Symptoms", - }); - internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor = - internal_static_google_cloud_tpu_v1_Node_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_tpu_v1_Node_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor, - new java.lang.String[] { - "Nodes", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor, - new java.lang.String[] { - "Parent", "NodeId", "Node", - }); - internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor, - new java.lang.String[] { - "Name", "TensorflowVersion", - }); - internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor, - new java.lang.String[] { - "Name", "Version", - }); - internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", "OrderBy", - }); - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor, - new java.lang.String[] { - "TensorflowVersions", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor, - new java.lang.String[] { - "Name", "Type", - }); - internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", "OrderBy", - }); - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor, - new java.lang.String[] { - "AcceleratorTypes", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor, - new java.lang.String[] { - "CreateTime", - "EndTime", - "Target", - "Verb", - "StatusDetail", - "CancelRequested", - "ApiVersion", - }); - internal_static_google_cloud_tpu_v1_Symptom_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_tpu_v1_Symptom_descriptor, - new java.lang.String[] { - "CreateTime", "SymptomType", "Details", "WorkerId", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java deleted file mode 100644 index cca7435f8d84..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public interface DeleteNodeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.DeleteNodeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java deleted file mode 100644 index 236bc019d8bc..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public interface GetAcceleratorTypeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.GetAcceleratorTypeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java deleted file mode 100644 index 283d187a5fbe..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public interface GetNodeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.GetNodeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java deleted file mode 100644 index ed5597d5bf9f..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public interface GetTensorFlowVersionRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.GetTensorFlowVersionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java deleted file mode 100644 index d747b81c351f..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public interface SchedulingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.SchedulingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Defines whether the node is preemptible.
-   * 
- * - * bool preemptible = 1; - * - * @return The preemptible. - */ - boolean getPreemptible(); - - /** - * - * - *
-   * Whether the node is created under a reservation.
-   * 
- * - * bool reserved = 2; - * - * @return The reserved. - */ - boolean getReserved(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java deleted file mode 100644 index 23baa871358e..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public interface StartNodeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.StartNodeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java deleted file mode 100644 index e340f41716e2..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v1/cloud_tpu.proto - -package com.google.cloud.tpu.v1; - -public interface StopNodeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.StopNodeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java deleted file mode 100644 index eec7e4782b8d..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface AcceleratorTypeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.AcceleratorType) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * the accelerator type.
-   * 
- * - * string type = 2; - * - * @return The type. - */ - java.lang.String getType(); - /** - * - * - *
-   * the accelerator type.
-   * 
- * - * string type = 2; - * - * @return The bytes for type. - */ - com.google.protobuf.ByteString getTypeBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java deleted file mode 100644 index ec199bd8634f..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java +++ /dev/null @@ -1,741 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public final class CloudTpuProto { - private CloudTpuProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_AccessConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_Node_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_Node_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_Node_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_Node_MetadataEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_Node_MetadataEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_Symptom_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/tpu/v2alpha1/cloud_tpu.pr" - + "oto\022\031google.cloud.tpu.v2alpha1\032\034google/a" - + "pi/annotations.proto\032\027google/api/client." - + "proto\032\037google/api/field_behavior.proto\032\031" - + "google/api/resource.proto\032#google/longru" - + "nning/operations.proto\032 google/protobuf/" - + "field_mask.proto\032\037google/protobuf/timest" - + "amp.proto\"k\n\017GuestAttributes\022\022\n\nquery_pa" - + "th\030\001 \001(\t\022D\n\013query_value\030\002 \001(\0132/.google.c" - + "loud.tpu.v2alpha1.GuestAttributesValue\"V" - + "\n\024GuestAttributesValue\022>\n\005items\030\001 \003(\0132/." - + "google.cloud.tpu.v2alpha1.GuestAttribute" - + "sEntry\"E\n\024GuestAttributesEntry\022\021\n\tnamesp" - + "ace\030\001 \001(\t\022\013\n\003key\030\002 \001(\t\022\r\n\005value\030\003 \001(\t\"\251\001" - + "\n\014AttachedDisk\022\023\n\013source_disk\030\003 \001(\t\022>\n\004m" - + "ode\030\004 \001(\01620.google.cloud.tpu.v2alpha1.At" - + "tachedDisk.DiskMode\"D\n\010DiskMode\022\031\n\025DISK_" - + "MODE_UNSPECIFIED\020\000\022\016\n\nREAD_WRITE\020\001\022\r\n\tRE" - + "AD_ONLY\020\002\"9\n\020SchedulingConfig\022\023\n\013preempt" - + "ible\030\001 \001(\010\022\020\n\010reserved\030\002 \001(\010\"s\n\017NetworkE" - + "ndpoint\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port\030\002 \001(" - + "\005\022>\n\raccess_config\030\005 \001(\0132\'.google.cloud." - + "tpu.v2alpha1.AccessConfig\"(\n\014AccessConfi" - + "g\022\030\n\013external_ip\030\001 \001(\tB\003\340A\003\"Q\n\rNetworkCo" - + "nfig\022\017\n\007network\030\001 \001(\t\022\022\n\nsubnetwork\030\002 \001(" - + "\t\022\033\n\023enable_external_ips\030\003 \001(\010\".\n\016Servic" - + "eAccount\022\r\n\005email\030\001 \001(\t\022\r\n\005scope\030\002 \003(\t\"\360" - + "\014\n\004Node\022\024\n\004name\030\001 \001(\tB\006\340A\003\340A\005\022\023\n\013descrip" - + "tion\030\003 \001(\t\022\035\n\020accelerator_type\030\005 \001(\tB\003\340A" - + "\002\0229\n\005state\030\t \001(\0162%.google.cloud.tpu.v2al" - + "pha1.Node.StateB\003\340A\003\022\037\n\022health_descripti" - + "on\030\n \001(\tB\003\340A\003\022\034\n\017runtime_version\030\013 \001(\tB\003" - + "\340A\002\022@\n\016network_config\030$ \001(\0132(.google.clo" - + "ud.tpu.v2alpha1.NetworkConfig\022\022\n\ncidr_bl" - + "ock\030\r \001(\t\022B\n\017service_account\030% \001(\0132).goo" - + "gle.cloud.tpu.v2alpha1.ServiceAccount\0224\n" - + "\013create_time\030\020 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\022F\n\021scheduling_config\030\021 \001(\0132+" - + ".google.cloud.tpu.v2alpha1.SchedulingCon" - + "fig\022J\n\021network_endpoints\030\025 \003(\0132*.google." - + "cloud.tpu.v2alpha1.NetworkEndpointB\003\340A\003\022" - + "6\n\006health\030\026 \001(\0162&.google.cloud.tpu.v2alp" - + "ha1.Node.Health\022;\n\006labels\030\030 \003(\0132+.google" - + ".cloud.tpu.v2alpha1.Node.LabelsEntry\022?\n\010" - + "metadata\030\" \003(\0132-.google.cloud.tpu.v2alph" - + "a1.Node.MetadataEntry\022\014\n\004tags\030( \003(\t\022\017\n\002i" - + "d\030! \001(\003B\003\340A\003\022;\n\ndata_disks\030) \003(\0132\'.googl" - + "e.cloud.tpu.v2alpha1.AttachedDisk\022D\n\013api" - + "_version\030& \001(\0162*.google.cloud.tpu.v2alph" - + "a1.Node.ApiVersionB\003\340A\003\0229\n\010symptoms\030\' \003(" - + "\0132\".google.cloud.tpu.v2alpha1.SymptomB\003\340" - + "A\003\022S\n\030shielded_instance_config\030- \001(\01321.g" - + "oogle.cloud.tpu.v2alpha1.ShieldedInstanc" - + "eConfig\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001\032/\n\rMetadataEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\341\001\n\005State\022\025\n\021STA" - + "TE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020" - + "\002\022\016\n\nRESTARTING\020\003\022\r\n\tREIMAGING\020\004\022\014\n\010DELE" - + "TING\020\005\022\r\n\tREPAIRING\020\006\022\013\n\007STOPPED\020\010\022\014\n\010ST" - + "OPPING\020\t\022\014\n\010STARTING\020\n\022\r\n\tPREEMPTED\020\013\022\016\n" - + "\nTERMINATED\020\014\022\n\n\006HIDING\020\r\022\n\n\006HIDDEN\020\016\022\014\n" - + "\010UNHIDING\020\017\"o\n\006Health\022\026\n\022HEALTH_UNSPECIF" - + "IED\020\000\022\013\n\007HEALTHY\020\001\022\013\n\007TIMEOUT\020\003\022\030\n\024UNHEA" - + "LTHY_TENSORFLOW\020\004\022\031\n\025UNHEALTHY_MAINTENAN" - + "CE\020\005\"O\n\nApiVersion\022\033\n\027API_VERSION_UNSPEC" - + "IFIED\020\000\022\r\n\tV1_ALPHA1\020\001\022\006\n\002V1\020\002\022\r\n\tV2_ALP" - + "HA1\020\003:R\352AO\n\027tpu.googleapis.com/Node\0224pro" - + "jects/{project}/locations/{location}/nod" - + "es/{node}\"j\n\020ListNodesRequest\022/\n\006parent\030" - + "\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googleapis.com/Node\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"q\n" - + "\021ListNodesResponse\022.\n\005nodes\030\001 \003(\0132\037.goog" - + "le.cloud.tpu.v2alpha1.Node\022\027\n\017next_page_" - + "token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"?\n\016GetN" - + "odeRequest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.go" - + "ogleapis.com/Node\"\223\001\n\021CreateNodeRequest\022" - + "9\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googl" - + "eapis.com/Location\022\017\n\007node_id\030\002 \001(\t\0222\n\004n" - + "ode\030\003 \001(\0132\037.google.cloud.tpu.v2alpha1.No" - + "deB\003\340A\002\"B\n\021DeleteNodeRequest\022-\n\004name\030\001 \001" - + "(\tB\037\340A\002\372A\031\n\027tpu.googleapis.com/Node\"\037\n\017S" - + "topNodeRequest\022\014\n\004name\030\001 \001(\t\" \n\020StartNod" - + "eRequest\022\014\n\004name\030\001 \001(\t\"}\n\021UpdateNodeRequ" - + "est\0224\n\013update_mask\030\001 \001(\0132\032.google.protob" - + "uf.FieldMaskB\003\340A\002\0222\n\004node\030\002 \001(\0132\037.google" - + ".cloud.tpu.v2alpha1.NodeB\003\340A\002\" \n\017Service" - + "Identity\022\r\n\005email\030\001 \001(\t\"[\n\036GenerateServi" - + "ceIdentityRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A" - + "#\n!locations.googleapis.com/Location\"_\n\037" - + "GenerateServiceIdentityResponse\022<\n\010ident" - + "ity\030\001 \001(\0132*.google.cloud.tpu.v2alpha1.Se" - + "rviceIdentity\"\243\001\n\017AcceleratorType\022\014\n\004nam" - + "e\030\001 \001(\t\022\014\n\004type\030\002 \001(\t:t\352Aq\n\"tpu.googleap" - + "is.com/AcceleratorType\022Kprojects/{projec" - + "t}/locations/{location}/acceleratorTypes" - + "/{accelerator_type}\"U\n\031GetAcceleratorTyp" - + "eRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"tpu.goog" - + "leapis.com/AcceleratorType\"\242\001\n\033ListAccel" - + "eratorTypesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" - + "A$\n\"tpu.googleapis.com/AcceleratorType\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n" - + "\006filter\030\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\223\001\n\034List" - + "AcceleratorTypesResponse\022E\n\021accelerator_" - + "types\030\001 \003(\0132*.google.cloud.tpu.v2alpha1." - + "AcceleratorType\022\027\n\017next_page_token\030\002 \001(\t" - + "\022\023\n\013unreachable\030\003 \003(\t\"\326\001\n\021OperationMetad" - + "ata\022/\n\013create_time\030\001 \001(\0132\032.google.protob" - + "uf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google." - + "protobuf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004ve" - + "rb\030\004 \001(\t\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020cance" - + "l_requested\030\006 \001(\010\022\023\n\013api_version\030\007 \001(\t\"\242" - + "\001\n\016RuntimeVersion\022\014\n\004name\030\001 \001(\t\022\017\n\007versi" - + "on\030\002 \001(\t:q\352An\n!tpu.googleapis.com/Runtim" - + "eVersion\022Iprojects/{project}/locations/{" - + "location}/runtimeVersions/{runtime_versi" - + "on}\"S\n\030GetRuntimeVersionRequest\0227\n\004name\030" - + "\001 \001(\tB)\340A\002\372A#\n!tpu.googleapis.com/Runtim" - + "eVersion\"\240\001\n\032ListRuntimeVersionsRequest\022" - + "9\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!tpu.googleapis." - + "com/RuntimeVersion\022\021\n\tpage_size\030\002 \001(\005\022\022\n" - + "\npage_token\030\003 \001(\t\022\016\n\006filter\030\005 \001(\t\022\020\n\010ord" - + "er_by\030\006 \001(\t\"\220\001\n\033ListRuntimeVersionsRespo" - + "nse\022C\n\020runtime_versions\030\001 \003(\0132).google.c" - + "loud.tpu.v2alpha1.RuntimeVersion\022\027\n\017next" - + "_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"\313" - + "\002\n\007Symptom\022/\n\013create_time\030\001 \001(\0132\032.google" - + ".protobuf.Timestamp\022D\n\014symptom_type\030\002 \001(" - + "\0162..google.cloud.tpu.v2alpha1.Symptom.Sy" - + "mptomType\022\017\n\007details\030\003 \001(\t\022\021\n\tworker_id\030" - + "\004 \001(\t\"\244\001\n\013SymptomType\022\034\n\030SYMPTOM_TYPE_UN" - + "SPECIFIED\020\000\022\016\n\nLOW_MEMORY\020\001\022\021\n\rOUT_OF_ME" - + "MORY\020\002\022\025\n\021EXECUTE_TIMED_OUT\020\003\022\023\n\017MESH_BU" - + "ILD_FAIL\020\004\022\025\n\021HBM_OUT_OF_MEMORY\020\005\022\021\n\rPRO" - + "JECT_ABUSE\020\006\"r\n\031GetGuestAttributesReques" - + "t\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googleapis." - + "com/Node\022\022\n\nquery_path\030\002 \001(\t\022\022\n\nworker_i" - + "ds\030\003 \003(\t\"b\n\032GetGuestAttributesResponse\022D" - + "\n\020guest_attributes\030\001 \003(\0132*.google.cloud." - + "tpu.v2alpha1.GuestAttributes\"4\n\026Shielded" - + "InstanceConfig\022\032\n\022enable_secure_boot\030\001 \001" - + "(\0102\263\024\n\003Tpu\022\250\001\n\tListNodes\022+.google.cloud." - + "tpu.v2alpha1.ListNodesRequest\032,.google.c" - + "loud.tpu.v2alpha1.ListNodesResponse\"@\202\323\344" - + "\223\0021\022//v2alpha1/{parent=projects/*/locati" - + "ons/*}/nodes\332A\006parent\022\225\001\n\007GetNode\022).goog" - + "le.cloud.tpu.v2alpha1.GetNodeRequest\032\037.g" - + "oogle.cloud.tpu.v2alpha1.Node\">\202\323\344\223\0021\022//" - + "v2alpha1/{name=projects/*/locations/*/no" - + "des/*}\332A\004name\022\312\001\n\nCreateNode\022,.google.cl" - + "oud.tpu.v2alpha1.CreateNodeRequest\032\035.goo" - + "gle.longrunning.Operation\"o\202\323\344\223\0027\"//v2al" - + "pha1/{parent=projects/*/locations/*}/nod" - + "es:\004node\332A\023parent,node,node_id\312A\031\n\004Node\022" - + "\021OperationMetadata\022\265\001\n\nDeleteNode\022,.goog" - + "le.cloud.tpu.v2alpha1.DeleteNodeRequest\032" - + "\035.google.longrunning.Operation\"Z\202\323\344\223\0021*/" - + "/v2alpha1/{name=projects/*/locations/*/n" - + "odes/*}\332A\004name\312A\031\n\004Node\022\021OperationMetada" - + "ta\022\262\001\n\010StopNode\022*.google.cloud.tpu.v2alp" - + "ha1.StopNodeRequest\032\035.google.longrunning" - + ".Operation\"[\202\323\344\223\0029\"4/v2alpha1/{name=proj" - + "ects/*/locations/*/nodes/*}:stop:\001*\312A\031\n\004" - + "Node\022\021OperationMetadata\022\265\001\n\tStartNode\022+." - + "google.cloud.tpu.v2alpha1.StartNodeReque" - + "st\032\035.google.longrunning.Operation\"\\\202\323\344\223\002" - + ":\"5/v2alpha1/{name=projects/*/locations/" - + "*/nodes/*}:start:\001*\312A\031\n\004Node\022\021OperationM" - + "etadata\022\314\001\n\nUpdateNode\022,.google.cloud.tp" - + "u.v2alpha1.UpdateNodeRequest\032\035.google.lo" - + "ngrunning.Operation\"q\202\323\344\223\002<24/v2alpha1/{" - + "node.name=projects/*/locations/*/nodes/*" - + "}:\004node\332A\020node,update_mask\312A\031\n\004Node\022\021Ope" - + "rationMetadata\022\336\001\n\027GenerateServiceIdenti" - + "ty\0229.google.cloud.tpu.v2alpha1.GenerateS" - + "erviceIdentityRequest\032:.google.cloud.tpu" - + ".v2alpha1.GenerateServiceIdentityRespons" - + "e\"L\202\323\344\223\002F\"A/v2alpha1/{parent=projects/*/" - + "locations/*}:generateServiceIdentity:\001*\022" - + "\324\001\n\024ListAcceleratorTypes\0226.google.cloud." - + "tpu.v2alpha1.ListAcceleratorTypesRequest" - + "\0327.google.cloud.tpu.v2alpha1.ListAcceler" - + "atorTypesResponse\"K\202\323\344\223\002<\022:/v2alpha1/{pa" - + "rent=projects/*/locations/*}/accelerator" - + "Types\332A\006parent\022\301\001\n\022GetAcceleratorType\0224." - + "google.cloud.tpu.v2alpha1.GetAccelerator" - + "TypeRequest\032*.google.cloud.tpu.v2alpha1." - + "AcceleratorType\"I\202\323\344\223\002<\022:/v2alpha1/{name" - + "=projects/*/locations/*/acceleratorTypes" - + "/*}\332A\004name\022\320\001\n\023ListRuntimeVersions\0225.goo" - + "gle.cloud.tpu.v2alpha1.ListRuntimeVersio" - + "nsRequest\0326.google.cloud.tpu.v2alpha1.Li" - + "stRuntimeVersionsResponse\"J\202\323\344\223\002;\0229/v2al" - + "pha1/{parent=projects/*/locations/*}/run" - + "timeVersions\332A\006parent\022\275\001\n\021GetRuntimeVers" - + "ion\0223.google.cloud.tpu.v2alpha1.GetRunti" - + "meVersionRequest\032).google.cloud.tpu.v2al" - + "pha1.RuntimeVersion\"H\202\323\344\223\002;\0229/v2alpha1/{" - + "name=projects/*/locations/*/runtimeVersi" - + "ons/*}\332A\004name\022\320\001\n\022GetGuestAttributes\0224.g" - + "oogle.cloud.tpu.v2alpha1.GetGuestAttribu" - + "tesRequest\0325.google.cloud.tpu.v2alpha1.G" - + "etGuestAttributesResponse\"M\202\323\344\223\002G\"B/v2al" - + "pha1/{name=projects/*/locations/*/nodes/" - + "*}:getGuestAttributes:\001*\032F\312A\022tpu.googlea" - + "pis.com\322A.https://www.googleapis.com/aut" - + "h/cloud-platformBn\n\035com.google.cloud.tpu" - + ".v2alpha1B\rCloudTpuProtoP\001Z - * Required. The resource name. - * - * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java deleted file mode 100644 index 042477062e60..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface GenerateServiceIdentityRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent resource name.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent resource name.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java deleted file mode 100644 index 67b073762756..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface GetAcceleratorTypeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java deleted file mode 100644 index 736eca1d4a67..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface GetNodeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetNodeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java deleted file mode 100644 index 4a05c691b07e..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface GetRuntimeVersionRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java deleted file mode 100644 index 4f174ebe747d..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface SchedulingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.SchedulingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Defines whether the node is preemptible.
-   * 
- * - * bool preemptible = 1; - * - * @return The preemptible. - */ - boolean getPreemptible(); - - /** - * - * - *
-   * Whether the node is created under a reservation.
-   * 
- * - * bool reserved = 2; - * - * @return The reserved. - */ - boolean getReserved(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java deleted file mode 100644 index 41e7346d40ba..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface ServiceIdentityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ServiceIdentity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The email address of the service identity.
-   * 
- * - * string email = 1; - * - * @return The email. - */ - java.lang.String getEmail(); - /** - * - * - *
-   * The email address of the service identity.
-   * 
- * - * string email = 1; - * - * @return The bytes for email. - */ - com.google.protobuf.ByteString getEmailBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java deleted file mode 100644 index 6172d0e72cd5..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface ShieldedInstanceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Defines whether the instance has Secure Boot enabled.
-   * 
- * - * bool enable_secure_boot = 1; - * - * @return The enableSecureBoot. - */ - boolean getEnableSecureBoot(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java deleted file mode 100644 index 4621b0d678b8..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface StartNodeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.StartNodeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java b/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java deleted file mode 100644 index 84b166f5ba99..000000000000 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto - -package com.google.cloud.tpu.v2alpha1; - -public interface StopNodeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.StopNodeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuClient.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuClient.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuClient.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuClient.java diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuSettings.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuSettings.java similarity index 99% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuSettings.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuSettings.java index ecc8d3709c05..7d549ca1f20c 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuSettings.java +++ b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/TpuSettings.java @@ -31,6 +31,7 @@ import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.location.GetLocationRequest; diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/gapic_metadata.json b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/gapic_metadata.json similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/gapic_metadata.json rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/gapic_metadata.json diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/package-info.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/package-info.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/package-info.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/package-info.java diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuCallableFactory.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuCallableFactory.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuCallableFactory.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuCallableFactory.java diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuStub.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuStub.java similarity index 99% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuStub.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuStub.java index d6b4c7cb878a..684e2301247d 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuStub.java +++ b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/GrpcTpuStub.java @@ -56,6 +56,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; diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStub.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStub.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStub.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStub.java diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStubSettings.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStubSettings.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStubSettings.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v1/stub/TpuStubSettings.java diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocations.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocations.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocations.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocations.java diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocationsImpl.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocationsImpl.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocationsImpl.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockLocationsImpl.java diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpu.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpu.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpu.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpu.java diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpuImpl.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpuImpl.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpuImpl.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/MockTpuImpl.java diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/TpuClientTest.java b/owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/TpuClientTest.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/TpuClientTest.java rename to owl-bot-staging/java-tpu/v1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v1/TpuClientTest.java diff --git a/owl-bot-staging/java-tpu/v1/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java b/owl-bot-staging/java-tpu/v1/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java new file mode 100644 index 000000000000..f238d10a4880 --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java @@ -0,0 +1,1168 @@ +package com.google.cloud.tpu.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Manages TPU nodes and other resources
+ * TPU API v1
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/tpu/v1/cloud_tpu.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class TpuGrpc { + + private TpuGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.tpu.v1.Tpu"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListNodesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNodes", + requestType = com.google.cloud.tpu.v1.ListNodesRequest.class, + responseType = com.google.cloud.tpu.v1.ListNodesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNodesMethod() { + io.grpc.MethodDescriptor getListNodesMethod; + if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { + TpuGrpc.getListNodesMethod = getListNodesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNodes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.ListNodesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.ListNodesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListNodes")) + .build(); + } + } + } + return getListNodesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNode", + requestType = com.google.cloud.tpu.v1.GetNodeRequest.class, + responseType = com.google.cloud.tpu.v1.Node.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNodeMethod() { + io.grpc.MethodDescriptor getGetNodeMethod; + if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { + TpuGrpc.getGetNodeMethod = getGetNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.GetNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.Node.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetNode")) + .build(); + } + } + } + return getGetNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNode", + requestType = com.google.cloud.tpu.v1.CreateNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateNodeMethod() { + io.grpc.MethodDescriptor getCreateNodeMethod; + if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { + TpuGrpc.getCreateNodeMethod = getCreateNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.CreateNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("CreateNode")) + .build(); + } + } + } + return getCreateNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNode", + requestType = com.google.cloud.tpu.v1.DeleteNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteNodeMethod() { + io.grpc.MethodDescriptor getDeleteNodeMethod; + if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { + TpuGrpc.getDeleteNodeMethod = getDeleteNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.DeleteNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("DeleteNode")) + .build(); + } + } + } + return getDeleteNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getReimageNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReimageNode", + requestType = com.google.cloud.tpu.v1.ReimageNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getReimageNodeMethod() { + io.grpc.MethodDescriptor getReimageNodeMethod; + if ((getReimageNodeMethod = TpuGrpc.getReimageNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getReimageNodeMethod = TpuGrpc.getReimageNodeMethod) == null) { + TpuGrpc.getReimageNodeMethod = getReimageNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReimageNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.ReimageNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ReimageNode")) + .build(); + } + } + } + return getReimageNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getStopNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopNode", + requestType = com.google.cloud.tpu.v1.StopNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getStopNodeMethod() { + io.grpc.MethodDescriptor getStopNodeMethod; + if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { + TpuGrpc.getStopNodeMethod = getStopNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.StopNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StopNode")) + .build(); + } + } + } + return getStopNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getStartNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartNode", + requestType = com.google.cloud.tpu.v1.StartNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getStartNodeMethod() { + io.grpc.MethodDescriptor getStartNodeMethod; + if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { + TpuGrpc.getStartNodeMethod = getStartNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.StartNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StartNode")) + .build(); + } + } + } + return getStartNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTensorFlowVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTensorFlowVersions", + requestType = com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.class, + responseType = com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTensorFlowVersionsMethod() { + io.grpc.MethodDescriptor getListTensorFlowVersionsMethod; + if ((getListTensorFlowVersionsMethod = TpuGrpc.getListTensorFlowVersionsMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListTensorFlowVersionsMethod = TpuGrpc.getListTensorFlowVersionsMethod) == null) { + TpuGrpc.getListTensorFlowVersionsMethod = getListTensorFlowVersionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTensorFlowVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListTensorFlowVersions")) + .build(); + } + } + } + return getListTensorFlowVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTensorFlowVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTensorFlowVersion", + requestType = com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.class, + responseType = com.google.cloud.tpu.v1.TensorFlowVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTensorFlowVersionMethod() { + io.grpc.MethodDescriptor getGetTensorFlowVersionMethod; + if ((getGetTensorFlowVersionMethod = TpuGrpc.getGetTensorFlowVersionMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetTensorFlowVersionMethod = TpuGrpc.getGetTensorFlowVersionMethod) == null) { + TpuGrpc.getGetTensorFlowVersionMethod = getGetTensorFlowVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTensorFlowVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.TensorFlowVersion.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetTensorFlowVersion")) + .build(); + } + } + } + return getGetTensorFlowVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getListAcceleratorTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAcceleratorTypes", + requestType = com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.class, + responseType = com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListAcceleratorTypesMethod() { + io.grpc.MethodDescriptor getListAcceleratorTypesMethod; + if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { + TpuGrpc.getListAcceleratorTypesMethod = getListAcceleratorTypesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAcceleratorTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListAcceleratorTypes")) + .build(); + } + } + } + return getListAcceleratorTypesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAcceleratorTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAcceleratorType", + requestType = com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.class, + responseType = com.google.cloud.tpu.v1.AcceleratorType.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAcceleratorTypeMethod() { + io.grpc.MethodDescriptor getGetAcceleratorTypeMethod; + if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { + TpuGrpc.getGetAcceleratorTypeMethod = getGetAcceleratorTypeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAcceleratorType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v1.AcceleratorType.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetAcceleratorType")) + .build(); + } + } + } + return getGetAcceleratorTypeMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static TpuStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuStub(channel, callOptions); + } + }; + return TpuStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TpuBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuBlockingStub(channel, callOptions); + } + }; + return TpuBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static TpuFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuFutureStub(channel, callOptions); + } + }; + return TpuFutureStub.newStub(factory, channel); + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v1
+   * 
+ */ + public static abstract class TpuImplBase implements io.grpc.BindableService { + + /** + *
+     * Lists nodes.
+     * 
+ */ + public void listNodes(com.google.cloud.tpu.v1.ListNodesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public void getNode(com.google.cloud.tpu.v1.GetNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public void createNode(com.google.cloud.tpu.v1.CreateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public void deleteNode(com.google.cloud.tpu.v1.DeleteNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver); + } + + /** + *
+     * Reimages a node's OS.
+     * 
+ */ + public void reimageNode(com.google.cloud.tpu.v1.ReimageNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReimageNodeMethod(), responseObserver); + } + + /** + *
+     * Stops a node, this operation is only available with single TPU nodes.
+     * 
+ */ + public void stopNode(com.google.cloud.tpu.v1.StopNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public void startNode(com.google.cloud.tpu.v1.StartNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver); + } + + /** + *
+     * List TensorFlow versions supported by this API.
+     * 
+ */ + public void listTensorFlowVersions(com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTensorFlowVersionsMethod(), responseObserver); + } + + /** + *
+     * Gets TensorFlow Version.
+     * 
+ */ + public void getTensorFlowVersion(com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTensorFlowVersionMethod(), responseObserver); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public void listAcceleratorTypes(com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAcceleratorTypesMethod(), responseObserver); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public void getAcceleratorType(com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAcceleratorTypeMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListNodesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.ListNodesRequest, + com.google.cloud.tpu.v1.ListNodesResponse>( + this, METHODID_LIST_NODES))) + .addMethod( + getGetNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.GetNodeRequest, + com.google.cloud.tpu.v1.Node>( + this, METHODID_GET_NODE))) + .addMethod( + getCreateNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.CreateNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_NODE))) + .addMethod( + getDeleteNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.DeleteNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_NODE))) + .addMethod( + getReimageNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.ReimageNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_REIMAGE_NODE))) + .addMethod( + getStopNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.StopNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_STOP_NODE))) + .addMethod( + getStartNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.StartNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_START_NODE))) + .addMethod( + getListTensorFlowVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest, + com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse>( + this, METHODID_LIST_TENSOR_FLOW_VERSIONS))) + .addMethod( + getGetTensorFlowVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.GetTensorFlowVersionRequest, + com.google.cloud.tpu.v1.TensorFlowVersion>( + this, METHODID_GET_TENSOR_FLOW_VERSION))) + .addMethod( + getListAcceleratorTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.ListAcceleratorTypesRequest, + com.google.cloud.tpu.v1.ListAcceleratorTypesResponse>( + this, METHODID_LIST_ACCELERATOR_TYPES))) + .addMethod( + getGetAcceleratorTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v1.GetAcceleratorTypeRequest, + com.google.cloud.tpu.v1.AcceleratorType>( + this, METHODID_GET_ACCELERATOR_TYPE))) + .build(); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v1
+   * 
+ */ + public static final class TpuStub extends io.grpc.stub.AbstractAsyncStub { + private TpuStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public void listNodes(com.google.cloud.tpu.v1.ListNodesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNodesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public void getNode(com.google.cloud.tpu.v1.GetNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public void createNode(com.google.cloud.tpu.v1.CreateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public void deleteNode(com.google.cloud.tpu.v1.DeleteNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Reimages a node's OS.
+     * 
+ */ + public void reimageNode(com.google.cloud.tpu.v1.ReimageNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReimageNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Stops a node, this operation is only available with single TPU nodes.
+     * 
+ */ + public void stopNode(com.google.cloud.tpu.v1.StopNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public void startNode(com.google.cloud.tpu.v1.StartNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List TensorFlow versions supported by this API.
+     * 
+ */ + public void listTensorFlowVersions(com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTensorFlowVersionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets TensorFlow Version.
+     * 
+ */ + public void getTensorFlowVersion(com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTensorFlowVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public void listAcceleratorTypes(com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public void getAcceleratorType(com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v1
+   * 
+ */ + public static final class TpuBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private TpuBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public com.google.cloud.tpu.v1.ListNodesResponse listNodes(com.google.cloud.tpu.v1.ListNodesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNodesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public com.google.cloud.tpu.v1.Node getNode(com.google.cloud.tpu.v1.GetNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public com.google.longrunning.Operation createNode(com.google.cloud.tpu.v1.CreateNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public com.google.longrunning.Operation deleteNode(com.google.cloud.tpu.v1.DeleteNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Reimages a node's OS.
+     * 
+ */ + public com.google.longrunning.Operation reimageNode(com.google.cloud.tpu.v1.ReimageNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReimageNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Stops a node, this operation is only available with single TPU nodes.
+     * 
+ */ + public com.google.longrunning.Operation stopNode(com.google.cloud.tpu.v1.StopNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public com.google.longrunning.Operation startNode(com.google.cloud.tpu.v1.StartNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * List TensorFlow versions supported by this API.
+     * 
+ */ + public com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse listTensorFlowVersions(com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTensorFlowVersionsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets TensorFlow Version.
+     * 
+ */ + public com.google.cloud.tpu.v1.TensorFlowVersion getTensorFlowVersion(com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTensorFlowVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public com.google.cloud.tpu.v1.ListAcceleratorTypesResponse listAcceleratorTypes(com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAcceleratorTypesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public com.google.cloud.tpu.v1.AcceleratorType getAcceleratorType(com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAcceleratorTypeMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v1
+   * 
+ */ + public static final class TpuFutureStub extends io.grpc.stub.AbstractFutureStub { + private TpuFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuFutureStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNodes( + com.google.cloud.tpu.v1.ListNodesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNodesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNode( + com.google.cloud.tpu.v1.GetNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createNode( + com.google.cloud.tpu.v1.CreateNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteNode( + com.google.cloud.tpu.v1.DeleteNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Reimages a node's OS.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture reimageNode( + com.google.cloud.tpu.v1.ReimageNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReimageNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Stops a node, this operation is only available with single TPU nodes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture stopNode( + com.google.cloud.tpu.v1.StopNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture startNode( + com.google.cloud.tpu.v1.StartNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * List TensorFlow versions supported by this API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listTensorFlowVersions( + com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTensorFlowVersionsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets TensorFlow Version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getTensorFlowVersion( + com.google.cloud.tpu.v1.GetTensorFlowVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTensorFlowVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listAcceleratorTypes( + com.google.cloud.tpu.v1.ListAcceleratorTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAcceleratorType( + com.google.cloud.tpu.v1.GetAcceleratorTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_NODES = 0; + private static final int METHODID_GET_NODE = 1; + private static final int METHODID_CREATE_NODE = 2; + private static final int METHODID_DELETE_NODE = 3; + private static final int METHODID_REIMAGE_NODE = 4; + private static final int METHODID_STOP_NODE = 5; + private static final int METHODID_START_NODE = 6; + private static final int METHODID_LIST_TENSOR_FLOW_VERSIONS = 7; + private static final int METHODID_GET_TENSOR_FLOW_VERSION = 8; + private static final int METHODID_LIST_ACCELERATOR_TYPES = 9; + private static final int METHODID_GET_ACCELERATOR_TYPE = 10; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final TpuImplBase serviceImpl; + private final int methodId; + + MethodHandlers(TpuImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_NODES: + serviceImpl.listNodes((com.google.cloud.tpu.v1.ListNodesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NODE: + serviceImpl.getNode((com.google.cloud.tpu.v1.GetNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_NODE: + serviceImpl.createNode((com.google.cloud.tpu.v1.CreateNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NODE: + serviceImpl.deleteNode((com.google.cloud.tpu.v1.DeleteNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REIMAGE_NODE: + serviceImpl.reimageNode((com.google.cloud.tpu.v1.ReimageNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_STOP_NODE: + serviceImpl.stopNode((com.google.cloud.tpu.v1.StopNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_NODE: + serviceImpl.startNode((com.google.cloud.tpu.v1.StartNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TENSOR_FLOW_VERSIONS: + serviceImpl.listTensorFlowVersions((com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TENSOR_FLOW_VERSION: + serviceImpl.getTensorFlowVersion((com.google.cloud.tpu.v1.GetTensorFlowVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ACCELERATOR_TYPES: + serviceImpl.listAcceleratorTypes((com.google.cloud.tpu.v1.ListAcceleratorTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ACCELERATOR_TYPE: + serviceImpl.getAcceleratorType((com.google.cloud.tpu.v1.GetAcceleratorTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class TpuBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TpuBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Tpu"); + } + } + + private static final class TpuFileDescriptorSupplier + extends TpuBaseDescriptorSupplier { + TpuFileDescriptorSupplier() {} + } + + private static final class TpuMethodDescriptorSupplier + extends TpuBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TpuMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TpuGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TpuFileDescriptorSupplier()) + .addMethod(getListNodesMethod()) + .addMethod(getGetNodeMethod()) + .addMethod(getCreateNodeMethod()) + .addMethod(getDeleteNodeMethod()) + .addMethod(getReimageNodeMethod()) + .addMethod(getStopNodeMethod()) + .addMethod(getStartNodeMethod()) + .addMethod(getListTensorFlowVersionsMethod()) + .addMethod(getGetTensorFlowVersionMethod()) + .addMethod(getListAcceleratorTypesMethod()) + .addMethod(getGetAcceleratorTypeMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorType.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorType.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorType.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorType.java index b1858a5f368b..6cb536764ccd 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorType.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorType.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * A accelerator type that a Node can be configured with.
  * 
* * Protobuf type {@code google.cloud.tpu.v1.AcceleratorType} */ -public final class AcceleratorType extends com.google.protobuf.GeneratedMessageV3 - implements +public final class AcceleratorType extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.AcceleratorType) AcceleratorTypeOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use AcceleratorType.newBuilder() to construct. private AcceleratorType(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AcceleratorType() { name_ = ""; type_ = ""; @@ -44,41 +26,37 @@ private AcceleratorType() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new AcceleratorType(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.AcceleratorType.class, - com.google.cloud.tpu.v1.AcceleratorType.Builder.class); + com.google.cloud.tpu.v1.AcceleratorType.class, com.google.cloud.tpu.v1.AcceleratorType.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ @java.lang.Override @@ -87,29 +65,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -120,14 +98,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int TYPE_FIELD_NUMBER = 2; private volatile java.lang.Object type_; /** - * - * *
    * the accelerator type.
    * 
* * string type = 2; - * * @return The type. */ @java.lang.Override @@ -136,29 +111,29 @@ public java.lang.String getType() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); type_ = s; return s; } } /** - * - * *
    * the accelerator type.
    * 
* * string type = 2; - * * @return The bytes for type. */ @java.lang.Override - public com.google.protobuf.ByteString getTypeBytes() { + public com.google.protobuf.ByteString + getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); type_ = b; return b; } else { @@ -167,7 +142,6 @@ public com.google.protobuf.ByteString getTypeBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -179,7 +153,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -209,15 +184,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.AcceleratorType)) { return super.equals(obj); } com.google.cloud.tpu.v1.AcceleratorType other = (com.google.cloud.tpu.v1.AcceleratorType) obj; - if (!getName().equals(other.getName())) return false; - if (!getType().equals(other.getType())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getType() + .equals(other.getType())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -238,136 +215,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.AcceleratorType parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.AcceleratorType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.AcceleratorType parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.AcceleratorType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.AcceleratorType prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A accelerator type that a Node can be configured with.
    * 
* * Protobuf type {@code google.cloud.tpu.v1.AcceleratorType} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.AcceleratorType) com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.AcceleratorType.class, - com.google.cloud.tpu.v1.AcceleratorType.Builder.class); + com.google.cloud.tpu.v1.AcceleratorType.class, com.google.cloud.tpu.v1.AcceleratorType.Builder.class); } // Construct using com.google.cloud.tpu.v1.AcceleratorType.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -379,9 +350,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; } @java.lang.Override @@ -400,8 +371,7 @@ public com.google.cloud.tpu.v1.AcceleratorType build() { @java.lang.Override public com.google.cloud.tpu.v1.AcceleratorType buildPartial() { - com.google.cloud.tpu.v1.AcceleratorType result = - new com.google.cloud.tpu.v1.AcceleratorType(this); + com.google.cloud.tpu.v1.AcceleratorType result = new com.google.cloud.tpu.v1.AcceleratorType(this); result.name_ = name_; result.type_ = type_; onBuilt(); @@ -412,39 +382,38 @@ public com.google.cloud.tpu.v1.AcceleratorType buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.AcceleratorType) { - return mergeFrom((com.google.cloud.tpu.v1.AcceleratorType) other); + return mergeFrom((com.google.cloud.tpu.v1.AcceleratorType)other); } else { super.mergeFrom(other); return this; @@ -487,25 +456,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - type_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -518,20 +484,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -540,21 +504,20 @@ public java.lang.String getName() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -562,61 +525,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -624,20 +580,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object type_ = ""; /** - * - * *
      * the accelerator type.
      * 
* * string type = 2; - * * @return The type. */ public java.lang.String getType() { java.lang.Object ref = type_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); type_ = s; return s; @@ -646,21 +600,20 @@ public java.lang.String getType() { } } /** - * - * *
      * the accelerator type.
      * 
* * string type = 2; - * * @return The bytes for type. */ - public com.google.protobuf.ByteString getTypeBytes() { + public com.google.protobuf.ByteString + getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); type_ = b; return b; } else { @@ -668,68 +621,61 @@ public com.google.protobuf.ByteString getTypeBytes() { } } /** - * - * *
      * the accelerator type.
      * 
* * string type = 2; - * * @param value The type to set. * @return This builder for chaining. */ - public Builder setType(java.lang.String value) { + public Builder setType( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + type_ = value; onChanged(); return this; } /** - * - * *
      * the accelerator type.
      * 
* * string type = 2; - * * @return This builder for chaining. */ public Builder clearType() { - + type_ = getDefaultInstance().getType(); onChanged(); return this; } /** - * - * *
      * the accelerator type.
      * 
* * string type = 2; - * * @param value The bytes for type to set. * @return This builder for chaining. */ - public Builder setTypeBytes(com.google.protobuf.ByteString value) { + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -739,12 +685,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.AcceleratorType) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.AcceleratorType) private static final com.google.cloud.tpu.v1.AcceleratorType DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.AcceleratorType(); } @@ -753,27 +699,27 @@ public static com.google.cloud.tpu.v1.AcceleratorType getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AcceleratorType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceleratorType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -788,4 +734,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.AcceleratorType getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeName.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeName.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeName.java diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeOrBuilder.java similarity index 51% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeOrBuilder.java index d9a66a858e47..26cc04022f2b 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/AcceleratorTypeOrBuilder.java @@ -1,75 +1,49 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface AcceleratorTypeOrBuilder - extends +public interface AcceleratorTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.AcceleratorType) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ java.lang.String getName(); /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString + getNameBytes(); /** - * - * *
    * the accelerator type.
    * 
* * string type = 2; - * * @return The type. */ java.lang.String getType(); /** - * - * *
    * the accelerator type.
    * 
* * string type = 2; - * * @return The bytes for type. */ - com.google.protobuf.ByteString getTypeBytes(); + com.google.protobuf.ByteString + getTypeBytes(); } diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java new file mode 100644 index 000000000000..19b329211135 --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CloudTpuProto.java @@ -0,0 +1,454 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public final class CloudTpuProto { + private CloudTpuProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_Node_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_Node_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v1_Symptom_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#google/cloud/tpu/v1/cloud_tpu.proto\022\023g" + + "oogle.cloud.tpu.v1\032\034google/api/annotatio" + + "ns.proto\032\027google/api/client.proto\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\032#google/longrunning/operat" + + "ions.proto\032\037google/protobuf/timestamp.pr" + + "oto\"9\n\020SchedulingConfig\022\023\n\013preemptible\030\001" + + " \001(\010\022\020\n\010reserved\030\002 \001(\010\"3\n\017NetworkEndpoin" + + "t\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port\030\002 \001(\005\"\264\n\n\004" + + "Node\022\024\n\004name\030\001 \001(\tB\006\340A\005\340A\003\022\023\n\013descriptio" + + "n\030\003 \001(\t\022\035\n\020accelerator_type\030\005 \001(\tB\003\340A\002\022\026" + + "\n\nip_address\030\010 \001(\tB\002\030\001\022\020\n\004port\030\016 \001(\tB\002\030\001" + + "\0223\n\005state\030\t \001(\0162\037.google.cloud.tpu.v1.No" + + "de.StateB\003\340A\003\022\037\n\022health_description\030\n \001(" + + "\tB\003\340A\003\022\037\n\022tensorflow_version\030\013 \001(\tB\003\340A\002\022" + + "\017\n\007network\030\014 \001(\t\022\022\n\ncidr_block\030\r \001(\t\022\034\n\017" + + "service_account\030\017 \001(\tB\003\340A\003\0224\n\013create_tim" + + "e\030\020 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022@\n\021scheduling_config\030\021 \001(\0132%.google.clo" + + "ud.tpu.v1.SchedulingConfig\022D\n\021network_en" + + "dpoints\030\025 \003(\0132$.google.cloud.tpu.v1.Netw" + + "orkEndpointB\003\340A\003\0220\n\006health\030\026 \001(\0162 .googl" + + "e.cloud.tpu.v1.Node.Health\0225\n\006labels\030\030 \003" + + "(\0132%.google.cloud.tpu.v1.Node.LabelsEntr" + + "y\022\036\n\026use_service_networking\030\033 \001(\010\022>\n\013api" + + "_version\030& \001(\0162$.google.cloud.tpu.v1.Nod" + + "e.ApiVersionB\003\340A\003\0223\n\010symptoms\030\' \003(\0132\034.go" + + "ogle.cloud.tpu.v1.SymptomB\003\340A\003\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\341\001" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATI" + + "NG\020\001\022\t\n\005READY\020\002\022\016\n\nRESTARTING\020\003\022\r\n\tREIMA" + + "GING\020\004\022\014\n\010DELETING\020\005\022\r\n\tREPAIRING\020\006\022\013\n\007S" + + "TOPPED\020\010\022\014\n\010STOPPING\020\t\022\014\n\010STARTING\020\n\022\r\n\t" + + "PREEMPTED\020\013\022\016\n\nTERMINATED\020\014\022\n\n\006HIDING\020\r\022" + + "\n\n\006HIDDEN\020\016\022\014\n\010UNHIDING\020\017\"\211\001\n\006Health\022\026\n\022" + + "HEALTH_UNSPECIFIED\020\000\022\013\n\007HEALTHY\020\001\022\030\n\024DEP" + + "RECATED_UNHEALTHY\020\002\022\013\n\007TIMEOUT\020\003\022\030\n\024UNHE" + + "ALTHY_TENSORFLOW\020\004\022\031\n\025UNHEALTHY_MAINTENA" + + "NCE\020\005\"O\n\nApiVersion\022\033\n\027API_VERSION_UNSPE" + + "CIFIED\020\000\022\r\n\tV1_ALPHA1\020\001\022\006\n\002V1\020\002\022\r\n\tV2_AL" + + "PHA1\020\003:R\352AO\n\027tpu.googleapis.com/Node\0224pr" + + "ojects/{project}/locations/{location}/no" + + "des/{node}\"j\n\020ListNodesRequest\022/\n\006parent" + + "\030\001 \001(\tB\037\340A\002\372A\031\022\027tpu.googleapis.com/Node\022" + + "\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k" + + "\n\021ListNodesResponse\022(\n\005nodes\030\001 \003(\0132\031.goo" + + "gle.cloud.tpu.v1.Node\022\027\n\017next_page_token" + + "\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"?\n\016GetNodeRe" + + "quest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googlea" + + "pis.com/Node\"\203\001\n\021CreateNodeRequest\022/\n\006pa" + + "rent\030\001 \001(\tB\037\340A\002\372A\031\022\027tpu.googleapis.com/N" + + "ode\022\017\n\007node_id\030\002 \001(\t\022,\n\004node\030\003 \001(\0132\031.goo" + + "gle.cloud.tpu.v1.NodeB\003\340A\002\"B\n\021DeleteNode" + + "Request\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googl" + + "eapis.com/Node\">\n\022ReimageNodeRequest\022\014\n\004" + + "name\030\001 \001(\t\022\032\n\022tensorflow_version\030\002 \001(\t\"\037" + + "\n\017StopNodeRequest\022\014\n\004name\030\001 \001(\t\" \n\020Start" + + "NodeRequest\022\014\n\004name\030\001 \001(\t\"\257\001\n\021TensorFlow" + + "Version\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 \001(\t:{" + + "\352Ax\n$tpu.googleapis.com/TensorFlowVersio" + + "n\022Pprojects/{project}/locations/{locatio" + + "n}/tensorFlowVersions/{tensor_flow_versi" + + "on}\"Y\n\033GetTensorFlowVersionRequest\022:\n\004na" + + "me\030\001 \001(\tB,\340A\002\372A&\n$tpu.googleapis.com/Ten" + + "sorFlowVersion\"\246\001\n\035ListTensorFlowVersion" + + "sRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$tpu.go" + + "ogleapis.com/TensorFlowVersion\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030" + + "\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\223\001\n\036ListTensorFl" + + "owVersionsResponse\022C\n\023tensorflow_version" + + "s\030\001 \003(\0132&.google.cloud.tpu.v1.TensorFlow" + + "Version\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"\243\001\n\017AcceleratorType\022\014\n\004nam" + + "e\030\001 \001(\t\022\014\n\004type\030\002 \001(\t:t\352Aq\n\"tpu.googleap" + + "is.com/AcceleratorType\022Kprojects/{projec" + + "t}/locations/{location}/acceleratorTypes" + + "/{accelerator_type}\"U\n\031GetAcceleratorTyp" + + "eRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"tpu.goog" + + "leapis.com/AcceleratorType\"\242\001\n\033ListAccel" + + "eratorTypesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372" + + "A$\n\"tpu.googleapis.com/AcceleratorType\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n" + + "\006filter\030\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\215\001\n\034List" + + "AcceleratorTypesResponse\022?\n\021accelerator_" + + "types\030\001 \003(\0132$.google.cloud.tpu.v1.Accele" + + "ratorType\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013un" + + "reachable\030\003 \003(\t\"\326\001\n\021OperationMetadata\022/\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estamp\022,\n\010end_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004verb\030\004 \001" + + "(\t\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020cancel_requ" + + "ested\030\006 \001(\010\022\023\n\013api_version\030\007 \001(\t\"\305\002\n\007Sym" + + "ptom\022/\n\013create_time\030\001 \001(\0132\032.google.proto" + + "buf.Timestamp\022>\n\014symptom_type\030\002 \001(\0162(.go" + + "ogle.cloud.tpu.v1.Symptom.SymptomType\022\017\n" + + "\007details\030\003 \001(\t\022\021\n\tworker_id\030\004 \001(\t\"\244\001\n\013Sy" + + "mptomType\022\034\n\030SYMPTOM_TYPE_UNSPECIFIED\020\000\022" + + "\016\n\nLOW_MEMORY\020\001\022\021\n\rOUT_OF_MEMORY\020\002\022\025\n\021EX" + + "ECUTE_TIMED_OUT\020\003\022\023\n\017MESH_BUILD_FAIL\020\004\022\025" + + "\n\021HBM_OUT_OF_MEMORY\020\005\022\021\n\rPROJECT_ABUSE\020\006" + + "2\336\017\n\003Tpu\022\226\001\n\tListNodes\022%.google.cloud.tp" + + "u.v1.ListNodesRequest\032&.google.cloud.tpu" + + ".v1.ListNodesResponse\":\202\323\344\223\002+\022)/v1/{pare" + + "nt=projects/*/locations/*}/nodes\332A\006paren" + + "t\022\203\001\n\007GetNode\022#.google.cloud.tpu.v1.GetN" + + "odeRequest\032\031.google.cloud.tpu.v1.Node\"8\202" + + "\323\344\223\002+\022)/v1/{name=projects/*/locations/*/" + + "nodes/*}\332A\004name\022\276\001\n\nCreateNode\022&.google." + + "cloud.tpu.v1.CreateNodeRequest\032\035.google." + + "longrunning.Operation\"i\202\323\344\223\0021\")/v1/{pare" + + "nt=projects/*/locations/*}/nodes:\004node\332A" + + "\023parent,node,node_id\312A\031\n\004Node\022\021Operation" + + "Metadata\022\251\001\n\nDeleteNode\022&.google.cloud.t" + + "pu.v1.DeleteNodeRequest\032\035.google.longrun" + + "ning.Operation\"T\202\323\344\223\002+*)/v1/{name=projec" + + "ts/*/locations/*/nodes/*}\332A\004name\312A\031\n\004Nod" + + "e\022\021OperationMetadata\022\257\001\n\013ReimageNode\022\'.g" + + "oogle.cloud.tpu.v1.ReimageNodeRequest\032\035." + + "google.longrunning.Operation\"X\202\323\344\223\0026\"1/v" + + "1/{name=projects/*/locations/*/nodes/*}:" + + "reimage:\001*\312A\031\n\004Node\022\021OperationMetadata\022\246" + + "\001\n\010StopNode\022$.google.cloud.tpu.v1.StopNo" + + "deRequest\032\035.google.longrunning.Operation" + + "\"U\202\323\344\223\0023\"./v1/{name=projects/*/locations" + + "/*/nodes/*}:stop:\001*\312A\031\n\004Node\022\021OperationM" + + "etadata\022\251\001\n\tStartNode\022%.google.cloud.tpu" + + ".v1.StartNodeRequest\032\035.google.longrunnin" + + "g.Operation\"V\202\323\344\223\0024\"//v1/{name=projects/" + + "*/locations/*/nodes/*}:start:\001*\312A\031\n\004Node" + + "\022\021OperationMetadata\022\312\001\n\026ListTensorFlowVe" + + "rsions\0222.google.cloud.tpu.v1.ListTensorF" + + "lowVersionsRequest\0323.google.cloud.tpu.v1" + + ".ListTensorFlowVersionsResponse\"G\202\323\344\223\0028\022" + + "6/v1/{parent=projects/*/locations/*}/ten" + + "sorflowVersions\332A\006parent\022\267\001\n\024GetTensorFl" + + "owVersion\0220.google.cloud.tpu.v1.GetTenso" + + "rFlowVersionRequest\032&.google.cloud.tpu.v" + + "1.TensorFlowVersion\"E\202\323\344\223\0028\0226/v1/{name=p" + + "rojects/*/locations/*/tensorflowVersions" + + "/*}\332A\004name\022\302\001\n\024ListAcceleratorTypes\0220.go" + + "ogle.cloud.tpu.v1.ListAcceleratorTypesRe" + + "quest\0321.google.cloud.tpu.v1.ListAccelera" + + "torTypesResponse\"E\202\323\344\223\0026\0224/v1/{parent=pr" + + "ojects/*/locations/*}/acceleratorTypes\332A" + + "\006parent\022\257\001\n\022GetAcceleratorType\022..google." + + "cloud.tpu.v1.GetAcceleratorTypeRequest\032$" + + ".google.cloud.tpu.v1.AcceleratorType\"C\202\323" + + "\344\223\0026\0224/v1/{name=projects/*/locations/*/a" + + "cceleratorTypes/*}\332A\004name\032F\312A\022tpu.google" + + "apis.com\322A.https://www.googleapis.com/au" + + "th/cloud-platformBb\n\027com.google.cloud.tp" + + "u.v1B\rCloudTpuProtoP\001Z6google.golang.org" + + "/genproto/googleapis/cloud/tpu/v1;tpub\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor, + new java.lang.String[] { "Preemptible", "Reserved", }); + internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor, + new java.lang.String[] { "IpAddress", "Port", }); + internal_static_google_cloud_tpu_v1_Node_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_Node_descriptor, + new java.lang.String[] { "Name", "Description", "AcceleratorType", "IpAddress", "Port", "State", "HealthDescription", "TensorflowVersion", "Network", "CidrBlock", "ServiceAccount", "CreateTime", "SchedulingConfig", "NetworkEndpoints", "Health", "Labels", "UseServiceNetworking", "ApiVersion", "Symptoms", }); + internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor = + internal_static_google_cloud_tpu_v1_Node_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_tpu_v1_Node_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", }); + internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor, + new java.lang.String[] { "Nodes", "NextPageToken", "Unreachable", }); + internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor, + new java.lang.String[] { "Parent", "NodeId", "Node", }); + internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor, + new java.lang.String[] { "Name", "TensorflowVersion", }); + internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor, + new java.lang.String[] { "Name", "Version", }); + internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor, + new java.lang.String[] { "TensorflowVersions", "NextPageToken", "Unreachable", }); + internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_tpu_v1_AcceleratorType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_AcceleratorType_descriptor, + new java.lang.String[] { "Name", "Type", }); + internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor, + new java.lang.String[] { "AcceleratorTypes", "NextPageToken", "Unreachable", }); + internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor, + new java.lang.String[] { "CreateTime", "EndTime", "Target", "Verb", "StatusDetail", "CancelRequested", "ApiVersion", }); + internal_static_google_cloud_tpu_v1_Symptom_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tpu_v1_Symptom_descriptor, + new java.lang.String[] { "CreateTime", "SymptomType", "Details", "WorkerId", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequest.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequest.java index 93f0d5f0ea2b..05efff182e19 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequest.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [CreateNode][google.cloud.tpu.v1.Tpu.CreateNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.CreateNodeRequest} */ -public final class CreateNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class CreateNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.CreateNodeRequest) CreateNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use CreateNodeRequest.newBuilder() to construct. private CreateNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CreateNodeRequest() { parent_ = ""; nodeId_ = ""; @@ -44,43 +26,37 @@ private CreateNodeRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new CreateNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.CreateNodeRequest.class, - com.google.cloud.tpu.v1.CreateNodeRequest.Builder.class); + com.google.cloud.tpu.v1.CreateNodeRequest.class, com.google.cloud.tpu.v1.CreateNodeRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -89,31 +65,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -124,14 +98,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int NODE_ID_FIELD_NUMBER = 2; private volatile java.lang.Object nodeId_; /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The nodeId. */ @java.lang.Override @@ -140,29 +111,29 @@ public java.lang.String getNodeId() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nodeId_ = s; return s; } } /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The bytes for nodeId. */ @java.lang.Override - public com.google.protobuf.ByteString getNodeIdBytes() { + public com.google.protobuf.ByteString + getNodeIdBytes() { java.lang.Object ref = nodeId_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nodeId_ = b; return b; } else { @@ -173,14 +144,11 @@ public com.google.protobuf.ByteString getNodeIdBytes() { public static final int NODE_FIELD_NUMBER = 3; private com.google.cloud.tpu.v1.Node node_; /** - * - * *
    * Required. The node.
    * 
* * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * * @return Whether the node field is set. */ @java.lang.Override @@ -188,14 +156,11 @@ public boolean hasNode() { return node_ != null; } /** - * - * *
    * Required. The node.
    * 
* * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * * @return The node. */ @java.lang.Override @@ -203,8 +168,6 @@ public com.google.cloud.tpu.v1.Node getNode() { return node_ == null ? com.google.cloud.tpu.v1.Node.getDefaultInstance() : node_; } /** - * - * *
    * Required. The node.
    * 
@@ -217,7 +180,6 @@ public com.google.cloud.tpu.v1.NodeOrBuilder getNodeOrBuilder() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -229,7 +191,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -255,7 +218,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nodeId_); } if (node_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNode()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNode()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -265,19 +229,21 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.CreateNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v1.CreateNodeRequest other = - (com.google.cloud.tpu.v1.CreateNodeRequest) obj; + com.google.cloud.tpu.v1.CreateNodeRequest other = (com.google.cloud.tpu.v1.CreateNodeRequest) obj; - if (!getParent().equals(other.getParent())) return false; - if (!getNodeId().equals(other.getNodeId())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (!getNodeId() + .equals(other.getNodeId())) return false; if (hasNode() != other.hasNode()) return false; if (hasNode()) { - if (!getNode().equals(other.getNode())) return false; + if (!getNode() + .equals(other.getNode())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -303,136 +269,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.CreateNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.CreateNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.CreateNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.CreateNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [CreateNode][google.cloud.tpu.v1.Tpu.CreateNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.CreateNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.CreateNodeRequest) com.google.cloud.tpu.v1.CreateNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_CreateNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.CreateNodeRequest.class, - com.google.cloud.tpu.v1.CreateNodeRequest.Builder.class); + com.google.cloud.tpu.v1.CreateNodeRequest.class, com.google.cloud.tpu.v1.CreateNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.CreateNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -450,9 +410,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_CreateNodeRequest_descriptor; } @java.lang.Override @@ -471,8 +431,7 @@ public com.google.cloud.tpu.v1.CreateNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.CreateNodeRequest buildPartial() { - com.google.cloud.tpu.v1.CreateNodeRequest result = - new com.google.cloud.tpu.v1.CreateNodeRequest(this); + com.google.cloud.tpu.v1.CreateNodeRequest result = new com.google.cloud.tpu.v1.CreateNodeRequest(this); result.parent_ = parent_; result.nodeId_ = nodeId_; if (nodeBuilder_ == null) { @@ -488,39 +447,38 @@ public com.google.cloud.tpu.v1.CreateNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.CreateNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v1.CreateNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.CreateNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -566,31 +524,29 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); + case 10: { + parent_ = input.readStringRequireUtf8(); - break; - } // case 10 - case 18: - { - nodeId_ = input.readStringRequireUtf8(); + break; + } // case 10 + case 18: { + nodeId_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - input.readMessage(getNodeFieldBuilder().getBuilder(), extensionRegistry); + break; + } // case 18 + case 26: { + input.readMessage( + getNodeFieldBuilder().getBuilder(), + extensionRegistry); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -603,22 +559,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -627,23 +579,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -651,67 +600,54 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; @@ -719,20 +655,18 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { private java.lang.Object nodeId_ = ""; /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @return The nodeId. */ public java.lang.String getNodeId() { java.lang.Object ref = nodeId_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nodeId_ = s; return s; @@ -741,21 +675,20 @@ public java.lang.String getNodeId() { } } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @return The bytes for nodeId. */ - public com.google.protobuf.ByteString getNodeIdBytes() { + public com.google.protobuf.ByteString + getNodeIdBytes() { java.lang.Object ref = nodeId_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nodeId_ = b; return b; } else { @@ -763,61 +696,54 @@ public com.google.protobuf.ByteString getNodeIdBytes() { } } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @param value The nodeId to set. * @return This builder for chaining. */ - public Builder setNodeId(java.lang.String value) { + public Builder setNodeId( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nodeId_ = value; onChanged(); return this; } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @return This builder for chaining. */ public Builder clearNodeId() { - + nodeId_ = getDefaultInstance().getNodeId(); onChanged(); return this; } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @param value The bytes for nodeId to set. * @return This builder for chaining. */ - public Builder setNodeIdBytes(com.google.protobuf.ByteString value) { + public Builder setNodeIdBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nodeId_ = value; onChanged(); return this; @@ -825,33 +751,24 @@ public Builder setNodeIdBytes(com.google.protobuf.ByteString value) { private com.google.cloud.tpu.v1.Node node_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v1.Node, - com.google.cloud.tpu.v1.Node.Builder, - com.google.cloud.tpu.v1.NodeOrBuilder> - nodeBuilder_; + com.google.cloud.tpu.v1.Node, com.google.cloud.tpu.v1.Node.Builder, com.google.cloud.tpu.v1.NodeOrBuilder> nodeBuilder_; /** - * - * *
      * Required. The node.
      * 
* * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * * @return Whether the node field is set. */ public boolean hasNode() { return nodeBuilder_ != null || node_ != null; } /** - * - * *
      * Required. The node.
      * 
* * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * * @return The node. */ public com.google.cloud.tpu.v1.Node getNode() { @@ -862,8 +779,6 @@ public com.google.cloud.tpu.v1.Node getNode() { } } /** - * - * *
      * Required. The node.
      * 
@@ -884,15 +799,14 @@ public Builder setNode(com.google.cloud.tpu.v1.Node value) { return this; } /** - * - * *
      * Required. The node.
      * 
* * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ - public Builder setNode(com.google.cloud.tpu.v1.Node.Builder builderForValue) { + public Builder setNode( + com.google.cloud.tpu.v1.Node.Builder builderForValue) { if (nodeBuilder_ == null) { node_ = builderForValue.build(); onChanged(); @@ -903,8 +817,6 @@ public Builder setNode(com.google.cloud.tpu.v1.Node.Builder builderForValue) { return this; } /** - * - * *
      * Required. The node.
      * 
@@ -914,7 +826,8 @@ public Builder setNode(com.google.cloud.tpu.v1.Node.Builder builderForValue) { public Builder mergeNode(com.google.cloud.tpu.v1.Node value) { if (nodeBuilder_ == null) { if (node_ != null) { - node_ = com.google.cloud.tpu.v1.Node.newBuilder(node_).mergeFrom(value).buildPartial(); + node_ = + com.google.cloud.tpu.v1.Node.newBuilder(node_).mergeFrom(value).buildPartial(); } else { node_ = value; } @@ -926,8 +839,6 @@ public Builder mergeNode(com.google.cloud.tpu.v1.Node value) { return this; } /** - * - * *
      * Required. The node.
      * 
@@ -946,8 +857,6 @@ public Builder clearNode() { return this; } /** - * - * *
      * Required. The node.
      * 
@@ -955,13 +864,11 @@ public Builder clearNode() { * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.cloud.tpu.v1.Node.Builder getNodeBuilder() { - + onChanged(); return getNodeFieldBuilder().getBuilder(); } /** - * - * *
      * Required. The node.
      * 
@@ -972,12 +879,11 @@ public com.google.cloud.tpu.v1.NodeOrBuilder getNodeOrBuilder() { if (nodeBuilder_ != null) { return nodeBuilder_.getMessageOrBuilder(); } else { - return node_ == null ? com.google.cloud.tpu.v1.Node.getDefaultInstance() : node_; + return node_ == null ? + com.google.cloud.tpu.v1.Node.getDefaultInstance() : node_; } } /** - * - * *
      * Required. The node.
      * 
@@ -985,24 +891,21 @@ public com.google.cloud.tpu.v1.NodeOrBuilder getNodeOrBuilder() { * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v1.Node, - com.google.cloud.tpu.v1.Node.Builder, - com.google.cloud.tpu.v1.NodeOrBuilder> + com.google.cloud.tpu.v1.Node, com.google.cloud.tpu.v1.Node.Builder, com.google.cloud.tpu.v1.NodeOrBuilder> getNodeFieldBuilder() { if (nodeBuilder_ == null) { - nodeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v1.Node, - com.google.cloud.tpu.v1.Node.Builder, - com.google.cloud.tpu.v1.NodeOrBuilder>( - getNode(), getParentForChildren(), isClean()); + nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v1.Node, com.google.cloud.tpu.v1.Node.Builder, com.google.cloud.tpu.v1.NodeOrBuilder>( + getNode(), + getParentForChildren(), + isClean()); node_ = null; } return nodeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1012,12 +915,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.CreateNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.CreateNodeRequest) private static final com.google.cloud.tpu.v1.CreateNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.CreateNodeRequest(); } @@ -1026,27 +929,27 @@ public static com.google.cloud.tpu.v1.CreateNodeRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1061,4 +964,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.CreateNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequestOrBuilder.java similarity index 57% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequestOrBuilder.java index 2f6aae517a8c..caad16ada543 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/CreateNodeRequestOrBuilder.java @@ -1,109 +1,71 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface CreateNodeRequestOrBuilder - extends +public interface CreateNodeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.CreateNodeRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The nodeId. */ java.lang.String getNodeId(); /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The bytes for nodeId. */ - com.google.protobuf.ByteString getNodeIdBytes(); + com.google.protobuf.ByteString + getNodeIdBytes(); /** - * - * *
    * Required. The node.
    * 
* * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * * @return Whether the node field is set. */ boolean hasNode(); /** - * - * *
    * Required. The node.
    * 
* * .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * * @return The node. */ com.google.cloud.tpu.v1.Node getNode(); /** - * - * *
    * Required. The node.
    * 
diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequest.java similarity index 60% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequest.java index a0bdf5267ec4..1f3d5bf8274f 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequest.java @@ -1,85 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [DeleteNode][google.cloud.tpu.v1.Tpu.DeleteNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.DeleteNodeRequest} */ -public final class DeleteNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class DeleteNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.DeleteNodeRequest) DeleteNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use DeleteNodeRequest.newBuilder() to construct. private DeleteNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteNodeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new DeleteNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.DeleteNodeRequest.class, - com.google.cloud.tpu.v1.DeleteNodeRequest.Builder.class); + com.google.cloud.tpu.v1.DeleteNodeRequest.class, com.google.cloud.tpu.v1.DeleteNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -88,31 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -121,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -133,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -157,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.DeleteNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v1.DeleteNodeRequest other = - (com.google.cloud.tpu.v1.DeleteNodeRequest) obj; + com.google.cloud.tpu.v1.DeleteNodeRequest other = (com.google.cloud.tpu.v1.DeleteNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -184,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.DeleteNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.DeleteNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.DeleteNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [DeleteNode][google.cloud.tpu.v1.Tpu.DeleteNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.DeleteNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.DeleteNodeRequest) com.google.cloud.tpu.v1.DeleteNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_DeleteNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.DeleteNodeRequest.class, - com.google.cloud.tpu.v1.DeleteNodeRequest.Builder.class); + com.google.cloud.tpu.v1.DeleteNodeRequest.class, com.google.cloud.tpu.v1.DeleteNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.DeleteNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -323,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_DeleteNodeRequest_descriptor; } @java.lang.Override @@ -344,8 +312,7 @@ public com.google.cloud.tpu.v1.DeleteNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.DeleteNodeRequest buildPartial() { - com.google.cloud.tpu.v1.DeleteNodeRequest result = - new com.google.cloud.tpu.v1.DeleteNodeRequest(this); + com.google.cloud.tpu.v1.DeleteNodeRequest result = new com.google.cloud.tpu.v1.DeleteNodeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -355,39 +322,38 @@ public com.google.cloud.tpu.v1.DeleteNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.DeleteNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v1.DeleteNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.DeleteNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -426,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -451,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -475,23 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -499,74 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -576,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.DeleteNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.DeleteNodeRequest) private static final com.google.cloud.tpu.v1.DeleteNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.DeleteNodeRequest(); } @@ -590,27 +534,27 @@ public static com.google.cloud.tpu.v1.DeleteNodeRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -625,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.DeleteNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java new file mode 100644 index 000000000000..4d7d791c980d --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/DeleteNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public interface DeleteNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.DeleteNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequest.java similarity index 61% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequest.java index 6e375d56b2c1..df07b0b79087 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequest.java @@ -1,85 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [GetAcceleratorType][google.cloud.tpu.v1.Tpu.GetAcceleratorType].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.GetAcceleratorTypeRequest} */ -public final class GetAcceleratorTypeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetAcceleratorTypeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.GetAcceleratorTypeRequest) GetAcceleratorTypeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetAcceleratorTypeRequest.newBuilder() to construct. private GetAcceleratorTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetAcceleratorTypeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetAcceleratorTypeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.class, - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.Builder.class); + com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.class, com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -88,31 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -121,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -133,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -157,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.GetAcceleratorTypeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest other = - (com.google.cloud.tpu.v1.GetAcceleratorTypeRequest) obj; + com.google.cloud.tpu.v1.GetAcceleratorTypeRequest other = (com.google.cloud.tpu.v1.GetAcceleratorTypeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -185,135 +159,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.GetAcceleratorTypeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [GetAcceleratorType][google.cloud.tpu.v1.Tpu.GetAcceleratorType].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.GetAcceleratorTypeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.GetAcceleratorTypeRequest) com.google.cloud.tpu.v1.GetAcceleratorTypeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.class, - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.Builder.class); + com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.class, com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -323,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetAcceleratorTypeRequest_descriptor; } @java.lang.Override @@ -344,8 +312,7 @@ public com.google.cloud.tpu.v1.GetAcceleratorTypeRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.GetAcceleratorTypeRequest buildPartial() { - com.google.cloud.tpu.v1.GetAcceleratorTypeRequest result = - new com.google.cloud.tpu.v1.GetAcceleratorTypeRequest(this); + com.google.cloud.tpu.v1.GetAcceleratorTypeRequest result = new com.google.cloud.tpu.v1.GetAcceleratorTypeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -355,39 +322,38 @@ public com.google.cloud.tpu.v1.GetAcceleratorTypeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.GetAcceleratorTypeRequest) { - return mergeFrom((com.google.cloud.tpu.v1.GetAcceleratorTypeRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.GetAcceleratorTypeRequest)other); } else { super.mergeFrom(other); return this; @@ -395,8 +361,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v1.GetAcceleratorTypeRequest other) { - if (other == com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v1.GetAcceleratorTypeRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); @@ -427,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -452,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -476,23 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -500,74 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -577,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.GetAcceleratorTypeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.GetAcceleratorTypeRequest) private static final com.google.cloud.tpu.v1.GetAcceleratorTypeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.GetAcceleratorTypeRequest(); } @@ -591,27 +534,27 @@ public static com.google.cloud.tpu.v1.GetAcceleratorTypeRequest getDefaultInstan return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAcceleratorTypeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAcceleratorTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -626,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() public com.google.cloud.tpu.v1.GetAcceleratorTypeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java new file mode 100644 index 000000000000..38110e7d35ab --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetAcceleratorTypeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public interface GetAcceleratorTypeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.GetAcceleratorTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequest.java similarity index 61% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequest.java index d2d971b7ad65..9354630e8a9c 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequest.java @@ -1,85 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [GetNode][google.cloud.tpu.v1.Tpu.GetNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.GetNodeRequest} */ -public final class GetNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.GetNodeRequest) GetNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetNodeRequest.newBuilder() to construct. private GetNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetNodeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.GetNodeRequest.class, - com.google.cloud.tpu.v1.GetNodeRequest.Builder.class); + com.google.cloud.tpu.v1.GetNodeRequest.class, com.google.cloud.tpu.v1.GetNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -88,31 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -121,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -133,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -157,14 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.GetNodeRequest)) { return super.equals(obj); } com.google.cloud.tpu.v1.GetNodeRequest other = (com.google.cloud.tpu.v1.GetNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -183,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.GetNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [GetNode][google.cloud.tpu.v1.Tpu.GetNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.GetNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.GetNodeRequest) com.google.cloud.tpu.v1.GetNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.GetNodeRequest.class, - com.google.cloud.tpu.v1.GetNodeRequest.Builder.class); + com.google.cloud.tpu.v1.GetNodeRequest.class, com.google.cloud.tpu.v1.GetNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.GetNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -322,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetNodeRequest_descriptor; } @java.lang.Override @@ -343,8 +312,7 @@ public com.google.cloud.tpu.v1.GetNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.GetNodeRequest buildPartial() { - com.google.cloud.tpu.v1.GetNodeRequest result = - new com.google.cloud.tpu.v1.GetNodeRequest(this); + com.google.cloud.tpu.v1.GetNodeRequest result = new com.google.cloud.tpu.v1.GetNodeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -354,39 +322,38 @@ public com.google.cloud.tpu.v1.GetNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.GetNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v1.GetNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.GetNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -425,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -450,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -474,23 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -498,74 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -575,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.GetNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.GetNodeRequest) private static final com.google.cloud.tpu.v1.GetNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.GetNodeRequest(); } @@ -589,27 +534,27 @@ public static com.google.cloud.tpu.v1.GetNodeRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -624,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.GetNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java new file mode 100644 index 000000000000..1e1c45faf8c2 --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public interface GetNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.GetNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequest.java similarity index 61% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequest.java index b96b96337d63..681f9205fc5b 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequest.java @@ -1,85 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [GetTensorFlowVersion][google.cloud.tpu.v1.Tpu.GetTensorFlowVersion].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.GetTensorFlowVersionRequest} */ -public final class GetTensorFlowVersionRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetTensorFlowVersionRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.GetTensorFlowVersionRequest) GetTensorFlowVersionRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetTensorFlowVersionRequest.newBuilder() to construct. private GetTensorFlowVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetTensorFlowVersionRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetTensorFlowVersionRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.class, - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.Builder.class); + com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.class, com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -88,31 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -121,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -133,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -157,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.GetTensorFlowVersionRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest other = - (com.google.cloud.tpu.v1.GetTensorFlowVersionRequest) obj; + com.google.cloud.tpu.v1.GetTensorFlowVersionRequest other = (com.google.cloud.tpu.v1.GetTensorFlowVersionRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -185,135 +159,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.GetTensorFlowVersionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [GetTensorFlowVersion][google.cloud.tpu.v1.Tpu.GetTensorFlowVersion].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.GetTensorFlowVersionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.GetTensorFlowVersionRequest) com.google.cloud.tpu.v1.GetTensorFlowVersionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.class, - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.Builder.class); + com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.class, com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -323,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_GetTensorFlowVersionRequest_descriptor; } @java.lang.Override @@ -344,8 +312,7 @@ public com.google.cloud.tpu.v1.GetTensorFlowVersionRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.GetTensorFlowVersionRequest buildPartial() { - com.google.cloud.tpu.v1.GetTensorFlowVersionRequest result = - new com.google.cloud.tpu.v1.GetTensorFlowVersionRequest(this); + com.google.cloud.tpu.v1.GetTensorFlowVersionRequest result = new com.google.cloud.tpu.v1.GetTensorFlowVersionRequest(this); result.name_ = name_; onBuilt(); return result; @@ -355,39 +322,38 @@ public com.google.cloud.tpu.v1.GetTensorFlowVersionRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.GetTensorFlowVersionRequest) { - return mergeFrom((com.google.cloud.tpu.v1.GetTensorFlowVersionRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.GetTensorFlowVersionRequest)other); } else { super.mergeFrom(other); return this; @@ -395,8 +361,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v1.GetTensorFlowVersionRequest other) { - if (other == com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v1.GetTensorFlowVersionRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); @@ -427,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -452,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -476,23 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -500,74 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -577,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.GetTensorFlowVersionRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.GetTensorFlowVersionRequest) private static final com.google.cloud.tpu.v1.GetTensorFlowVersionRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.GetTensorFlowVersionRequest(); } @@ -591,27 +534,27 @@ public static com.google.cloud.tpu.v1.GetTensorFlowVersionRequest getDefaultInst return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTensorFlowVersionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTensorFlowVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -626,4 +569,6 @@ public com.google.protobuf.Parser getParserForType( public com.google.cloud.tpu.v1.GetTensorFlowVersionRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java new file mode 100644 index 000000000000..8be72b5bb0a8 --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/GetTensorFlowVersionRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public interface GetTensorFlowVersionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.GetTensorFlowVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequest.java similarity index 67% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequest.java index 94caa5beb778..7460a6b1c948 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequest.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.ListAcceleratorTypesRequest} */ -public final class ListAcceleratorTypesRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListAcceleratorTypesRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.ListAcceleratorTypesRequest) ListAcceleratorTypesRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListAcceleratorTypesRequest.newBuilder() to construct. private ListAcceleratorTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListAcceleratorTypesRequest() { parent_ = ""; pageToken_ = ""; @@ -46,43 +28,37 @@ private ListAcceleratorTypesRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListAcceleratorTypesRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.class, - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.Builder.class); + com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.class, com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -91,31 +67,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -126,14 +100,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_; /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -144,14 +115,11 @@ public int getPageSize() { public static final int PAGE_TOKEN_FIELD_NUMBER = 3; private volatile java.lang.Object pageToken_; /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ @java.lang.Override @@ -160,29 +128,29 @@ public java.lang.String getPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; } } /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -193,14 +161,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public static final int FILTER_FIELD_NUMBER = 5; private volatile java.lang.Object filter_; /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ @java.lang.Override @@ -209,29 +174,29 @@ public java.lang.String getFilter() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; } } /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -242,14 +207,11 @@ public com.google.protobuf.ByteString getFilterBytes() { public static final int ORDER_BY_FIELD_NUMBER = 6; private volatile java.lang.Object orderBy_; /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ @java.lang.Override @@ -258,29 +220,29 @@ public java.lang.String getOrderBy() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; } } /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -289,7 +251,6 @@ public com.google.protobuf.ByteString getOrderByBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -301,7 +262,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -330,7 +292,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); @@ -349,19 +312,23 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.ListAcceleratorTypesRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest other = - (com.google.cloud.tpu.v1.ListAcceleratorTypesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; + com.google.cloud.tpu.v1.ListAcceleratorTypesRequest other = (com.google.cloud.tpu.v1.ListAcceleratorTypesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -389,135 +356,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.ListAcceleratorTypesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.ListAcceleratorTypesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.ListAcceleratorTypesRequest) com.google.cloud.tpu.v1.ListAcceleratorTypesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.class, - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.Builder.class); + com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.class, com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -535,9 +496,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesRequest_descriptor; } @java.lang.Override @@ -556,8 +517,7 @@ public com.google.cloud.tpu.v1.ListAcceleratorTypesRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.ListAcceleratorTypesRequest buildPartial() { - com.google.cloud.tpu.v1.ListAcceleratorTypesRequest result = - new com.google.cloud.tpu.v1.ListAcceleratorTypesRequest(this); + com.google.cloud.tpu.v1.ListAcceleratorTypesRequest result = new com.google.cloud.tpu.v1.ListAcceleratorTypesRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; @@ -571,39 +531,38 @@ public com.google.cloud.tpu.v1.ListAcceleratorTypesRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.ListAcceleratorTypesRequest) { - return mergeFrom((com.google.cloud.tpu.v1.ListAcceleratorTypesRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.ListAcceleratorTypesRequest)other); } else { super.mergeFrom(other); return this; @@ -611,8 +570,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v1.ListAcceleratorTypesRequest other) { - if (other == com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v1.ListAcceleratorTypesRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -658,43 +616,37 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); + case 10: { + parent_ = input.readStringRequireUtf8(); - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); - break; - } // case 26 - case 42: - { - filter_ = input.readStringRequireUtf8(); + break; + } // case 26 + case 42: { + filter_ = input.readStringRequireUtf8(); - break; - } // case 42 - case 50: - { - orderBy_ = input.readStringRequireUtf8(); + break; + } // case 42 + case 50: { + orderBy_ = input.readStringRequireUtf8(); - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -707,22 +659,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -731,23 +679,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -755,82 +700,66 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; } - private int pageSize_; + private int pageSize_ ; /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -838,36 +767,30 @@ public int getPageSize() { return pageSize_; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @param value The pageSize to set. * @return This builder for chaining. */ public Builder setPageSize(int value) { - + pageSize_ = value; onChanged(); return this; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return This builder for chaining. */ public Builder clearPageSize() { - + pageSize_ = 0; onChanged(); return this; @@ -875,20 +798,18 @@ public Builder clearPageSize() { private java.lang.Object pageToken_ = ""; /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The pageToken. */ public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; @@ -897,21 +818,20 @@ public java.lang.String getPageToken() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -919,61 +839,54 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The pageToken to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + pageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return This builder for chaining. */ public Builder clearPageToken() { - + pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; onChanged(); return this; @@ -981,20 +894,18 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { private java.lang.Object filter_ = ""; /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; @@ -1003,21 +914,20 @@ public java.lang.String getFilter() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The bytes for filter. */ - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -1025,61 +935,54 @@ public com.google.protobuf.ByteString getFilterBytes() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The filter to set. * @return This builder for chaining. */ - public Builder setFilter(java.lang.String value) { + public Builder setFilter( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + filter_ = value; onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return This builder for chaining. */ public Builder clearFilter() { - + filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The bytes for filter to set. * @return This builder for chaining. */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; onChanged(); return this; @@ -1087,20 +990,18 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { private java.lang.Object orderBy_ = ""; /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The orderBy. */ public java.lang.String getOrderBy() { java.lang.Object ref = orderBy_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; @@ -1109,21 +1010,20 @@ public java.lang.String getOrderBy() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -1131,68 +1031,61 @@ public com.google.protobuf.ByteString getOrderByBytes() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The orderBy to set. * @return This builder for chaining. */ - public Builder setOrderBy(java.lang.String value) { + public Builder setOrderBy( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + orderBy_ = value; onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return This builder for chaining. */ public Builder clearOrderBy() { - + orderBy_ = getDefaultInstance().getOrderBy(); onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The bytes for orderBy to set. * @return This builder for chaining. */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1202,12 +1095,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.ListAcceleratorTypesRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.ListAcceleratorTypesRequest) private static final com.google.cloud.tpu.v1.ListAcceleratorTypesRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.ListAcceleratorTypesRequest(); } @@ -1216,27 +1109,27 @@ public static com.google.cloud.tpu.v1.ListAcceleratorTypesRequest getDefaultInst return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAcceleratorTypesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAcceleratorTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1251,4 +1144,6 @@ public com.google.protobuf.Parser getParserForType( public com.google.cloud.tpu.v1.ListAcceleratorTypesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequestOrBuilder.java similarity index 57% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequestOrBuilder.java index d2b5e3b447ba..9901af4af3f7 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesRequestOrBuilder.java @@ -1,142 +1,99 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface ListAcceleratorTypesRequestOrBuilder - extends +public interface ListAcceleratorTypesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.ListAcceleratorTypesRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ int getPageSize(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ java.lang.String getPageToken(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - com.google.protobuf.ByteString getPageTokenBytes(); + com.google.protobuf.ByteString + getPageTokenBytes(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ java.lang.String getFilter(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ - com.google.protobuf.ByteString getFilterBytes(); + com.google.protobuf.ByteString + getFilterBytes(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ java.lang.String getOrderBy(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - com.google.protobuf.ByteString getOrderByBytes(); + com.google.protobuf.ByteString + getOrderByBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponse.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponse.java similarity index 73% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponse.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponse.java index 51282dd6a500..c2d3e5b78801 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponse.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponse.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Response for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.ListAcceleratorTypesResponse} */ -public final class ListAcceleratorTypesResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListAcceleratorTypesResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.ListAcceleratorTypesResponse) ListAcceleratorTypesResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListAcceleratorTypesResponse.newBuilder() to construct. private ListAcceleratorTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListAcceleratorTypesResponse() { acceleratorTypes_ = java.util.Collections.emptyList(); nextPageToken_ = ""; @@ -45,35 +27,32 @@ private ListAcceleratorTypesResponse() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListAcceleratorTypesResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.class, - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.Builder.class); + com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.class, com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.Builder.class); } public static final int ACCELERATOR_TYPES_FIELD_NUMBER = 1; private java.util.List acceleratorTypes_; /** - * - * *
    * The listed nodes.
    * 
@@ -85,8 +64,6 @@ public java.util.List getAcceleratorTyp return acceleratorTypes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -94,13 +71,11 @@ public java.util.List getAcceleratorTyp * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ @java.lang.Override - public java.util.List + public java.util.List getAcceleratorTypesOrBuilderList() { return acceleratorTypes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -112,8 +87,6 @@ public int getAcceleratorTypesCount() { return acceleratorTypes_.size(); } /** - * - * *
    * The listed nodes.
    * 
@@ -125,8 +98,6 @@ public com.google.cloud.tpu.v1.AcceleratorType getAcceleratorTypes(int index) { return acceleratorTypes_.get(index); } /** - * - * *
    * The listed nodes.
    * 
@@ -134,21 +105,19 @@ public com.google.cloud.tpu.v1.AcceleratorType getAcceleratorTypes(int index) { * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ @java.lang.Override - public com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder(int index) { + public com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( + int index) { return acceleratorTypes_.get(index); } public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; private volatile java.lang.Object nextPageToken_; /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ @java.lang.Override @@ -157,29 +126,29 @@ public java.lang.String getNextPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; } } /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -190,42 +159,34 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public static final int UNREACHABLE_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList unreachable_; /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_; } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -233,23 +194,20 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -261,7 +219,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < acceleratorTypes_.size(); i++) { output.writeMessage(1, acceleratorTypes_.get(i)); } @@ -281,7 +240,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < acceleratorTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, acceleratorTypes_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, acceleratorTypes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -302,17 +262,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.ListAcceleratorTypesResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse other = - (com.google.cloud.tpu.v1.ListAcceleratorTypesResponse) obj; + com.google.cloud.tpu.v1.ListAcceleratorTypesResponse other = (com.google.cloud.tpu.v1.ListAcceleratorTypesResponse) obj; - if (!getAcceleratorTypesList().equals(other.getAcceleratorTypesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getAcceleratorTypesList() + .equals(other.getAcceleratorTypesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -340,135 +302,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.ListAcceleratorTypesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Response for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.ListAcceleratorTypesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.ListAcceleratorTypesResponse) com.google.cloud.tpu.v1.ListAcceleratorTypesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.class, - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.Builder.class); + com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.class, com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.Builder.class); } // Construct using com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -487,9 +443,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListAcceleratorTypesResponse_descriptor; } @java.lang.Override @@ -508,8 +464,7 @@ public com.google.cloud.tpu.v1.ListAcceleratorTypesResponse build() { @java.lang.Override public com.google.cloud.tpu.v1.ListAcceleratorTypesResponse buildPartial() { - com.google.cloud.tpu.v1.ListAcceleratorTypesResponse result = - new com.google.cloud.tpu.v1.ListAcceleratorTypesResponse(this); + com.google.cloud.tpu.v1.ListAcceleratorTypesResponse result = new com.google.cloud.tpu.v1.ListAcceleratorTypesResponse(this); int from_bitField0_ = bitField0_; if (acceleratorTypesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -534,39 +489,38 @@ public com.google.cloud.tpu.v1.ListAcceleratorTypesResponse buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.ListAcceleratorTypesResponse) { - return mergeFrom((com.google.cloud.tpu.v1.ListAcceleratorTypesResponse) other); + return mergeFrom((com.google.cloud.tpu.v1.ListAcceleratorTypesResponse)other); } else { super.mergeFrom(other); return this; @@ -574,8 +528,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v1.ListAcceleratorTypesResponse other) { - if (other == com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v1.ListAcceleratorTypesResponse.getDefaultInstance()) return this; if (acceleratorTypesBuilder_ == null) { if (!other.acceleratorTypes_.isEmpty()) { if (acceleratorTypes_.isEmpty()) { @@ -594,10 +547,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v1.ListAcceleratorTypesResponse ot acceleratorTypesBuilder_ = null; acceleratorTypes_ = other.acceleratorTypes_; bitField0_ = (bitField0_ & ~0x00000001); - acceleratorTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAcceleratorTypesFieldBuilder() - : null; + acceleratorTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAcceleratorTypesFieldBuilder() : null; } else { acceleratorTypesBuilder_.addAllMessages(other.acceleratorTypes_); } @@ -643,39 +595,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v1.AcceleratorType m = - input.readMessage( - com.google.cloud.tpu.v1.AcceleratorType.parser(), extensionRegistry); - if (acceleratorTypesBuilder_ == null) { - ensureAcceleratorTypesIsMutable(); - acceleratorTypes_.add(m); - } else { - acceleratorTypesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); + case 10: { + com.google.cloud.tpu.v1.AcceleratorType m = + input.readMessage( + com.google.cloud.tpu.v1.AcceleratorType.parser(), + extensionRegistry); + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(m); + } else { + acceleratorTypesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -685,29 +634,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.util.List acceleratorTypes_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureAcceleratorTypesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - acceleratorTypes_ = - new java.util.ArrayList(acceleratorTypes_); + acceleratorTypes_ = new java.util.ArrayList(acceleratorTypes_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.AcceleratorType, - com.google.cloud.tpu.v1.AcceleratorType.Builder, - com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder> - acceleratorTypesBuilder_; + com.google.cloud.tpu.v1.AcceleratorType, com.google.cloud.tpu.v1.AcceleratorType.Builder, com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder> acceleratorTypesBuilder_; /** - * - * *
      * The listed nodes.
      * 
@@ -722,8 +663,6 @@ public java.util.List getAcceleratorTyp } } /** - * - * *
      * The listed nodes.
      * 
@@ -738,8 +677,6 @@ public int getAcceleratorTypesCount() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -754,15 +691,14 @@ public com.google.cloud.tpu.v1.AcceleratorType getAcceleratorTypes(int index) { } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - public Builder setAcceleratorTypes(int index, com.google.cloud.tpu.v1.AcceleratorType value) { + public Builder setAcceleratorTypes( + int index, com.google.cloud.tpu.v1.AcceleratorType value) { if (acceleratorTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -776,8 +712,6 @@ public Builder setAcceleratorTypes(int index, com.google.cloud.tpu.v1.Accelerato return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -796,8 +730,6 @@ public Builder setAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -818,15 +750,14 @@ public Builder addAcceleratorTypes(com.google.cloud.tpu.v1.AcceleratorType value return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - public Builder addAcceleratorTypes(int index, com.google.cloud.tpu.v1.AcceleratorType value) { + public Builder addAcceleratorTypes( + int index, com.google.cloud.tpu.v1.AcceleratorType value) { if (acceleratorTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -840,8 +771,6 @@ public Builder addAcceleratorTypes(int index, com.google.cloud.tpu.v1.Accelerato return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -860,8 +789,6 @@ public Builder addAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -880,8 +807,6 @@ public Builder addAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -892,7 +817,8 @@ public Builder addAllAcceleratorTypes( java.lang.Iterable values) { if (acceleratorTypesBuilder_ == null) { ensureAcceleratorTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, acceleratorTypes_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, acceleratorTypes_); onChanged(); } else { acceleratorTypesBuilder_.addAllMessages(values); @@ -900,8 +826,6 @@ public Builder addAllAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -919,8 +843,6 @@ public Builder clearAcceleratorTypes() { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -938,20 +860,17 @@ public Builder removeAcceleratorTypes(int index) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - public com.google.cloud.tpu.v1.AcceleratorType.Builder getAcceleratorTypesBuilder(int index) { + public com.google.cloud.tpu.v1.AcceleratorType.Builder getAcceleratorTypesBuilder( + int index) { return getAcceleratorTypesFieldBuilder().getBuilder(index); } /** - * - * *
      * The listed nodes.
      * 
@@ -961,22 +880,19 @@ public com.google.cloud.tpu.v1.AcceleratorType.Builder getAcceleratorTypesBuilde public com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( int index) { if (acceleratorTypesBuilder_ == null) { - return acceleratorTypes_.get(index); - } else { + return acceleratorTypes_.get(index); } else { return acceleratorTypesBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - public java.util.List - getAcceleratorTypesOrBuilderList() { + public java.util.List + getAcceleratorTypesOrBuilderList() { if (acceleratorTypesBuilder_ != null) { return acceleratorTypesBuilder_.getMessageOrBuilderList(); } else { @@ -984,8 +900,6 @@ public com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBui } } /** - * - * *
      * The listed nodes.
      * 
@@ -993,47 +907,38 @@ public com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBui * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ public com.google.cloud.tpu.v1.AcceleratorType.Builder addAcceleratorTypesBuilder() { - return getAcceleratorTypesFieldBuilder() - .addBuilder(com.google.cloud.tpu.v1.AcceleratorType.getDefaultInstance()); + return getAcceleratorTypesFieldBuilder().addBuilder( + com.google.cloud.tpu.v1.AcceleratorType.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - public com.google.cloud.tpu.v1.AcceleratorType.Builder addAcceleratorTypesBuilder(int index) { - return getAcceleratorTypesFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v1.AcceleratorType.getDefaultInstance()); + public com.google.cloud.tpu.v1.AcceleratorType.Builder addAcceleratorTypesBuilder( + int index) { + return getAcceleratorTypesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v1.AcceleratorType.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - public java.util.List - getAcceleratorTypesBuilderList() { + public java.util.List + getAcceleratorTypesBuilderList() { return getAcceleratorTypesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.AcceleratorType, - com.google.cloud.tpu.v1.AcceleratorType.Builder, - com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder> + com.google.cloud.tpu.v1.AcceleratorType, com.google.cloud.tpu.v1.AcceleratorType.Builder, com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder> getAcceleratorTypesFieldBuilder() { if (acceleratorTypesBuilder_ == null) { - acceleratorTypesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.AcceleratorType, - com.google.cloud.tpu.v1.AcceleratorType.Builder, - com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder>( + acceleratorTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v1.AcceleratorType, com.google.cloud.tpu.v1.AcceleratorType.Builder, com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder>( acceleratorTypes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -1045,20 +950,18 @@ public com.google.cloud.tpu.v1.AcceleratorType.Builder addAcceleratorTypesBuilde private java.lang.Object nextPageToken_ = ""; /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; @@ -1067,21 +970,20 @@ public java.lang.String getNextPageToken() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -1089,112 +991,95 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageToken(java.lang.String value) { + public Builder setNextPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nextPageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return This builder for chaining. */ public Builder clearNextPageToken() { - + nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The bytes for nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureUnreachableIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); bitField0_ |= 0x00000002; - } + } } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_.getUnmodifiableView(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -1202,90 +1087,80 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index to set the value at. * @param value The unreachable to set. * @return This builder for chaining. */ - public Builder setUnreachable(int index, java.lang.String value) { + public Builder setUnreachable( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.set(index, value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachable(java.lang.String value) { + public Builder addUnreachable( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param values The unreachable to add. * @return This builder for chaining. */ - public Builder addAllUnreachable(java.lang.Iterable values) { + public Builder addAllUnreachable( + java.lang.Iterable values) { ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return This builder for chaining. */ public Builder clearUnreachable() { @@ -1295,30 +1170,28 @@ public Builder clearUnreachable() { return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The bytes of the unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1328,12 +1201,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.ListAcceleratorTypesResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.ListAcceleratorTypesResponse) private static final com.google.cloud.tpu.v1.ListAcceleratorTypesResponse DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.ListAcceleratorTypesResponse(); } @@ -1342,27 +1215,27 @@ public static com.google.cloud.tpu.v1.ListAcceleratorTypesResponse getDefaultIns return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAcceleratorTypesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAcceleratorTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1377,4 +1250,6 @@ public com.google.protobuf.Parser getParserForType public com.google.cloud.tpu.v1.ListAcceleratorTypesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponseOrBuilder.java similarity index 70% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponseOrBuilder.java index 22c7fea3df5a..ee4a968d747b 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListAcceleratorTypesResponseOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface ListAcceleratorTypesResponseOrBuilder - extends +public interface ListAcceleratorTypesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.ListAcceleratorTypesResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - java.util.List getAcceleratorTypesList(); + java.util.List + getAcceleratorTypesList(); /** - * - * *
    * The listed nodes.
    * 
@@ -44,8 +25,6 @@ public interface ListAcceleratorTypesResponseOrBuilder */ com.google.cloud.tpu.v1.AcceleratorType getAcceleratorTypes(int index); /** - * - * *
    * The listed nodes.
    * 
@@ -54,100 +33,82 @@ public interface ListAcceleratorTypesResponseOrBuilder */ int getAcceleratorTypesCount(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - java.util.List + java.util.List getAcceleratorTypesOrBuilderList(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; */ - com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder(int index); + com.google.cloud.tpu.v1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( + int index); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - com.google.protobuf.ByteString getNextPageTokenBytes(); + com.google.protobuf.ByteString + getNextPageTokenBytes(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - java.util.List getUnreachableList(); + java.util.List + getUnreachableList(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ int getUnreachableCount(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - com.google.protobuf.ByteString getUnreachableBytes(int index); + com.google.protobuf.ByteString + getUnreachableBytes(int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequest.java similarity index 65% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequest.java index 809cb41da9b2..08cbda15c073 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequest.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [ListNodes][google.cloud.tpu.v1.Tpu.ListNodes].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.ListNodesRequest} */ -public final class ListNodesRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListNodesRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.ListNodesRequest) ListNodesRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListNodesRequest.newBuilder() to construct. private ListNodesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListNodesRequest() { parent_ = ""; pageToken_ = ""; @@ -44,43 +26,37 @@ private ListNodesRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListNodesRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListNodesRequest.class, - com.google.cloud.tpu.v1.ListNodesRequest.Builder.class); + com.google.cloud.tpu.v1.ListNodesRequest.class, com.google.cloud.tpu.v1.ListNodesRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -89,31 +65,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -124,14 +98,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_; /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -142,14 +113,11 @@ public int getPageSize() { public static final int PAGE_TOKEN_FIELD_NUMBER = 3; private volatile java.lang.Object pageToken_; /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ @java.lang.Override @@ -158,29 +126,29 @@ public java.lang.String getPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; } } /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -189,7 +157,6 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -201,7 +168,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -224,7 +192,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); @@ -237,16 +206,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.ListNodesRequest)) { return super.equals(obj); } com.google.cloud.tpu.v1.ListNodesRequest other = (com.google.cloud.tpu.v1.ListNodesRequest) obj; - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -269,136 +241,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListNodesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListNodesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListNodesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.ListNodesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [ListNodes][google.cloud.tpu.v1.Tpu.ListNodes].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.ListNodesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.ListNodesRequest) com.google.cloud.tpu.v1.ListNodesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListNodesRequest.class, - com.google.cloud.tpu.v1.ListNodesRequest.Builder.class); + com.google.cloud.tpu.v1.ListNodesRequest.class, com.google.cloud.tpu.v1.ListNodesRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.ListNodesRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -412,9 +378,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesRequest_descriptor; } @java.lang.Override @@ -433,8 +399,7 @@ public com.google.cloud.tpu.v1.ListNodesRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.ListNodesRequest buildPartial() { - com.google.cloud.tpu.v1.ListNodesRequest result = - new com.google.cloud.tpu.v1.ListNodesRequest(this); + com.google.cloud.tpu.v1.ListNodesRequest result = new com.google.cloud.tpu.v1.ListNodesRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; @@ -446,39 +411,38 @@ public com.google.cloud.tpu.v1.ListNodesRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.ListNodesRequest) { - return mergeFrom((com.google.cloud.tpu.v1.ListNodesRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.ListNodesRequest)other); } else { super.mergeFrom(other); return this; @@ -524,31 +488,27 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -561,22 +521,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -585,23 +541,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -609,82 +562,66 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; } - private int pageSize_; + private int pageSize_ ; /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -692,36 +629,30 @@ public int getPageSize() { return pageSize_; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @param value The pageSize to set. * @return This builder for chaining. */ public Builder setPageSize(int value) { - + pageSize_ = value; onChanged(); return this; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return This builder for chaining. */ public Builder clearPageSize() { - + pageSize_ = 0; onChanged(); return this; @@ -729,20 +660,18 @@ public Builder clearPageSize() { private java.lang.Object pageToken_ = ""; /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The pageToken. */ public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; @@ -751,21 +680,20 @@ public java.lang.String getPageToken() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -773,68 +701,61 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The pageToken to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + pageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return This builder for chaining. */ public Builder clearPageToken() { - + pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -844,12 +765,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.ListNodesRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.ListNodesRequest) private static final com.google.cloud.tpu.v1.ListNodesRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.ListNodesRequest(); } @@ -858,27 +779,27 @@ public static com.google.cloud.tpu.v1.ListNodesRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNodesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNodesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -893,4 +814,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.ListNodesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequestOrBuilder.java similarity index 50% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequestOrBuilder.java index fdd37af64506..78168640de9e 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesRequestOrBuilder.java @@ -1,92 +1,59 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface ListNodesRequestOrBuilder - extends +public interface ListNodesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.ListNodesRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ int getPageSize(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ java.lang.String getPageToken(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - com.google.protobuf.ByteString getPageTokenBytes(); + com.google.protobuf.ByteString + getPageTokenBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponse.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponse.java similarity index 71% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponse.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponse.java index fdf96624850d..52711dccfa6c 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponse.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponse.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Response for [ListNodes][google.cloud.tpu.v1.Tpu.ListNodes].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.ListNodesResponse} */ -public final class ListNodesResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListNodesResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.ListNodesResponse) ListNodesResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListNodesResponse.newBuilder() to construct. private ListNodesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListNodesResponse() { nodes_ = java.util.Collections.emptyList(); nextPageToken_ = ""; @@ -45,35 +27,32 @@ private ListNodesResponse() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListNodesResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListNodesResponse.class, - com.google.cloud.tpu.v1.ListNodesResponse.Builder.class); + com.google.cloud.tpu.v1.ListNodesResponse.class, com.google.cloud.tpu.v1.ListNodesResponse.Builder.class); } public static final int NODES_FIELD_NUMBER = 1; private java.util.List nodes_; /** - * - * *
    * The listed nodes.
    * 
@@ -85,8 +64,6 @@ public java.util.List getNodesList() { return nodes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -94,12 +71,11 @@ public java.util.List getNodesList() { * repeated .google.cloud.tpu.v1.Node nodes = 1; */ @java.lang.Override - public java.util.List getNodesOrBuilderList() { + public java.util.List + getNodesOrBuilderList() { return nodes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -111,8 +87,6 @@ public int getNodesCount() { return nodes_.size(); } /** - * - * *
    * The listed nodes.
    * 
@@ -124,8 +98,6 @@ public com.google.cloud.tpu.v1.Node getNodes(int index) { return nodes_.get(index); } /** - * - * *
    * The listed nodes.
    * 
@@ -133,21 +105,19 @@ public com.google.cloud.tpu.v1.Node getNodes(int index) { * repeated .google.cloud.tpu.v1.Node nodes = 1; */ @java.lang.Override - public com.google.cloud.tpu.v1.NodeOrBuilder getNodesOrBuilder(int index) { + public com.google.cloud.tpu.v1.NodeOrBuilder getNodesOrBuilder( + int index) { return nodes_.get(index); } public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; private volatile java.lang.Object nextPageToken_; /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ @java.lang.Override @@ -156,29 +126,29 @@ public java.lang.String getNextPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; } } /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -189,42 +159,34 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public static final int UNREACHABLE_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList unreachable_; /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_; } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -232,23 +194,20 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -260,7 +219,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < nodes_.size(); i++) { output.writeMessage(1, nodes_.get(i)); } @@ -280,7 +240,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < nodes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nodes_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, nodes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -301,17 +262,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.ListNodesResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v1.ListNodesResponse other = - (com.google.cloud.tpu.v1.ListNodesResponse) obj; + com.google.cloud.tpu.v1.ListNodesResponse other = (com.google.cloud.tpu.v1.ListNodesResponse) obj; - if (!getNodesList().equals(other.getNodesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getNodesList() + .equals(other.getNodesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -338,136 +301,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListNodesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListNodesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListNodesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.ListNodesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Response for [ListNodes][google.cloud.tpu.v1.Tpu.ListNodes].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.ListNodesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.ListNodesResponse) com.google.cloud.tpu.v1.ListNodesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListNodesResponse.class, - com.google.cloud.tpu.v1.ListNodesResponse.Builder.class); + com.google.cloud.tpu.v1.ListNodesResponse.class, com.google.cloud.tpu.v1.ListNodesResponse.Builder.class); } // Construct using com.google.cloud.tpu.v1.ListNodesResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -486,9 +443,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListNodesResponse_descriptor; } @java.lang.Override @@ -507,8 +464,7 @@ public com.google.cloud.tpu.v1.ListNodesResponse build() { @java.lang.Override public com.google.cloud.tpu.v1.ListNodesResponse buildPartial() { - com.google.cloud.tpu.v1.ListNodesResponse result = - new com.google.cloud.tpu.v1.ListNodesResponse(this); + com.google.cloud.tpu.v1.ListNodesResponse result = new com.google.cloud.tpu.v1.ListNodesResponse(this); int from_bitField0_ = bitField0_; if (nodesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -533,39 +489,38 @@ public com.google.cloud.tpu.v1.ListNodesResponse buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.ListNodesResponse) { - return mergeFrom((com.google.cloud.tpu.v1.ListNodesResponse) other); + return mergeFrom((com.google.cloud.tpu.v1.ListNodesResponse)other); } else { super.mergeFrom(other); return this; @@ -592,10 +547,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v1.ListNodesResponse other) { nodesBuilder_ = null; nodes_ = other.nodes_; bitField0_ = (bitField0_ & ~0x00000001); - nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNodesFieldBuilder() - : null; + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodesFieldBuilder() : null; } else { nodesBuilder_.addAllMessages(other.nodes_); } @@ -641,38 +595,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v1.Node m = - input.readMessage(com.google.cloud.tpu.v1.Node.parser(), extensionRegistry); - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(m); - } else { - nodesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); + case 10: { + com.google.cloud.tpu.v1.Node m = + input.readMessage( + com.google.cloud.tpu.v1.Node.parser(), + extensionRegistry); + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(m); + } else { + nodesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -682,27 +634,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; - private java.util.List nodes_ = java.util.Collections.emptyList(); - + private java.util.List nodes_ = + java.util.Collections.emptyList(); private void ensureNodesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { nodes_ = new java.util.ArrayList(nodes_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.Node, - com.google.cloud.tpu.v1.Node.Builder, - com.google.cloud.tpu.v1.NodeOrBuilder> - nodesBuilder_; + com.google.cloud.tpu.v1.Node, com.google.cloud.tpu.v1.Node.Builder, com.google.cloud.tpu.v1.NodeOrBuilder> nodesBuilder_; /** - * - * *
      * The listed nodes.
      * 
@@ -717,8 +663,6 @@ public java.util.List getNodesList() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -733,8 +677,6 @@ public int getNodesCount() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -749,15 +691,14 @@ public com.google.cloud.tpu.v1.Node getNodes(int index) { } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public Builder setNodes(int index, com.google.cloud.tpu.v1.Node value) { + public Builder setNodes( + int index, com.google.cloud.tpu.v1.Node value) { if (nodesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -771,15 +712,14 @@ public Builder setNodes(int index, com.google.cloud.tpu.v1.Node value) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public Builder setNodes(int index, com.google.cloud.tpu.v1.Node.Builder builderForValue) { + public Builder setNodes( + int index, com.google.cloud.tpu.v1.Node.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.set(index, builderForValue.build()); @@ -790,8 +730,6 @@ public Builder setNodes(int index, com.google.cloud.tpu.v1.Node.Builder builderF return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -812,15 +750,14 @@ public Builder addNodes(com.google.cloud.tpu.v1.Node value) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public Builder addNodes(int index, com.google.cloud.tpu.v1.Node value) { + public Builder addNodes( + int index, com.google.cloud.tpu.v1.Node value) { if (nodesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -834,15 +771,14 @@ public Builder addNodes(int index, com.google.cloud.tpu.v1.Node value) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public Builder addNodes(com.google.cloud.tpu.v1.Node.Builder builderForValue) { + public Builder addNodes( + com.google.cloud.tpu.v1.Node.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.add(builderForValue.build()); @@ -853,15 +789,14 @@ public Builder addNodes(com.google.cloud.tpu.v1.Node.Builder builderForValue) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public Builder addNodes(int index, com.google.cloud.tpu.v1.Node.Builder builderForValue) { + public Builder addNodes( + int index, com.google.cloud.tpu.v1.Node.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.add(index, builderForValue.build()); @@ -872,18 +807,18 @@ public Builder addNodes(int index, com.google.cloud.tpu.v1.Node.Builder builderF return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public Builder addAllNodes(java.lang.Iterable values) { + public Builder addAllNodes( + java.lang.Iterable values) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodes_); onChanged(); } else { nodesBuilder_.addAllMessages(values); @@ -891,8 +826,6 @@ public Builder addAllNodes(java.lang.Iterable * The listed nodes. * @@ -910,8 +843,6 @@ public Builder clearNodes() { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -929,43 +860,39 @@ public Builder removeNodes(int index) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public com.google.cloud.tpu.v1.Node.Builder getNodesBuilder(int index) { + public com.google.cloud.tpu.v1.Node.Builder getNodesBuilder( + int index) { return getNodesFieldBuilder().getBuilder(index); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public com.google.cloud.tpu.v1.NodeOrBuilder getNodesOrBuilder(int index) { + public com.google.cloud.tpu.v1.NodeOrBuilder getNodesOrBuilder( + int index) { if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { + return nodes_.get(index); } else { return nodesBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public java.util.List getNodesOrBuilderList() { + public java.util.List + getNodesOrBuilderList() { if (nodesBuilder_ != null) { return nodesBuilder_.getMessageOrBuilderList(); } else { @@ -973,8 +900,6 @@ public java.util.List getNodesO } } /** - * - * *
      * The listed nodes.
      * 
@@ -982,46 +907,42 @@ public java.util.List getNodesO * repeated .google.cloud.tpu.v1.Node nodes = 1; */ public com.google.cloud.tpu.v1.Node.Builder addNodesBuilder() { - return getNodesFieldBuilder().addBuilder(com.google.cloud.tpu.v1.Node.getDefaultInstance()); + return getNodesFieldBuilder().addBuilder( + com.google.cloud.tpu.v1.Node.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public com.google.cloud.tpu.v1.Node.Builder addNodesBuilder(int index) { - return getNodesFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v1.Node.getDefaultInstance()); + public com.google.cloud.tpu.v1.Node.Builder addNodesBuilder( + int index) { + return getNodesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v1.Node.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - public java.util.List getNodesBuilderList() { + public java.util.List + getNodesBuilderList() { return getNodesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.Node, - com.google.cloud.tpu.v1.Node.Builder, - com.google.cloud.tpu.v1.NodeOrBuilder> + com.google.cloud.tpu.v1.Node, com.google.cloud.tpu.v1.Node.Builder, com.google.cloud.tpu.v1.NodeOrBuilder> getNodesFieldBuilder() { if (nodesBuilder_ == null) { - nodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.Node, - com.google.cloud.tpu.v1.Node.Builder, - com.google.cloud.tpu.v1.NodeOrBuilder>( - nodes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v1.Node, com.google.cloud.tpu.v1.Node.Builder, com.google.cloud.tpu.v1.NodeOrBuilder>( + nodes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); nodes_ = null; } return nodesBuilder_; @@ -1029,20 +950,18 @@ public java.util.List getNodesBuilderList( private java.lang.Object nextPageToken_ = ""; /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; @@ -1051,21 +970,20 @@ public java.lang.String getNextPageToken() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -1073,112 +991,95 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageToken(java.lang.String value) { + public Builder setNextPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nextPageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return This builder for chaining. */ public Builder clearNextPageToken() { - + nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The bytes for nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureUnreachableIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); bitField0_ |= 0x00000002; - } + } } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_.getUnmodifiableView(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -1186,90 +1087,80 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index to set the value at. * @param value The unreachable to set. * @return This builder for chaining. */ - public Builder setUnreachable(int index, java.lang.String value) { + public Builder setUnreachable( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.set(index, value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachable(java.lang.String value) { + public Builder addUnreachable( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param values The unreachable to add. * @return This builder for chaining. */ - public Builder addAllUnreachable(java.lang.Iterable values) { + public Builder addAllUnreachable( + java.lang.Iterable values) { ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return This builder for chaining. */ public Builder clearUnreachable() { @@ -1279,30 +1170,28 @@ public Builder clearUnreachable() { return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The bytes of the unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1312,12 +1201,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.ListNodesResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.ListNodesResponse) private static final com.google.cloud.tpu.v1.ListNodesResponse DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.ListNodesResponse(); } @@ -1326,27 +1215,27 @@ public static com.google.cloud.tpu.v1.ListNodesResponse getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNodesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNodesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1361,4 +1250,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.ListNodesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponseOrBuilder.java similarity index 67% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponseOrBuilder.java index 64efc2a93b5a..95c9ef55efc5 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListNodesResponseOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface ListNodesResponseOrBuilder - extends +public interface ListNodesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.ListNodesResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - java.util.List getNodesList(); + java.util.List + getNodesList(); /** - * - * *
    * The listed nodes.
    * 
@@ -44,8 +25,6 @@ public interface ListNodesResponseOrBuilder */ com.google.cloud.tpu.v1.Node getNodes(int index); /** - * - * *
    * The listed nodes.
    * 
@@ -54,99 +33,82 @@ public interface ListNodesResponseOrBuilder */ int getNodesCount(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - java.util.List getNodesOrBuilderList(); + java.util.List + getNodesOrBuilderList(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.Node nodes = 1; */ - com.google.cloud.tpu.v1.NodeOrBuilder getNodesOrBuilder(int index); + com.google.cloud.tpu.v1.NodeOrBuilder getNodesOrBuilder( + int index); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - com.google.protobuf.ByteString getNextPageTokenBytes(); + com.google.protobuf.ByteString + getNextPageTokenBytes(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - java.util.List getUnreachableList(); + java.util.List + getUnreachableList(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ int getUnreachableCount(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - com.google.protobuf.ByteString getUnreachableBytes(int index); + com.google.protobuf.ByteString + getUnreachableBytes(int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequest.java similarity index 67% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequest.java index d10ee31453a0..fd02501066a0 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequest.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.ListTensorFlowVersionsRequest} */ -public final class ListTensorFlowVersionsRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListTensorFlowVersionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.ListTensorFlowVersionsRequest) ListTensorFlowVersionsRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListTensorFlowVersionsRequest.newBuilder() to construct. private ListTensorFlowVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListTensorFlowVersionsRequest() { parent_ = ""; pageToken_ = ""; @@ -46,43 +28,37 @@ private ListTensorFlowVersionsRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListTensorFlowVersionsRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.class, - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.Builder.class); + com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.class, com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -91,31 +67,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -126,14 +100,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_; /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -144,14 +115,11 @@ public int getPageSize() { public static final int PAGE_TOKEN_FIELD_NUMBER = 3; private volatile java.lang.Object pageToken_; /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ @java.lang.Override @@ -160,29 +128,29 @@ public java.lang.String getPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; } } /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -193,14 +161,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public static final int FILTER_FIELD_NUMBER = 5; private volatile java.lang.Object filter_; /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ @java.lang.Override @@ -209,29 +174,29 @@ public java.lang.String getFilter() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; } } /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -242,14 +207,11 @@ public com.google.protobuf.ByteString getFilterBytes() { public static final int ORDER_BY_FIELD_NUMBER = 6; private volatile java.lang.Object orderBy_; /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ @java.lang.Override @@ -258,29 +220,29 @@ public java.lang.String getOrderBy() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; } } /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -289,7 +251,6 @@ public com.google.protobuf.ByteString getOrderByBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -301,7 +262,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -330,7 +292,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); @@ -349,19 +312,23 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest other = - (com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; + com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest other = (com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -389,136 +356,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.ListTensorFlowVersionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.ListTensorFlowVersionsRequest) com.google.cloud.tpu.v1.ListTensorFlowVersionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.class, - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.Builder.class); + com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.class, com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -536,9 +496,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsRequest_descriptor; } @java.lang.Override @@ -557,8 +517,7 @@ public com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest buildPartial() { - com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest result = - new com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest(this); + com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest result = new com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; @@ -572,39 +531,38 @@ public com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest) { - return mergeFrom((com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest)other); } else { super.mergeFrom(other); return this; @@ -612,8 +570,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest other) { - if (other == com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -659,43 +616,37 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); + case 10: { + parent_ = input.readStringRequireUtf8(); - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); - break; - } // case 26 - case 42: - { - filter_ = input.readStringRequireUtf8(); + break; + } // case 26 + case 42: { + filter_ = input.readStringRequireUtf8(); - break; - } // case 42 - case 50: - { - orderBy_ = input.readStringRequireUtf8(); + break; + } // case 42 + case 50: { + orderBy_ = input.readStringRequireUtf8(); - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -708,22 +659,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -732,23 +679,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -756,82 +700,66 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; } - private int pageSize_; + private int pageSize_ ; /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -839,36 +767,30 @@ public int getPageSize() { return pageSize_; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @param value The pageSize to set. * @return This builder for chaining. */ public Builder setPageSize(int value) { - + pageSize_ = value; onChanged(); return this; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return This builder for chaining. */ public Builder clearPageSize() { - + pageSize_ = 0; onChanged(); return this; @@ -876,20 +798,18 @@ public Builder clearPageSize() { private java.lang.Object pageToken_ = ""; /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The pageToken. */ public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; @@ -898,21 +818,20 @@ public java.lang.String getPageToken() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -920,61 +839,54 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The pageToken to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + pageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return This builder for chaining. */ public Builder clearPageToken() { - + pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; onChanged(); return this; @@ -982,20 +894,18 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { private java.lang.Object filter_ = ""; /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; @@ -1004,21 +914,20 @@ public java.lang.String getFilter() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The bytes for filter. */ - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -1026,61 +935,54 @@ public com.google.protobuf.ByteString getFilterBytes() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The filter to set. * @return This builder for chaining. */ - public Builder setFilter(java.lang.String value) { + public Builder setFilter( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + filter_ = value; onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return This builder for chaining. */ public Builder clearFilter() { - + filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The bytes for filter to set. * @return This builder for chaining. */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; onChanged(); return this; @@ -1088,20 +990,18 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { private java.lang.Object orderBy_ = ""; /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The orderBy. */ public java.lang.String getOrderBy() { java.lang.Object ref = orderBy_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; @@ -1110,21 +1010,20 @@ public java.lang.String getOrderBy() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -1132,68 +1031,61 @@ public com.google.protobuf.ByteString getOrderByBytes() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The orderBy to set. * @return This builder for chaining. */ - public Builder setOrderBy(java.lang.String value) { + public Builder setOrderBy( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + orderBy_ = value; onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return This builder for chaining. */ public Builder clearOrderBy() { - + orderBy_ = getDefaultInstance().getOrderBy(); onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The bytes for orderBy to set. * @return This builder for chaining. */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1203,12 +1095,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.ListTensorFlowVersionsRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.ListTensorFlowVersionsRequest) private static final com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest(); } @@ -1217,27 +1109,27 @@ public static com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest getDefaultIn return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListTensorFlowVersionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTensorFlowVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1252,4 +1144,6 @@ public com.google.protobuf.Parser getParserForTyp public com.google.cloud.tpu.v1.ListTensorFlowVersionsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequestOrBuilder.java similarity index 57% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequestOrBuilder.java index 98a6e4d49c4d..b69e0e0286a2 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsRequestOrBuilder.java @@ -1,142 +1,99 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface ListTensorFlowVersionsRequestOrBuilder - extends +public interface ListTensorFlowVersionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.ListTensorFlowVersionsRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ int getPageSize(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ java.lang.String getPageToken(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - com.google.protobuf.ByteString getPageTokenBytes(); + com.google.protobuf.ByteString + getPageTokenBytes(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ java.lang.String getFilter(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ - com.google.protobuf.ByteString getFilterBytes(); + com.google.protobuf.ByteString + getFilterBytes(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ java.lang.String getOrderBy(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - com.google.protobuf.ByteString getOrderByBytes(); + com.google.protobuf.ByteString + getOrderByBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponse.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponse.java similarity index 73% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponse.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponse.java index 86f4f28ed96e..01034331067e 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponse.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponse.java @@ -1,43 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Response for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.ListTensorFlowVersionsResponse} */ -public final class ListTensorFlowVersionsResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListTensorFlowVersionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.ListTensorFlowVersionsResponse) ListTensorFlowVersionsResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListTensorFlowVersionsResponse.newBuilder() to construct. - private ListTensorFlowVersionsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTensorFlowVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListTensorFlowVersionsResponse() { tensorflowVersions_ = java.util.Collections.emptyList(); nextPageToken_ = ""; @@ -46,35 +27,32 @@ private ListTensorFlowVersionsResponse() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListTensorFlowVersionsResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.class, - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.Builder.class); + com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.class, com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.Builder.class); } public static final int TENSORFLOW_VERSIONS_FIELD_NUMBER = 1; private java.util.List tensorflowVersions_; /** - * - * *
    * The listed nodes.
    * 
@@ -86,8 +64,6 @@ public java.util.List getTensorflowVe return tensorflowVersions_; } /** - * - * *
    * The listed nodes.
    * 
@@ -95,13 +71,11 @@ public java.util.List getTensorflowVe * repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; */ @java.lang.Override - public java.util.List + public java.util.List getTensorflowVersionsOrBuilderList() { return tensorflowVersions_; } /** - * - * *
    * The listed nodes.
    * 
@@ -113,8 +87,6 @@ public int getTensorflowVersionsCount() { return tensorflowVersions_.size(); } /** - * - * *
    * The listed nodes.
    * 
@@ -126,8 +98,6 @@ public com.google.cloud.tpu.v1.TensorFlowVersion getTensorflowVersions(int index return tensorflowVersions_.get(index); } /** - * - * *
    * The listed nodes.
    * 
@@ -143,14 +113,11 @@ public com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder getTensorflowVersionsO public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; private volatile java.lang.Object nextPageToken_; /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ @java.lang.Override @@ -159,29 +126,29 @@ public java.lang.String getNextPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; } } /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -192,42 +159,34 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public static final int UNREACHABLE_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList unreachable_; /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_; } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -235,23 +194,20 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -263,7 +219,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < tensorflowVersions_.size(); i++) { output.writeMessage(1, tensorflowVersions_.get(i)); } @@ -283,8 +240,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < tensorflowVersions_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, tensorflowVersions_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tensorflowVersions_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -305,17 +262,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse other = - (com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse) obj; + com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse other = (com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse) obj; - if (!getTensorflowVersionsList().equals(other.getTensorflowVersionsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getTensorflowVersionsList() + .equals(other.getTensorflowVersionsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -343,136 +302,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Response for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.ListTensorFlowVersionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.ListTensorFlowVersionsResponse) com.google.cloud.tpu.v1.ListTensorFlowVersionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.class, - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.Builder.class); + com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.class, com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.Builder.class); } // Construct using com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -491,9 +443,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ListTensorFlowVersionsResponse_descriptor; } @java.lang.Override @@ -512,8 +464,7 @@ public com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse build() { @java.lang.Override public com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse buildPartial() { - com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse result = - new com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse(this); + com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse result = new com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse(this); int from_bitField0_ = bitField0_; if (tensorflowVersionsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -538,39 +489,38 @@ public com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse) { - return mergeFrom((com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse) other); + return mergeFrom((com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse)other); } else { super.mergeFrom(other); return this; @@ -578,8 +528,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse other) { - if (other == com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse.getDefaultInstance()) return this; if (tensorflowVersionsBuilder_ == null) { if (!other.tensorflowVersions_.isEmpty()) { if (tensorflowVersions_.isEmpty()) { @@ -598,10 +547,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse tensorflowVersionsBuilder_ = null; tensorflowVersions_ = other.tensorflowVersions_; bitField0_ = (bitField0_ & ~0x00000001); - tensorflowVersionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTensorflowVersionsFieldBuilder() - : null; + tensorflowVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTensorflowVersionsFieldBuilder() : null; } else { tensorflowVersionsBuilder_.addAllMessages(other.tensorflowVersions_); } @@ -647,39 +595,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v1.TensorFlowVersion m = - input.readMessage( - com.google.cloud.tpu.v1.TensorFlowVersion.parser(), extensionRegistry); - if (tensorflowVersionsBuilder_ == null) { - ensureTensorflowVersionsIsMutable(); - tensorflowVersions_.add(m); - } else { - tensorflowVersionsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); + case 10: { + com.google.cloud.tpu.v1.TensorFlowVersion m = + input.readMessage( + com.google.cloud.tpu.v1.TensorFlowVersion.parser(), + extensionRegistry); + if (tensorflowVersionsBuilder_ == null) { + ensureTensorflowVersionsIsMutable(); + tensorflowVersions_.add(m); + } else { + tensorflowVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -689,29 +634,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.util.List tensorflowVersions_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureTensorflowVersionsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - tensorflowVersions_ = - new java.util.ArrayList(tensorflowVersions_); + tensorflowVersions_ = new java.util.ArrayList(tensorflowVersions_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.TensorFlowVersion, - com.google.cloud.tpu.v1.TensorFlowVersion.Builder, - com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder> - tensorflowVersionsBuilder_; + com.google.cloud.tpu.v1.TensorFlowVersion, com.google.cloud.tpu.v1.TensorFlowVersion.Builder, com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder> tensorflowVersionsBuilder_; /** - * - * *
      * The listed nodes.
      * 
@@ -726,8 +663,6 @@ public java.util.List getTensorflowVe } } /** - * - * *
      * The listed nodes.
      * 
@@ -742,8 +677,6 @@ public int getTensorflowVersionsCount() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -758,8 +691,6 @@ public com.google.cloud.tpu.v1.TensorFlowVersion getTensorflowVersions(int index } } /** - * - * *
      * The listed nodes.
      * 
@@ -781,8 +712,6 @@ public Builder setTensorflowVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -801,8 +730,6 @@ public Builder setTensorflowVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -823,8 +750,6 @@ public Builder addTensorflowVersions(com.google.cloud.tpu.v1.TensorFlowVersion v return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -846,8 +771,6 @@ public Builder addTensorflowVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -866,8 +789,6 @@ public Builder addTensorflowVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -886,8 +807,6 @@ public Builder addTensorflowVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -898,7 +817,8 @@ public Builder addAllTensorflowVersions( java.lang.Iterable values) { if (tensorflowVersionsBuilder_ == null) { ensureTensorflowVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tensorflowVersions_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tensorflowVersions_); onChanged(); } else { tensorflowVersionsBuilder_.addAllMessages(values); @@ -906,8 +826,6 @@ public Builder addAllTensorflowVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -925,8 +843,6 @@ public Builder clearTensorflowVersions() { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -944,8 +860,6 @@ public Builder removeTensorflowVersions(int index) { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -957,8 +871,6 @@ public com.google.cloud.tpu.v1.TensorFlowVersion.Builder getTensorflowVersionsBu return getTensorflowVersionsFieldBuilder().getBuilder(index); } /** - * - * *
      * The listed nodes.
      * 
@@ -968,22 +880,19 @@ public com.google.cloud.tpu.v1.TensorFlowVersion.Builder getTensorflowVersionsBu public com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder getTensorflowVersionsOrBuilder( int index) { if (tensorflowVersionsBuilder_ == null) { - return tensorflowVersions_.get(index); - } else { + return tensorflowVersions_.get(index); } else { return tensorflowVersionsBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; */ - public java.util.List - getTensorflowVersionsOrBuilderList() { + public java.util.List + getTensorflowVersionsOrBuilderList() { if (tensorflowVersionsBuilder_ != null) { return tensorflowVersionsBuilder_.getMessageOrBuilderList(); } else { @@ -991,8 +900,6 @@ public com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder getTensorflowVersionsO } } /** - * - * *
      * The listed nodes.
      * 
@@ -1000,12 +907,10 @@ public com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder getTensorflowVersionsO * repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; */ public com.google.cloud.tpu.v1.TensorFlowVersion.Builder addTensorflowVersionsBuilder() { - return getTensorflowVersionsFieldBuilder() - .addBuilder(com.google.cloud.tpu.v1.TensorFlowVersion.getDefaultInstance()); + return getTensorflowVersionsFieldBuilder().addBuilder( + com.google.cloud.tpu.v1.TensorFlowVersion.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
@@ -1014,34 +919,26 @@ public com.google.cloud.tpu.v1.TensorFlowVersion.Builder addTensorflowVersionsBu */ public com.google.cloud.tpu.v1.TensorFlowVersion.Builder addTensorflowVersionsBuilder( int index) { - return getTensorflowVersionsFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v1.TensorFlowVersion.getDefaultInstance()); + return getTensorflowVersionsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v1.TensorFlowVersion.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; */ - public java.util.List - getTensorflowVersionsBuilderList() { + public java.util.List + getTensorflowVersionsBuilderList() { return getTensorflowVersionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.TensorFlowVersion, - com.google.cloud.tpu.v1.TensorFlowVersion.Builder, - com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder> + com.google.cloud.tpu.v1.TensorFlowVersion, com.google.cloud.tpu.v1.TensorFlowVersion.Builder, com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder> getTensorflowVersionsFieldBuilder() { if (tensorflowVersionsBuilder_ == null) { - tensorflowVersionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.TensorFlowVersion, - com.google.cloud.tpu.v1.TensorFlowVersion.Builder, - com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder>( + tensorflowVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v1.TensorFlowVersion, com.google.cloud.tpu.v1.TensorFlowVersion.Builder, com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder>( tensorflowVersions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -1053,20 +950,18 @@ public com.google.cloud.tpu.v1.TensorFlowVersion.Builder addTensorflowVersionsBu private java.lang.Object nextPageToken_ = ""; /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; @@ -1075,21 +970,20 @@ public java.lang.String getNextPageToken() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -1097,112 +991,95 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageToken(java.lang.String value) { + public Builder setNextPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nextPageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return This builder for chaining. */ public Builder clearNextPageToken() { - + nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The bytes for nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureUnreachableIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); bitField0_ |= 0x00000002; - } + } } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_.getUnmodifiableView(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -1210,90 +1087,80 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index to set the value at. * @param value The unreachable to set. * @return This builder for chaining. */ - public Builder setUnreachable(int index, java.lang.String value) { + public Builder setUnreachable( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.set(index, value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachable(java.lang.String value) { + public Builder addUnreachable( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param values The unreachable to add. * @return This builder for chaining. */ - public Builder addAllUnreachable(java.lang.Iterable values) { + public Builder addAllUnreachable( + java.lang.Iterable values) { ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return This builder for chaining. */ public Builder clearUnreachable() { @@ -1303,30 +1170,28 @@ public Builder clearUnreachable() { return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The bytes of the unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1336,12 +1201,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.ListTensorFlowVersionsResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.ListTensorFlowVersionsResponse) private static final com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse(); } @@ -1350,27 +1215,27 @@ public static com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse getDefaultI return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListTensorFlowVersionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTensorFlowVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1385,4 +1250,6 @@ public com.google.protobuf.Parser getParserForTy public com.google.cloud.tpu.v1.ListTensorFlowVersionsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponseOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponseOrBuilder.java similarity index 70% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponseOrBuilder.java index 15d27ff3f5cb..1d97d8a83f45 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ListTensorFlowVersionsResponseOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface ListTensorFlowVersionsResponseOrBuilder - extends +public interface ListTensorFlowVersionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.ListTensorFlowVersionsResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; */ - java.util.List getTensorflowVersionsList(); + java.util.List + getTensorflowVersionsList(); /** - * - * *
    * The listed nodes.
    * 
@@ -44,8 +25,6 @@ public interface ListTensorFlowVersionsResponseOrBuilder */ com.google.cloud.tpu.v1.TensorFlowVersion getTensorflowVersions(int index); /** - * - * *
    * The listed nodes.
    * 
@@ -54,100 +33,82 @@ public interface ListTensorFlowVersionsResponseOrBuilder */ int getTensorflowVersionsCount(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; */ - java.util.List + java.util.List getTensorflowVersionsOrBuilderList(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; */ - com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder getTensorflowVersionsOrBuilder(int index); + com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder getTensorflowVersionsOrBuilder( + int index); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - com.google.protobuf.ByteString getNextPageTokenBytes(); + com.google.protobuf.ByteString + getNextPageTokenBytes(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - java.util.List getUnreachableList(); + java.util.List + getUnreachableList(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ int getUnreachableCount(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - com.google.protobuf.ByteString getUnreachableBytes(int index); + com.google.protobuf.ByteString + getUnreachableBytes(int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/LocationName.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/LocationName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/LocationName.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/LocationName.java diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpoint.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpoint.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpoint.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpoint.java index a21ffcf89fec..c8377ccd0098 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpoint.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpoint.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * A network endpoint over which a TPU worker can be reached.
  * 
* * Protobuf type {@code google.cloud.tpu.v1.NetworkEndpoint} */ -public final class NetworkEndpoint extends com.google.protobuf.GeneratedMessageV3 - implements +public final class NetworkEndpoint extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.NetworkEndpoint) NetworkEndpointOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use NetworkEndpoint.newBuilder() to construct. private NetworkEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private NetworkEndpoint() { ipAddress_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new NetworkEndpoint(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.NetworkEndpoint.class, - com.google.cloud.tpu.v1.NetworkEndpoint.Builder.class); + com.google.cloud.tpu.v1.NetworkEndpoint.class, com.google.cloud.tpu.v1.NetworkEndpoint.Builder.class); } public static final int IP_ADDRESS_FIELD_NUMBER = 1; private volatile java.lang.Object ipAddress_; /** - * - * *
    * The IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The ipAddress. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getIpAddress() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); ipAddress_ = s; return s; } } /** - * - * *
    * The IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The bytes for ipAddress. */ @java.lang.Override - public com.google.protobuf.ByteString getIpAddressBytes() { + public com.google.protobuf.ByteString + getIpAddressBytes() { java.lang.Object ref = ipAddress_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ipAddress_ = b; return b; } else { @@ -119,14 +97,11 @@ public com.google.protobuf.ByteString getIpAddressBytes() { public static final int PORT_FIELD_NUMBER = 2; private int port_; /** - * - * *
    * The port of this network endpoint.
    * 
* * int32 port = 2; - * * @return The port. */ @java.lang.Override @@ -135,7 +110,6 @@ public int getPort() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -147,7 +121,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); } @@ -167,7 +142,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); } if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, port_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -177,15 +153,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.NetworkEndpoint)) { return super.equals(obj); } com.google.cloud.tpu.v1.NetworkEndpoint other = (com.google.cloud.tpu.v1.NetworkEndpoint) obj; - if (!getIpAddress().equals(other.getIpAddress())) return false; - if (getPort() != other.getPort()) return false; + if (!getIpAddress() + .equals(other.getIpAddress())) return false; + if (getPort() + != other.getPort()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -206,136 +184,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.NetworkEndpoint parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.NetworkEndpoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.NetworkEndpoint parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.NetworkEndpoint prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A network endpoint over which a TPU worker can be reached.
    * 
* * Protobuf type {@code google.cloud.tpu.v1.NetworkEndpoint} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.NetworkEndpoint) com.google.cloud.tpu.v1.NetworkEndpointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_NetworkEndpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.NetworkEndpoint.class, - com.google.cloud.tpu.v1.NetworkEndpoint.Builder.class); + com.google.cloud.tpu.v1.NetworkEndpoint.class, com.google.cloud.tpu.v1.NetworkEndpoint.Builder.class); } // Construct using com.google.cloud.tpu.v1.NetworkEndpoint.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -347,9 +319,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_NetworkEndpoint_descriptor; } @java.lang.Override @@ -368,8 +340,7 @@ public com.google.cloud.tpu.v1.NetworkEndpoint build() { @java.lang.Override public com.google.cloud.tpu.v1.NetworkEndpoint buildPartial() { - com.google.cloud.tpu.v1.NetworkEndpoint result = - new com.google.cloud.tpu.v1.NetworkEndpoint(this); + com.google.cloud.tpu.v1.NetworkEndpoint result = new com.google.cloud.tpu.v1.NetworkEndpoint(this); result.ipAddress_ = ipAddress_; result.port_ = port_; onBuilt(); @@ -380,39 +351,38 @@ public com.google.cloud.tpu.v1.NetworkEndpoint buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.NetworkEndpoint) { - return mergeFrom((com.google.cloud.tpu.v1.NetworkEndpoint) other); + return mergeFrom((com.google.cloud.tpu.v1.NetworkEndpoint)other); } else { super.mergeFrom(other); return this; @@ -454,25 +424,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - ipAddress_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - port_ = input.readInt32(); - - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + ipAddress_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + port_ = input.readInt32(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -485,20 +452,18 @@ public Builder mergeFrom( private java.lang.Object ipAddress_ = ""; /** - * - * *
      * The IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @return The ipAddress. */ public java.lang.String getIpAddress() { java.lang.Object ref = ipAddress_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); ipAddress_ = s; return s; @@ -507,21 +472,20 @@ public java.lang.String getIpAddress() { } } /** - * - * *
      * The IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @return The bytes for ipAddress. */ - public com.google.protobuf.ByteString getIpAddressBytes() { + public com.google.protobuf.ByteString + getIpAddressBytes() { java.lang.Object ref = ipAddress_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ipAddress_ = b; return b; } else { @@ -529,76 +493,66 @@ public com.google.protobuf.ByteString getIpAddressBytes() { } } /** - * - * *
      * The IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @param value The ipAddress to set. * @return This builder for chaining. */ - public Builder setIpAddress(java.lang.String value) { + public Builder setIpAddress( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + ipAddress_ = value; onChanged(); return this; } /** - * - * *
      * The IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @return This builder for chaining. */ public Builder clearIpAddress() { - + ipAddress_ = getDefaultInstance().getIpAddress(); onChanged(); return this; } /** - * - * *
      * The IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @param value The bytes for ipAddress to set. * @return This builder for chaining. */ - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + public Builder setIpAddressBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; onChanged(); return this; } - private int port_; + private int port_ ; /** - * - * *
      * The port of this network endpoint.
      * 
* * int32 port = 2; - * * @return The port. */ @java.lang.Override @@ -606,43 +560,37 @@ public int getPort() { return port_; } /** - * - * *
      * The port of this network endpoint.
      * 
* * int32 port = 2; - * * @param value The port to set. * @return This builder for chaining. */ public Builder setPort(int value) { - + port_ = value; onChanged(); return this; } /** - * - * *
      * The port of this network endpoint.
      * 
* * int32 port = 2; - * * @return This builder for chaining. */ public Builder clearPort() { - + port_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -652,12 +600,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.NetworkEndpoint) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.NetworkEndpoint) private static final com.google.cloud.tpu.v1.NetworkEndpoint DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.NetworkEndpoint(); } @@ -666,27 +614,27 @@ public static com.google.cloud.tpu.v1.NetworkEndpoint getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkEndpoint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -701,4 +649,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.NetworkEndpoint getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpointOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpointOrBuilder.java similarity index 51% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpointOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpointOrBuilder.java index 02f2f949146b..b77928c7db20 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpointOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NetworkEndpointOrBuilder.java @@ -1,62 +1,38 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface NetworkEndpointOrBuilder - extends +public interface NetworkEndpointOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.NetworkEndpoint) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The ipAddress. */ java.lang.String getIpAddress(); /** - * - * *
    * The IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The bytes for ipAddress. */ - com.google.protobuf.ByteString getIpAddressBytes(); + com.google.protobuf.ByteString + getIpAddressBytes(); /** - * - * *
    * The port of this network endpoint.
    * 
* * int32 port = 2; - * * @return The port. */ int getPort(); diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Node.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Node.java similarity index 70% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Node.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Node.java index e696bff77a4b..e5f6247494ee 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Node.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Node.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * A TPU instance.
  * 
* * Protobuf type {@code google.cloud.tpu.v1.Node} */ -public final class Node extends com.google.protobuf.GeneratedMessageV3 - implements +public final class Node extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.Node) NodeOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use Node.newBuilder() to construct. private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Node() { name_ = ""; description_ = ""; @@ -57,53 +39,51 @@ private Node() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new Node(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Node_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Node_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapField internalGetMapField( + int number) { switch (number) { case 24: return internalGetLabels(); default: - throw new RuntimeException("Invalid map field number: " + number); + throw new RuntimeException( + "Invalid map field number: " + number); } } - @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.tpu.v1.Node.class, com.google.cloud.tpu.v1.Node.Builder.class); } /** - * - * *
    * Represents the different states of a TPU node during its lifecycle.
    * 
* * Protobuf enum {@code google.cloud.tpu.v1.Node.State} */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { + public enum State + implements com.google.protobuf.ProtocolMessageEnum { /** - * - * *
      * TPU node state is not known/set.
      * 
@@ -112,8 +92,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STATE_UNSPECIFIED(0), /** - * - * *
      * TPU node is being created.
      * 
@@ -122,8 +100,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ CREATING(1), /** - * - * *
      * TPU node has been created.
      * 
@@ -132,8 +108,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ READY(2), /** - * - * *
      * TPU node is restarting.
      * 
@@ -142,8 +116,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ RESTARTING(3), /** - * - * *
      * TPU node is undergoing reimaging.
      * 
@@ -152,8 +124,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ REIMAGING(4), /** - * - * *
      * TPU node is being deleted.
      * 
@@ -162,8 +132,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ DELETING(5), /** - * - * *
      * TPU node is being repaired and may be unusable. Details can be
      * found in the `help_description` field.
@@ -173,8 +141,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
      */
     REPAIRING(6),
     /**
-     *
-     *
      * 
      * TPU node is stopped.
      * 
@@ -183,8 +149,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STOPPED(8), /** - * - * *
      * TPU node is currently stopping.
      * 
@@ -193,8 +157,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STOPPING(9), /** - * - * *
      * TPU node is currently starting.
      * 
@@ -203,8 +165,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STARTING(10), /** - * - * *
      * TPU node has been preempted. Only applies to Preemptible TPU Nodes.
      * 
@@ -213,8 +173,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ PREEMPTED(11), /** - * - * *
      * TPU node has been terminated due to maintenance or has reached the end of
      * its life cycle (for preemptible nodes).
@@ -224,8 +182,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
      */
     TERMINATED(12),
     /**
-     *
-     *
      * 
      * TPU node is currently hiding.
      * 
@@ -234,8 +190,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ HIDING(13), /** - * - * *
      * TPU node has been hidden.
      * 
@@ -244,8 +198,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ HIDDEN(14), /** - * - * *
      * TPU node is currently unhiding.
      * 
@@ -257,8 +209,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { ; /** - * - * *
      * TPU node state is not known/set.
      * 
@@ -267,8 +217,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STATE_UNSPECIFIED_VALUE = 0; /** - * - * *
      * TPU node is being created.
      * 
@@ -277,8 +225,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int CREATING_VALUE = 1; /** - * - * *
      * TPU node has been created.
      * 
@@ -287,8 +233,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int READY_VALUE = 2; /** - * - * *
      * TPU node is restarting.
      * 
@@ -297,8 +241,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int RESTARTING_VALUE = 3; /** - * - * *
      * TPU node is undergoing reimaging.
      * 
@@ -307,8 +249,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int REIMAGING_VALUE = 4; /** - * - * *
      * TPU node is being deleted.
      * 
@@ -317,8 +257,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int DELETING_VALUE = 5; /** - * - * *
      * TPU node is being repaired and may be unusable. Details can be
      * found in the `help_description` field.
@@ -328,8 +266,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int REPAIRING_VALUE = 6;
     /**
-     *
-     *
      * 
      * TPU node is stopped.
      * 
@@ -338,8 +274,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STOPPED_VALUE = 8; /** - * - * *
      * TPU node is currently stopping.
      * 
@@ -348,8 +282,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STOPPING_VALUE = 9; /** - * - * *
      * TPU node is currently starting.
      * 
@@ -358,8 +290,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STARTING_VALUE = 10; /** - * - * *
      * TPU node has been preempted. Only applies to Preemptible TPU Nodes.
      * 
@@ -368,8 +298,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int PREEMPTED_VALUE = 11; /** - * - * *
      * TPU node has been terminated due to maintenance or has reached the end of
      * its life cycle (for preemptible nodes).
@@ -379,8 +307,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int TERMINATED_VALUE = 12;
     /**
-     *
-     *
      * 
      * TPU node is currently hiding.
      * 
@@ -389,8 +315,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HIDING_VALUE = 13; /** - * - * *
      * TPU node has been hidden.
      * 
@@ -399,8 +323,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HIDDEN_VALUE = 14; /** - * - * *
      * TPU node is currently unhiding.
      * 
@@ -409,6 +331,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int UNHIDING_VALUE = 15; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -433,73 +356,61 @@ public static State valueOf(int value) { */ public static State forNumber(int value) { switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return READY; - case 3: - return RESTARTING; - case 4: - return REIMAGING; - case 5: - return DELETING; - case 6: - return REPAIRING; - case 8: - return STOPPED; - case 9: - return STOPPING; - case 10: - return STARTING; - case 11: - return PREEMPTED; - case 12: - return TERMINATED; - case 13: - return HIDING; - case 14: - return HIDDEN; - case 15: - return UNHIDING; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return READY; + case 3: return RESTARTING; + case 4: return REIMAGING; + case 5: return DELETING; + case 6: return REPAIRING; + case 8: return STOPPED; + case 9: return STOPPING; + case 10: return STARTING; + case 11: return PREEMPTED; + case 12: return TERMINATED; + case 13: return HIDING; + case 14: return HIDDEN; + case 15: return UNHIDING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { return getDescriptor(); } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { return com.google.cloud.tpu.v1.Node.getDescriptor().getEnumTypes().get(0); } private static final State[] VALUES = values(); - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -517,8 +428,6 @@ private State(int value) { } /** - * - * *
    * Health defines the status of a TPU node as reported by
    * Health Monitor.
@@ -526,10 +435,9 @@ private State(int value) {
    *
    * Protobuf enum {@code google.cloud.tpu.v1.Node.Health}
    */
-  public enum Health implements com.google.protobuf.ProtocolMessageEnum {
+  public enum Health
+      implements com.google.protobuf.ProtocolMessageEnum {
     /**
-     *
-     *
      * 
      * Health status is unknown: not initialized or failed to retrieve.
      * 
@@ -538,8 +446,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ HEALTH_UNSPECIFIED(0), /** - * - * *
      * The resource is healthy.
      * 
@@ -548,8 +454,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ HEALTHY(1), /** - * - * *
      * The resource is unhealthy.
      * 
@@ -558,8 +462,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ DEPRECATED_UNHEALTHY(2), /** - * - * *
      * The resource is unresponsive.
      * 
@@ -568,8 +470,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ TIMEOUT(3), /** - * - * *
      * The in-guest ML stack is unhealthy.
      * 
@@ -578,8 +478,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ UNHEALTHY_TENSORFLOW(4), /** - * - * *
      * The node is under maintenance/priority boost caused rescheduling and
      * will resume running once rescheduled.
@@ -592,8 +490,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum {
     ;
 
     /**
-     *
-     *
      * 
      * Health status is unknown: not initialized or failed to retrieve.
      * 
@@ -602,8 +498,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HEALTH_UNSPECIFIED_VALUE = 0; /** - * - * *
      * The resource is healthy.
      * 
@@ -612,8 +506,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HEALTHY_VALUE = 1; /** - * - * *
      * The resource is unhealthy.
      * 
@@ -622,8 +514,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int DEPRECATED_UNHEALTHY_VALUE = 2; /** - * - * *
      * The resource is unresponsive.
      * 
@@ -632,8 +522,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int TIMEOUT_VALUE = 3; /** - * - * *
      * The in-guest ML stack is unhealthy.
      * 
@@ -642,8 +530,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int UNHEALTHY_TENSORFLOW_VALUE = 4; /** - * - * *
      * The node is under maintenance/priority boost caused rescheduling and
      * will resume running once rescheduled.
@@ -653,6 +539,7 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int UNHEALTHY_MAINTENANCE_VALUE = 5;
 
+
     public final int getNumber() {
       if (this == UNRECOGNIZED) {
         throw new java.lang.IllegalArgumentException(
@@ -677,55 +564,52 @@ public static Health valueOf(int value) {
      */
     public static Health forNumber(int value) {
       switch (value) {
-        case 0:
-          return HEALTH_UNSPECIFIED;
-        case 1:
-          return HEALTHY;
-        case 2:
-          return DEPRECATED_UNHEALTHY;
-        case 3:
-          return TIMEOUT;
-        case 4:
-          return UNHEALTHY_TENSORFLOW;
-        case 5:
-          return UNHEALTHY_MAINTENANCE;
-        default:
-          return null;
+        case 0: return HEALTH_UNSPECIFIED;
+        case 1: return HEALTHY;
+        case 2: return DEPRECATED_UNHEALTHY;
+        case 3: return TIMEOUT;
+        case 4: return UNHEALTHY_TENSORFLOW;
+        case 5: return UNHEALTHY_MAINTENANCE;
+        default: return null;
       }
     }
 
-    public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
+    public static com.google.protobuf.Internal.EnumLiteMap
+        internalGetValueMap() {
       return internalValueMap;
     }
+    private static final com.google.protobuf.Internal.EnumLiteMap<
+        Health> internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap() {
+            public Health findValueByNumber(int number) {
+              return Health.forNumber(number);
+            }
+          };
 
-    private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
-        new com.google.protobuf.Internal.EnumLiteMap() {
-          public Health findValueByNumber(int number) {
-            return Health.forNumber(number);
-          }
-        };
-
-    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
       if (this == UNRECOGNIZED) {
         throw new java.lang.IllegalStateException(
             "Can't get the descriptor of an unrecognized enum value.");
       }
       return getDescriptor().getValues().get(ordinal());
     }
-
-    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
       return getDescriptor();
     }
-
-    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
       return com.google.cloud.tpu.v1.Node.getDescriptor().getEnumTypes().get(1);
     }
 
     private static final Health[] VALUES = values();
 
-    public static Health valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+    public static Health valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
       if (desc.getType() != getDescriptor()) {
-        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
       }
       if (desc.getIndex() == -1) {
         return UNRECOGNIZED;
@@ -743,18 +627,15 @@ private Health(int value) {
   }
 
   /**
-   *
-   *
    * 
    * TPU API Version.
    * 
* * Protobuf enum {@code google.cloud.tpu.v1.Node.ApiVersion} */ - public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { + public enum ApiVersion + implements com.google.protobuf.ProtocolMessageEnum { /** - * - * *
      * API version is unknown.
      * 
@@ -763,8 +644,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ API_VERSION_UNSPECIFIED(0), /** - * - * *
      * TPU API V1Alpha1 version.
      * 
@@ -773,8 +652,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ V1_ALPHA1(1), /** - * - * *
      * TPU API V1 version.
      * 
@@ -783,8 +660,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ V1(2), /** - * - * *
      * TPU API V2Alpha1 version.
      * 
@@ -796,8 +671,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { ; /** - * - * *
      * API version is unknown.
      * 
@@ -806,8 +679,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int API_VERSION_UNSPECIFIED_VALUE = 0; /** - * - * *
      * TPU API V1Alpha1 version.
      * 
@@ -816,8 +687,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int V1_ALPHA1_VALUE = 1; /** - * - * *
      * TPU API V1 version.
      * 
@@ -826,8 +695,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int V1_VALUE = 2; /** - * - * *
      * TPU API V2Alpha1 version.
      * 
@@ -836,6 +703,7 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int V2_ALPHA1_VALUE = 3; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -860,51 +728,50 @@ public static ApiVersion valueOf(int value) { */ public static ApiVersion forNumber(int value) { switch (value) { - case 0: - return API_VERSION_UNSPECIFIED; - case 1: - return V1_ALPHA1; - case 2: - return V1; - case 3: - return V2_ALPHA1; - default: - return null; + case 0: return API_VERSION_UNSPECIFIED; + case 1: return V1_ALPHA1; + case 2: return V1; + case 3: return V2_ALPHA1; + default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< + ApiVersion> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ApiVersion findValueByNumber(int number) { + return ApiVersion.forNumber(number); + } + }; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ApiVersion findValueByNumber(int number) { - return ApiVersion.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { return getDescriptor(); } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { return com.google.cloud.tpu.v1.Node.getDescriptor().getEnumTypes().get(2); } private static final ApiVersion[] VALUES = values(); - public static ApiVersion valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static ApiVersion valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -924,16 +791,11 @@ private ApiVersion(int value) { public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Output only. Immutable. The name of the TPU
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return The name. */ @java.lang.Override @@ -942,31 +804,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Output only. Immutable. The name of the TPU
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -977,14 +837,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int DESCRIPTION_FIELD_NUMBER = 3; private volatile java.lang.Object description_; /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The description. */ @java.lang.Override @@ -993,29 +850,29 @@ public java.lang.String getDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The bytes for description. */ @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { + public com.google.protobuf.ByteString + getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); description_ = b; return b; } else { @@ -1026,14 +883,11 @@ public com.google.protobuf.ByteString getDescriptionBytes() { public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 5; private volatile java.lang.Object acceleratorType_; /** - * - * *
    * Required. The type of hardware accelerators associated with this node.
    * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @return The acceleratorType. */ @java.lang.Override @@ -1042,29 +896,29 @@ public java.lang.String getAcceleratorType() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); acceleratorType_ = s; return s; } } /** - * - * *
    * Required. The type of hardware accelerators associated with this node.
    * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for acceleratorType. */ @java.lang.Override - public com.google.protobuf.ByteString getAcceleratorTypeBytes() { + public com.google.protobuf.ByteString + getAcceleratorTypeBytes() { java.lang.Object ref = acceleratorType_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); acceleratorType_ = b; return b; } else { @@ -1075,8 +929,6 @@ public com.google.protobuf.ByteString getAcceleratorTypeBytes() { public static final int IP_ADDRESS_FIELD_NUMBER = 8; private volatile java.lang.Object ipAddress_; /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network address for the TPU Node as visible to Compute Engine
@@ -1084,27 +936,24 @@ public com.google.protobuf.ByteString getAcceleratorTypeBytes() {
    * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @return The ipAddress. */ @java.lang.Override - @java.lang.Deprecated - public java.lang.String getIpAddress() { + @java.lang.Deprecated public java.lang.String getIpAddress() { java.lang.Object ref = ipAddress_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); ipAddress_ = s; return s; } } /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network address for the TPU Node as visible to Compute Engine
@@ -1112,18 +961,18 @@ public java.lang.String getIpAddress() {
    * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @return The bytes for ipAddress. */ @java.lang.Override - @java.lang.Deprecated - public com.google.protobuf.ByteString getIpAddressBytes() { + @java.lang.Deprecated public com.google.protobuf.ByteString + getIpAddressBytes() { java.lang.Object ref = ipAddress_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ipAddress_ = b; return b; } else { @@ -1134,53 +983,48 @@ public com.google.protobuf.ByteString getIpAddressBytes() { public static final int PORT_FIELD_NUMBER = 14; private volatile java.lang.Object port_; /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network port for the TPU Node as visible to Compute Engine instances.
    * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @return The port. */ @java.lang.Override - @java.lang.Deprecated - public java.lang.String getPort() { + @java.lang.Deprecated public java.lang.String getPort() { java.lang.Object ref = port_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); port_ = s; return s; } } /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network port for the TPU Node as visible to Compute Engine instances.
    * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @return The bytes for port. */ @java.lang.Override - @java.lang.Deprecated - public com.google.protobuf.ByteString getPortBytes() { + @java.lang.Deprecated public com.google.protobuf.ByteString + getPortBytes() { java.lang.Object ref = port_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); port_ = b; return b; } else { @@ -1191,35 +1035,25 @@ public com.google.protobuf.ByteString getPortBytes() { public static final int STATE_FIELD_NUMBER = 9; private int state_; /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for state. */ - @java.lang.Override - public int getStateValue() { + @java.lang.Override public int getStateValue() { return state_; } /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The state. */ - @java.lang.Override - public com.google.cloud.tpu.v1.Node.State getState() { + @java.lang.Override public com.google.cloud.tpu.v1.Node.State getState() { @SuppressWarnings("deprecation") com.google.cloud.tpu.v1.Node.State result = com.google.cloud.tpu.v1.Node.State.valueOf(state_); return result == null ? com.google.cloud.tpu.v1.Node.State.UNRECOGNIZED : result; @@ -1228,15 +1062,12 @@ public com.google.cloud.tpu.v1.Node.State getState() { public static final int HEALTH_DESCRIPTION_FIELD_NUMBER = 10; private volatile java.lang.Object healthDescription_; /** - * - * *
    * Output only. If this field is populated, it contains a description of why the TPU Node
    * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The healthDescription. */ @java.lang.Override @@ -1245,30 +1076,30 @@ public java.lang.String getHealthDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); healthDescription_ = s; return s; } } /** - * - * *
    * Output only. If this field is populated, it contains a description of why the TPU Node
    * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for healthDescription. */ @java.lang.Override - public com.google.protobuf.ByteString getHealthDescriptionBytes() { + public com.google.protobuf.ByteString + getHealthDescriptionBytes() { java.lang.Object ref = healthDescription_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); healthDescription_ = b; return b; } else { @@ -1279,14 +1110,11 @@ public com.google.protobuf.ByteString getHealthDescriptionBytes() { public static final int TENSORFLOW_VERSION_FIELD_NUMBER = 11; private volatile java.lang.Object tensorflowVersion_; /** - * - * *
    * Required. The version of Tensorflow running in the Node.
    * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The tensorflowVersion. */ @java.lang.Override @@ -1295,29 +1123,29 @@ public java.lang.String getTensorflowVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tensorflowVersion_ = s; return s; } } /** - * - * *
    * Required. The version of Tensorflow running in the Node.
    * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for tensorflowVersion. */ @java.lang.Override - public com.google.protobuf.ByteString getTensorflowVersionBytes() { + public com.google.protobuf.ByteString + getTensorflowVersionBytes() { java.lang.Object ref = tensorflowVersion_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); tensorflowVersion_ = b; return b; } else { @@ -1328,8 +1156,6 @@ public com.google.protobuf.ByteString getTensorflowVersionBytes() { public static final int NETWORK_FIELD_NUMBER = 12; private volatile java.lang.Object network_; /** - * - * *
    * The name of a network they wish to peer the TPU node to. It must be a
    * preexisting Compute Engine network inside of the project on which this API
@@ -1337,7 +1163,6 @@ public com.google.protobuf.ByteString getTensorflowVersionBytes() {
    * 
* * string network = 12; - * * @return The network. */ @java.lang.Override @@ -1346,15 +1171,14 @@ public java.lang.String getNetwork() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); network_ = s; return s; } } /** - * - * *
    * The name of a network they wish to peer the TPU node to. It must be a
    * preexisting Compute Engine network inside of the project on which this API
@@ -1362,15 +1186,16 @@ public java.lang.String getNetwork() {
    * 
* * string network = 12; - * * @return The bytes for network. */ @java.lang.Override - public com.google.protobuf.ByteString getNetworkBytes() { + public com.google.protobuf.ByteString + getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); network_ = b; return b; } else { @@ -1381,8 +1206,6 @@ public com.google.protobuf.ByteString getNetworkBytes() { public static final int CIDR_BLOCK_FIELD_NUMBER = 13; private volatile java.lang.Object cidrBlock_; /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -1395,7 +1218,6 @@ public com.google.protobuf.ByteString getNetworkBytes() {
    * 
* * string cidr_block = 13; - * * @return The cidrBlock. */ @java.lang.Override @@ -1404,15 +1226,14 @@ public java.lang.String getCidrBlock() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cidrBlock_ = s; return s; } } /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -1425,15 +1246,16 @@ public java.lang.String getCidrBlock() {
    * 
* * string cidr_block = 13; - * * @return The bytes for cidrBlock. */ @java.lang.Override - public com.google.protobuf.ByteString getCidrBlockBytes() { + public com.google.protobuf.ByteString + getCidrBlockBytes() { java.lang.Object ref = cidrBlock_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); cidrBlock_ = b; return b; } else { @@ -1444,8 +1266,6 @@ public com.google.protobuf.ByteString getCidrBlockBytes() { public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 15; private volatile java.lang.Object serviceAccount_; /** - * - * *
    * Output only. The service account used to run the tensor flow services within the node.
    * To share resources, including Google Cloud Storage data, with the
@@ -1454,7 +1274,6 @@ public com.google.protobuf.ByteString getCidrBlockBytes() {
    * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The serviceAccount. */ @java.lang.Override @@ -1463,15 +1282,14 @@ public java.lang.String getServiceAccount() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); serviceAccount_ = s; return s; } } /** - * - * *
    * Output only. The service account used to run the tensor flow services within the node.
    * To share resources, including Google Cloud Storage data, with the
@@ -1480,15 +1298,16 @@ public java.lang.String getServiceAccount() {
    * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for serviceAccount. */ @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountBytes() { + public com.google.protobuf.ByteString + getServiceAccountBytes() { java.lang.Object ref = serviceAccount_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); serviceAccount_ = b; return b; } else { @@ -1499,15 +1318,11 @@ public com.google.protobuf.ByteString getServiceAccountBytes() { public static final int CREATE_TIME_FIELD_NUMBER = 16; private com.google.protobuf.Timestamp createTime_; /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return Whether the createTime field is set. */ @java.lang.Override @@ -1515,15 +1330,11 @@ public boolean hasCreateTime() { return createTime_ != null; } /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The createTime. */ @java.lang.Override @@ -1531,14 +1342,11 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { @@ -1548,14 +1356,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int SCHEDULING_CONFIG_FIELD_NUMBER = 17; private com.google.cloud.tpu.v1.SchedulingConfig schedulingConfig_; /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * * @return Whether the schedulingConfig field is set. */ @java.lang.Override @@ -1563,25 +1368,18 @@ public boolean hasSchedulingConfig() { return schedulingConfig_ != null; } /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * * @return The schedulingConfig. */ @java.lang.Override public com.google.cloud.tpu.v1.SchedulingConfig getSchedulingConfig() { - return schedulingConfig_ == null - ? com.google.cloud.tpu.v1.SchedulingConfig.getDefaultInstance() - : schedulingConfig_; + return schedulingConfig_ == null ? com.google.cloud.tpu.v1.SchedulingConfig.getDefaultInstance() : schedulingConfig_; } /** - * - * *
    * The scheduling options for this node.
    * 
@@ -1596,146 +1394,119 @@ public com.google.cloud.tpu.v1.SchedulingConfigOrBuilder getSchedulingConfigOrBu public static final int NETWORK_ENDPOINTS_FIELD_NUMBER = 21; private java.util.List networkEndpoints_; /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public java.util.List getNetworkEndpointsList() { return networkEndpoints_; } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override - public java.util.List + public java.util.List getNetworkEndpointsOrBuilderList() { return networkEndpoints_; } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public int getNetworkEndpointsCount() { return networkEndpoints_.size(); } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public com.google.cloud.tpu.v1.NetworkEndpoint getNetworkEndpoints(int index) { return networkEndpoints_.get(index); } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override - public com.google.cloud.tpu.v1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder(int index) { + public com.google.cloud.tpu.v1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( + int index) { return networkEndpoints_.get(index); } public static final int HEALTH_FIELD_NUMBER = 22; private int health_; /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @return The enum numeric value on the wire for health. */ - @java.lang.Override - public int getHealthValue() { + @java.lang.Override public int getHealthValue() { return health_; } /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @return The health. */ - @java.lang.Override - public com.google.cloud.tpu.v1.Node.Health getHealth() { + @java.lang.Override public com.google.cloud.tpu.v1.Node.Health getHealth() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v1.Node.Health result = - com.google.cloud.tpu.v1.Node.Health.valueOf(health_); + com.google.cloud.tpu.v1.Node.Health result = com.google.cloud.tpu.v1.Node.Health.valueOf(health_); return result == null ? com.google.cloud.tpu.v1.Node.Health.UNRECOGNIZED : result; } public static final int LABELS_FIELD_NUMBER = 24; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Node_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); } return labels_; } @@ -1744,30 +1515,28 @@ public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ + @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } - /** Use {@link #getLabelsMap()} instead. */ + /** + * Use {@link #getLabelsMap()} instead. + */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -1775,12 +1544,11 @@ public java.util.Map getLabels() { * map<string, string> labels = 24; */ @java.lang.Override + public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -1788,16 +1556,16 @@ public java.util.Map getLabelsMap() { * map<string, string> labels = 24; */ @java.lang.Override - public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -1805,11 +1573,12 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * map<string, string> labels = 24; */ @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } @@ -1819,8 +1588,6 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { public static final int USE_SERVICE_NETWORKING_FIELD_NUMBER = 27; private boolean useServiceNetworking_; /** - * - * *
    * Whether the VPC peering for the node is set up through Service Networking
    * API. The VPC Peering should be set up before provisioning the node.
@@ -1830,7 +1597,6 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) {
    * 
* * bool use_service_networking = 27; - * * @return The useServiceNetworking. */ @java.lang.Override @@ -1841,124 +1607,91 @@ public boolean getUseServiceNetworking() { public static final int API_VERSION_FIELD_NUMBER = 38; private int apiVersion_; /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for apiVersion. */ - @java.lang.Override - public int getApiVersionValue() { + @java.lang.Override public int getApiVersionValue() { return apiVersion_; } /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The apiVersion. */ - @java.lang.Override - public com.google.cloud.tpu.v1.Node.ApiVersion getApiVersion() { + @java.lang.Override public com.google.cloud.tpu.v1.Node.ApiVersion getApiVersion() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v1.Node.ApiVersion result = - com.google.cloud.tpu.v1.Node.ApiVersion.valueOf(apiVersion_); + com.google.cloud.tpu.v1.Node.ApiVersion result = com.google.cloud.tpu.v1.Node.ApiVersion.valueOf(apiVersion_); return result == null ? com.google.cloud.tpu.v1.Node.ApiVersion.UNRECOGNIZED : result; } public static final int SYMPTOMS_FIELD_NUMBER = 39; private java.util.List symptoms_; /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public java.util.List getSymptomsList() { return symptoms_; } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override - public java.util.List + public java.util.List getSymptomsOrBuilderList() { return symptoms_; } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public int getSymptomsCount() { return symptoms_.size(); } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public com.google.cloud.tpu.v1.Symptom getSymptoms(int index) { return symptoms_.get(index); } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override - public com.google.cloud.tpu.v1.SymptomOrBuilder getSymptomsOrBuilder(int index) { + public com.google.cloud.tpu.v1.SymptomOrBuilder getSymptomsOrBuilder( + int index) { return symptoms_.get(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1970,7 +1703,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -2016,13 +1750,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (health_ != com.google.cloud.tpu.v1.Node.Health.HEALTH_UNSPECIFIED.getNumber()) { output.writeEnum(22, health_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 24); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 24); if (useServiceNetworking_ != false) { output.writeBool(27, useServiceNetworking_); } - if (apiVersion_ - != com.google.cloud.tpu.v1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { + if (apiVersion_ != com.google.cloud.tpu.v1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { output.writeEnum(38, apiVersion_); } for (int i = 0; i < symptoms_.size(); i++) { @@ -2050,7 +1787,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, ipAddress_); } if (state_ != com.google.cloud.tpu.v1.Node.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, state_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthDescription_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, healthDescription_); @@ -2071,37 +1809,42 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, serviceAccount_); } if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getCreateTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getCreateTime()); } if (schedulingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getSchedulingConfig()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getSchedulingConfig()); } for (int i = 0; i < networkEndpoints_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(21, networkEndpoints_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, networkEndpoints_.get(i)); } if (health_ != com.google.cloud.tpu.v1.Node.Health.HEALTH_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, health_); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, labels__); + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, health_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, labels__); } if (useServiceNetworking_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(27, useServiceNetworking_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(27, useServiceNetworking_); } - if (apiVersion_ - != com.google.cloud.tpu.v1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(38, apiVersion_); + if (apiVersion_ != com.google.cloud.tpu.v1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(38, apiVersion_); } for (int i = 0; i < symptoms_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(39, symptoms_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(39, symptoms_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2111,38 +1854,54 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.Node)) { return super.equals(obj); } com.google.cloud.tpu.v1.Node other = (com.google.cloud.tpu.v1.Node) obj; - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getAcceleratorType().equals(other.getAcceleratorType())) return false; - if (!getIpAddress().equals(other.getIpAddress())) return false; - if (!getPort().equals(other.getPort())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getAcceleratorType() + .equals(other.getAcceleratorType())) return false; + if (!getIpAddress() + .equals(other.getIpAddress())) return false; + if (!getPort() + .equals(other.getPort())) return false; if (state_ != other.state_) return false; - if (!getHealthDescription().equals(other.getHealthDescription())) return false; - if (!getTensorflowVersion().equals(other.getTensorflowVersion())) return false; - if (!getNetwork().equals(other.getNetwork())) return false; - if (!getCidrBlock().equals(other.getCidrBlock())) return false; - if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getHealthDescription() + .equals(other.getHealthDescription())) return false; + if (!getTensorflowVersion() + .equals(other.getTensorflowVersion())) return false; + if (!getNetwork() + .equals(other.getNetwork())) return false; + if (!getCidrBlock() + .equals(other.getCidrBlock())) return false; + if (!getServiceAccount() + .equals(other.getServiceAccount())) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; + if (!getCreateTime() + .equals(other.getCreateTime())) return false; } if (hasSchedulingConfig() != other.hasSchedulingConfig()) return false; if (hasSchedulingConfig()) { - if (!getSchedulingConfig().equals(other.getSchedulingConfig())) return false; + if (!getSchedulingConfig() + .equals(other.getSchedulingConfig())) return false; } - if (!getNetworkEndpointsList().equals(other.getNetworkEndpointsList())) return false; + if (!getNetworkEndpointsList() + .equals(other.getNetworkEndpointsList())) return false; if (health_ != other.health_) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (getUseServiceNetworking() != other.getUseServiceNetworking()) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (getUseServiceNetworking() + != other.getUseServiceNetworking()) return false; if (apiVersion_ != other.apiVersion_) return false; - if (!getSymptomsList().equals(other.getSymptomsList())) return false; + if (!getSymptomsList() + .equals(other.getSymptomsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2195,7 +1954,8 @@ public int hashCode() { hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (37 * hash) + USE_SERVICE_NETWORKING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseServiceNetworking()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseServiceNetworking()); hash = (37 * hash) + API_VERSION_FIELD_NUMBER; hash = (53 * hash) + apiVersion_; if (getSymptomsCount() > 0) { @@ -2207,154 +1967,152 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.Node parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.Node parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.Node parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.Node parseFrom(com.google.protobuf.ByteString data) + public static com.google.cloud.tpu.v1.Node parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.Node parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.Node parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.Node parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.Node parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.Node parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.Node parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.Node parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.Node parseFrom(com.google.protobuf.CodedInputStream input) + public static com.google.cloud.tpu.v1.Node parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.Node parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.Node prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A TPU instance.
    * 
* * Protobuf type {@code google.cloud.tpu.v1.Node} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.Node) com.google.cloud.tpu.v1.NodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Node_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Node_descriptor; } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapField internalGetMapField( + int number) { switch (number) { case 24: return internalGetLabels(); default: - throw new RuntimeException("Invalid map field number: " + number); + throw new RuntimeException( + "Invalid map field number: " + number); } } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { switch (number) { case 24: return internalGetMutableLabels(); default: - throw new RuntimeException("Invalid map field number: " + number); + throw new RuntimeException( + "Invalid map field number: " + number); } } - @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Node_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.tpu.v1.Node.class, com.google.cloud.tpu.v1.Node.Builder.class); } // Construct using com.google.cloud.tpu.v1.Node.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -2417,9 +2175,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Node_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Node_descriptor; } @java.lang.Override @@ -2492,39 +2250,38 @@ public com.google.cloud.tpu.v1.Node buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.Node) { - return mergeFrom((com.google.cloud.tpu.v1.Node) other); + return mergeFrom((com.google.cloud.tpu.v1.Node)other); } else { super.mergeFrom(other); return this; @@ -2600,10 +2357,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v1.Node other) { networkEndpointsBuilder_ = null; networkEndpoints_ = other.networkEndpoints_; bitField0_ = (bitField0_ & ~0x00000001); - networkEndpointsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNetworkEndpointsFieldBuilder() - : null; + networkEndpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNetworkEndpointsFieldBuilder() : null; } else { networkEndpointsBuilder_.addAllMessages(other.networkEndpoints_); } @@ -2612,7 +2368,8 @@ public Builder mergeFrom(com.google.cloud.tpu.v1.Node other) { if (other.health_ != 0) { setHealthValue(other.getHealthValue()); } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); if (other.getUseServiceNetworking() != false) { setUseServiceNetworking(other.getUseServiceNetworking()); } @@ -2637,10 +2394,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v1.Node other) { symptomsBuilder_ = null; symptoms_ = other.symptoms_; bitField0_ = (bitField0_ & ~0x00000004); - symptomsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSymptomsFieldBuilder() - : null; + symptomsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymptomsFieldBuilder() : null; } else { symptomsBuilder_.addAllMessages(other.symptoms_); } @@ -2672,146 +2428,130 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 26: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 42: - { - acceleratorType_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 66: - { - ipAddress_ = input.readStringRequireUtf8(); - - break; - } // case 66 - case 72: - { - state_ = input.readEnum(); - - break; - } // case 72 - case 82: - { - healthDescription_ = input.readStringRequireUtf8(); - - break; - } // case 82 - case 90: - { - tensorflowVersion_ = input.readStringRequireUtf8(); - - break; - } // case 90 - case 98: - { - network_ = input.readStringRequireUtf8(); - - break; - } // case 98 - case 106: - { - cidrBlock_ = input.readStringRequireUtf8(); - - break; - } // case 106 - case 114: - { - port_ = input.readStringRequireUtf8(); - - break; - } // case 114 - case 122: - { - serviceAccount_ = input.readStringRequireUtf8(); - - break; - } // case 122 - case 130: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 130 - case 138: - { - input.readMessage( - getSchedulingConfigFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 138 - case 170: - { - com.google.cloud.tpu.v1.NetworkEndpoint m = - input.readMessage( - com.google.cloud.tpu.v1.NetworkEndpoint.parser(), extensionRegistry); - if (networkEndpointsBuilder_ == null) { - ensureNetworkEndpointsIsMutable(); - networkEndpoints_.add(m); - } else { - networkEndpointsBuilder_.addMessage(m); - } - break; - } // case 170 - case 176: - { - health_ = input.readEnum(); - - break; - } // case 176 - case 194: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - break; - } // case 194 - case 216: - { - useServiceNetworking_ = input.readBool(); - - break; - } // case 216 - case 304: - { - apiVersion_ = input.readEnum(); - - break; - } // case 304 - case 314: - { - com.google.cloud.tpu.v1.Symptom m = - input.readMessage(com.google.cloud.tpu.v1.Symptom.parser(), extensionRegistry); - if (symptomsBuilder_ == null) { - ensureSymptomsIsMutable(); - symptoms_.add(m); - } else { - symptomsBuilder_.addMessage(m); - } - break; - } // case 314 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: { + acceleratorType_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 66: { + ipAddress_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 72: { + state_ = input.readEnum(); + + break; + } // case 72 + case 82: { + healthDescription_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: { + tensorflowVersion_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: { + network_ = input.readStringRequireUtf8(); + + break; + } // case 98 + case 106: { + cidrBlock_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 114: { + port_ = input.readStringRequireUtf8(); + + break; + } // case 114 + case 122: { + serviceAccount_ = input.readStringRequireUtf8(); + + break; + } // case 122 + case 130: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 130 + case 138: { + input.readMessage( + getSchedulingConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 138 + case 170: { + com.google.cloud.tpu.v1.NetworkEndpoint m = + input.readMessage( + com.google.cloud.tpu.v1.NetworkEndpoint.parser(), + extensionRegistry); + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(m); + } else { + networkEndpointsBuilder_.addMessage(m); + } + break; + } // case 170 + case 176: { + health_ = input.readEnum(); + + break; + } // case 176 + case 194: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } // case 194 + case 216: { + useServiceNetworking_ = input.readBool(); + + break; + } // case 216 + case 304: { + apiVersion_ = input.readEnum(); + + break; + } // case 304 + case 314: { + com.google.cloud.tpu.v1.Symptom m = + input.readMessage( + com.google.cloud.tpu.v1.Symptom.parser(), + extensionRegistry); + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + symptoms_.add(m); + } else { + symptomsBuilder_.addMessage(m); + } + break; + } // case 314 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -2821,27 +2561,22 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.lang.Object name_ = ""; /** - * - * *
      * Output only. Immutable. The name of the TPU
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -2850,23 +2585,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Output only. Immutable. The name of the TPU
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -2874,67 +2606,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Output only. Immutable. The name of the TPU
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Output only. Immutable. The name of the TPU
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Output only. Immutable. The name of the TPU
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -2942,20 +2661,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object description_ = ""; /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; @@ -2964,21 +2681,20 @@ public java.lang.String getDescription() { } } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @return The bytes for description. */ - public com.google.protobuf.ByteString getDescriptionBytes() { + public com.google.protobuf.ByteString + getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); description_ = b; return b; } else { @@ -2986,61 +2702,54 @@ public com.google.protobuf.ByteString getDescriptionBytes() { } } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @param value The description to set. * @return This builder for chaining. */ - public Builder setDescription(java.lang.String value) { + public Builder setDescription( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + description_ = value; onChanged(); return this; } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @return This builder for chaining. */ public Builder clearDescription() { - + description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @param value The bytes for description to set. * @return This builder for chaining. */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; onChanged(); return this; @@ -3048,20 +2757,18 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { private java.lang.Object acceleratorType_ = ""; /** - * - * *
      * Required. The type of hardware accelerators associated with this node.
      * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @return The acceleratorType. */ public java.lang.String getAcceleratorType() { java.lang.Object ref = acceleratorType_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); acceleratorType_ = s; return s; @@ -3070,21 +2777,20 @@ public java.lang.String getAcceleratorType() { } } /** - * - * *
      * Required. The type of hardware accelerators associated with this node.
      * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for acceleratorType. */ - public com.google.protobuf.ByteString getAcceleratorTypeBytes() { + public com.google.protobuf.ByteString + getAcceleratorTypeBytes() { java.lang.Object ref = acceleratorType_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); acceleratorType_ = b; return b; } else { @@ -3092,61 +2798,54 @@ public com.google.protobuf.ByteString getAcceleratorTypeBytes() { } } /** - * - * *
      * Required. The type of hardware accelerators associated with this node.
      * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The acceleratorType to set. * @return This builder for chaining. */ - public Builder setAcceleratorType(java.lang.String value) { + public Builder setAcceleratorType( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + acceleratorType_ = value; onChanged(); return this; } /** - * - * *
      * Required. The type of hardware accelerators associated with this node.
      * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @return This builder for chaining. */ public Builder clearAcceleratorType() { - + acceleratorType_ = getDefaultInstance().getAcceleratorType(); onChanged(); return this; } /** - * - * *
      * Required. The type of hardware accelerators associated with this node.
      * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The bytes for acceleratorType to set. * @return This builder for chaining. */ - public Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value) { + public Builder setAcceleratorTypeBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + acceleratorType_ = value; onChanged(); return this; @@ -3154,8 +2853,6 @@ public Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value) { private java.lang.Object ipAddress_ = ""; /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network address for the TPU Node as visible to Compute Engine
@@ -3163,16 +2860,15 @@ public Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value) {
      * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @return The ipAddress. */ - @java.lang.Deprecated - public java.lang.String getIpAddress() { + @java.lang.Deprecated public java.lang.String getIpAddress() { java.lang.Object ref = ipAddress_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); ipAddress_ = s; return s; @@ -3181,8 +2877,6 @@ public java.lang.String getIpAddress() { } } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network address for the TPU Node as visible to Compute Engine
@@ -3190,17 +2884,17 @@ public java.lang.String getIpAddress() {
      * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @return The bytes for ipAddress. */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getIpAddressBytes() { + @java.lang.Deprecated public com.google.protobuf.ByteString + getIpAddressBytes() { java.lang.Object ref = ipAddress_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ipAddress_ = b; return b; } else { @@ -3208,8 +2902,6 @@ public com.google.protobuf.ByteString getIpAddressBytes() { } } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network address for the TPU Node as visible to Compute Engine
@@ -3217,25 +2909,22 @@ public com.google.protobuf.ByteString getIpAddressBytes() {
      * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @param value The ipAddress to set. * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder setIpAddress(java.lang.String value) { + @java.lang.Deprecated public Builder setIpAddress( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + ipAddress_ = value; onChanged(); return this; } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network address for the TPU Node as visible to Compute Engine
@@ -3243,21 +2932,17 @@ public Builder setIpAddress(java.lang.String value) {
      * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder clearIpAddress() { - + @java.lang.Deprecated public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); onChanged(); return this; } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network address for the TPU Node as visible to Compute Engine
@@ -3265,19 +2950,18 @@ public Builder clearIpAddress() {
      * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @param value The bytes for ipAddress to set. * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + @java.lang.Deprecated public Builder setIpAddressBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; onChanged(); return this; @@ -3285,24 +2969,21 @@ public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { private java.lang.Object port_ = ""; /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network port for the TPU Node as visible to Compute Engine instances.
      * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @return The port. */ - @java.lang.Deprecated - public java.lang.String getPort() { + @java.lang.Deprecated public java.lang.String getPort() { java.lang.Object ref = port_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); port_ = s; return s; @@ -3311,25 +2992,23 @@ public java.lang.String getPort() { } } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network port for the TPU Node as visible to Compute Engine instances.
      * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @return The bytes for port. */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getPortBytes() { + @java.lang.Deprecated public com.google.protobuf.ByteString + getPortBytes() { java.lang.Object ref = port_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); port_ = b; return b; } else { @@ -3337,73 +3016,63 @@ public com.google.protobuf.ByteString getPortBytes() { } } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network port for the TPU Node as visible to Compute Engine instances.
      * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @param value The port to set. * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder setPort(java.lang.String value) { + @java.lang.Deprecated public Builder setPort( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + port_ = value; onChanged(); return this; } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network port for the TPU Node as visible to Compute Engine instances.
      * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder clearPort() { - + @java.lang.Deprecated public Builder clearPort() { + port_ = getDefaultInstance().getPort(); onChanged(); return this; } /** - * - * *
      * Output only. DEPRECATED! Use network_endpoints instead.
      * The network port for the TPU Node as visible to Compute Engine instances.
      * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @param value The bytes for port to set. * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder setPortBytes(com.google.protobuf.ByteString value) { + @java.lang.Deprecated public Builder setPortBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + port_ = value; onChanged(); return this; @@ -3411,69 +3080,51 @@ public Builder setPortBytes(com.google.protobuf.ByteString value) { private int state_ = 0; /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for state. */ - @java.lang.Override - public int getStateValue() { + @java.lang.Override public int getStateValue() { return state_; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. */ public Builder setStateValue(int value) { - + state_ = value; onChanged(); return this; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The state. */ @java.lang.Override public com.google.cloud.tpu.v1.Node.State getState() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v1.Node.State result = - com.google.cloud.tpu.v1.Node.State.valueOf(state_); + com.google.cloud.tpu.v1.Node.State result = com.google.cloud.tpu.v1.Node.State.valueOf(state_); return result == null ? com.google.cloud.tpu.v1.Node.State.UNRECOGNIZED : result; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The state to set. * @return This builder for chaining. */ @@ -3481,25 +3132,21 @@ public Builder setState(com.google.cloud.tpu.v1.Node.State value) { if (value == null) { throw new NullPointerException(); } - + state_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return This builder for chaining. */ public Builder clearState() { - + state_ = 0; onChanged(); return this; @@ -3507,21 +3154,19 @@ public Builder clearState() { private java.lang.Object healthDescription_ = ""; /** - * - * *
      * Output only. If this field is populated, it contains a description of why the TPU Node
      * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The healthDescription. */ public java.lang.String getHealthDescription() { java.lang.Object ref = healthDescription_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); healthDescription_ = s; return s; @@ -3530,22 +3175,21 @@ public java.lang.String getHealthDescription() { } } /** - * - * *
      * Output only. If this field is populated, it contains a description of why the TPU Node
      * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for healthDescription. */ - public com.google.protobuf.ByteString getHealthDescriptionBytes() { + public com.google.protobuf.ByteString + getHealthDescriptionBytes() { java.lang.Object ref = healthDescription_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); healthDescription_ = b; return b; } else { @@ -3553,64 +3197,57 @@ public com.google.protobuf.ByteString getHealthDescriptionBytes() { } } /** - * - * *
      * Output only. If this field is populated, it contains a description of why the TPU Node
      * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The healthDescription to set. * @return This builder for chaining. */ - public Builder setHealthDescription(java.lang.String value) { + public Builder setHealthDescription( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + healthDescription_ = value; onChanged(); return this; } /** - * - * *
      * Output only. If this field is populated, it contains a description of why the TPU Node
      * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return This builder for chaining. */ public Builder clearHealthDescription() { - + healthDescription_ = getDefaultInstance().getHealthDescription(); onChanged(); return this; } /** - * - * *
      * Output only. If this field is populated, it contains a description of why the TPU Node
      * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The bytes for healthDescription to set. * @return This builder for chaining. */ - public Builder setHealthDescriptionBytes(com.google.protobuf.ByteString value) { + public Builder setHealthDescriptionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + healthDescription_ = value; onChanged(); return this; @@ -3618,20 +3255,18 @@ public Builder setHealthDescriptionBytes(com.google.protobuf.ByteString value) { private java.lang.Object tensorflowVersion_ = ""; /** - * - * *
      * Required. The version of Tensorflow running in the Node.
      * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The tensorflowVersion. */ public java.lang.String getTensorflowVersion() { java.lang.Object ref = tensorflowVersion_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tensorflowVersion_ = s; return s; @@ -3640,21 +3275,20 @@ public java.lang.String getTensorflowVersion() { } } /** - * - * *
      * Required. The version of Tensorflow running in the Node.
      * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for tensorflowVersion. */ - public com.google.protobuf.ByteString getTensorflowVersionBytes() { + public com.google.protobuf.ByteString + getTensorflowVersionBytes() { java.lang.Object ref = tensorflowVersion_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); tensorflowVersion_ = b; return b; } else { @@ -3662,61 +3296,54 @@ public com.google.protobuf.ByteString getTensorflowVersionBytes() { } } /** - * - * *
      * Required. The version of Tensorflow running in the Node.
      * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The tensorflowVersion to set. * @return This builder for chaining. */ - public Builder setTensorflowVersion(java.lang.String value) { + public Builder setTensorflowVersion( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + tensorflowVersion_ = value; onChanged(); return this; } /** - * - * *
      * Required. The version of Tensorflow running in the Node.
      * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return This builder for chaining. */ public Builder clearTensorflowVersion() { - + tensorflowVersion_ = getDefaultInstance().getTensorflowVersion(); onChanged(); return this; } /** - * - * *
      * Required. The version of Tensorflow running in the Node.
      * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The bytes for tensorflowVersion to set. * @return This builder for chaining. */ - public Builder setTensorflowVersionBytes(com.google.protobuf.ByteString value) { + public Builder setTensorflowVersionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tensorflowVersion_ = value; onChanged(); return this; @@ -3724,8 +3351,6 @@ public Builder setTensorflowVersionBytes(com.google.protobuf.ByteString value) { private java.lang.Object network_ = ""; /** - * - * *
      * The name of a network they wish to peer the TPU node to. It must be a
      * preexisting Compute Engine network inside of the project on which this API
@@ -3733,13 +3358,13 @@ public Builder setTensorflowVersionBytes(com.google.protobuf.ByteString value) {
      * 
* * string network = 12; - * * @return The network. */ public java.lang.String getNetwork() { java.lang.Object ref = network_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); network_ = s; return s; @@ -3748,8 +3373,6 @@ public java.lang.String getNetwork() { } } /** - * - * *
      * The name of a network they wish to peer the TPU node to. It must be a
      * preexisting Compute Engine network inside of the project on which this API
@@ -3757,14 +3380,15 @@ public java.lang.String getNetwork() {
      * 
* * string network = 12; - * * @return The bytes for network. */ - public com.google.protobuf.ByteString getNetworkBytes() { + public com.google.protobuf.ByteString + getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); network_ = b; return b; } else { @@ -3772,8 +3396,6 @@ public com.google.protobuf.ByteString getNetworkBytes() { } } /** - * - * *
      * The name of a network they wish to peer the TPU node to. It must be a
      * preexisting Compute Engine network inside of the project on which this API
@@ -3781,22 +3403,20 @@ public com.google.protobuf.ByteString getNetworkBytes() {
      * 
* * string network = 12; - * * @param value The network to set. * @return This builder for chaining. */ - public Builder setNetwork(java.lang.String value) { + public Builder setNetwork( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + network_ = value; onChanged(); return this; } /** - * - * *
      * The name of a network they wish to peer the TPU node to. It must be a
      * preexisting Compute Engine network inside of the project on which this API
@@ -3804,18 +3424,15 @@ public Builder setNetwork(java.lang.String value) {
      * 
* * string network = 12; - * * @return This builder for chaining. */ public Builder clearNetwork() { - + network_ = getDefaultInstance().getNetwork(); onChanged(); return this; } /** - * - * *
      * The name of a network they wish to peer the TPU node to. It must be a
      * preexisting Compute Engine network inside of the project on which this API
@@ -3823,16 +3440,16 @@ public Builder clearNetwork() {
      * 
* * string network = 12; - * * @param value The bytes for network to set. * @return This builder for chaining. */ - public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + public Builder setNetworkBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; onChanged(); return this; @@ -3840,8 +3457,6 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { private java.lang.Object cidrBlock_ = ""; /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -3854,13 +3469,13 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) {
      * 
* * string cidr_block = 13; - * * @return The cidrBlock. */ public java.lang.String getCidrBlock() { java.lang.Object ref = cidrBlock_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cidrBlock_ = s; return s; @@ -3869,8 +3484,6 @@ public java.lang.String getCidrBlock() { } } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -3883,14 +3496,15 @@ public java.lang.String getCidrBlock() {
      * 
* * string cidr_block = 13; - * * @return The bytes for cidrBlock. */ - public com.google.protobuf.ByteString getCidrBlockBytes() { + public com.google.protobuf.ByteString + getCidrBlockBytes() { java.lang.Object ref = cidrBlock_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); cidrBlock_ = b; return b; } else { @@ -3898,8 +3512,6 @@ public com.google.protobuf.ByteString getCidrBlockBytes() { } } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -3912,22 +3524,20 @@ public com.google.protobuf.ByteString getCidrBlockBytes() {
      * 
* * string cidr_block = 13; - * * @param value The cidrBlock to set. * @return This builder for chaining. */ - public Builder setCidrBlock(java.lang.String value) { + public Builder setCidrBlock( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + cidrBlock_ = value; onChanged(); return this; } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -3940,18 +3550,15 @@ public Builder setCidrBlock(java.lang.String value) {
      * 
* * string cidr_block = 13; - * * @return This builder for chaining. */ public Builder clearCidrBlock() { - + cidrBlock_ = getDefaultInstance().getCidrBlock(); onChanged(); return this; } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -3964,16 +3571,16 @@ public Builder clearCidrBlock() {
      * 
* * string cidr_block = 13; - * * @param value The bytes for cidrBlock to set. * @return This builder for chaining. */ - public Builder setCidrBlockBytes(com.google.protobuf.ByteString value) { + public Builder setCidrBlockBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cidrBlock_ = value; onChanged(); return this; @@ -3981,8 +3588,6 @@ public Builder setCidrBlockBytes(com.google.protobuf.ByteString value) { private java.lang.Object serviceAccount_ = ""; /** - * - * *
      * Output only. The service account used to run the tensor flow services within the node.
      * To share resources, including Google Cloud Storage data, with the
@@ -3991,13 +3596,13 @@ public Builder setCidrBlockBytes(com.google.protobuf.ByteString value) {
      * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The serviceAccount. */ public java.lang.String getServiceAccount() { java.lang.Object ref = serviceAccount_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); serviceAccount_ = s; return s; @@ -4005,9 +3610,7 @@ public java.lang.String getServiceAccount() { return (java.lang.String) ref; } } - /** - * - * + /** *
      * Output only. The service account used to run the tensor flow services within the node.
      * To share resources, including Google Cloud Storage data, with the
@@ -4016,14 +3619,15 @@ public java.lang.String getServiceAccount() {
      * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for serviceAccount. */ - public com.google.protobuf.ByteString getServiceAccountBytes() { + public com.google.protobuf.ByteString + getServiceAccountBytes() { java.lang.Object ref = serviceAccount_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); serviceAccount_ = b; return b; } else { @@ -4031,8 +3635,6 @@ public com.google.protobuf.ByteString getServiceAccountBytes() { } } /** - * - * *
      * Output only. The service account used to run the tensor flow services within the node.
      * To share resources, including Google Cloud Storage data, with the
@@ -4041,22 +3643,20 @@ public com.google.protobuf.ByteString getServiceAccountBytes() {
      * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The serviceAccount to set. * @return This builder for chaining. */ - public Builder setServiceAccount(java.lang.String value) { + public Builder setServiceAccount( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + serviceAccount_ = value; onChanged(); return this; } /** - * - * *
      * Output only. The service account used to run the tensor flow services within the node.
      * To share resources, including Google Cloud Storage data, with the
@@ -4065,18 +3665,15 @@ public Builder setServiceAccount(java.lang.String value) {
      * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return This builder for chaining. */ public Builder clearServiceAccount() { - + serviceAccount_ = getDefaultInstance().getServiceAccount(); onChanged(); return this; } /** - * - * *
      * Output only. The service account used to run the tensor flow services within the node.
      * To share resources, including Google Cloud Storage data, with the
@@ -4085,16 +3682,16 @@ public Builder clearServiceAccount() {
      * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The bytes for serviceAccount to set. * @return This builder for chaining. */ - public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + public Builder setServiceAccountBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; onChanged(); return this; @@ -4102,58 +3699,39 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return createTimeBuilder_ != null || createTime_ != null; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -4169,17 +3747,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); onChanged(); @@ -4190,21 +3765,17 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (createTime_ != null) { createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); } else { createTime_ = value; } @@ -4216,15 +3787,11 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder clearCreateTime() { if (createTimeBuilder_ == null) { @@ -4238,64 +3805,48 @@ public Builder clearCreateTime() { return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - + onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); createTime_ = null; } return createTimeBuilder_; @@ -4303,47 +3854,34 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { private com.google.cloud.tpu.v1.SchedulingConfig schedulingConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v1.SchedulingConfig, - com.google.cloud.tpu.v1.SchedulingConfig.Builder, - com.google.cloud.tpu.v1.SchedulingConfigOrBuilder> - schedulingConfigBuilder_; + com.google.cloud.tpu.v1.SchedulingConfig, com.google.cloud.tpu.v1.SchedulingConfig.Builder, com.google.cloud.tpu.v1.SchedulingConfigOrBuilder> schedulingConfigBuilder_; /** - * - * *
      * The scheduling options for this node.
      * 
* * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * * @return Whether the schedulingConfig field is set. */ public boolean hasSchedulingConfig() { return schedulingConfigBuilder_ != null || schedulingConfig_ != null; } /** - * - * *
      * The scheduling options for this node.
      * 
* * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * * @return The schedulingConfig. */ public com.google.cloud.tpu.v1.SchedulingConfig getSchedulingConfig() { if (schedulingConfigBuilder_ == null) { - return schedulingConfig_ == null - ? com.google.cloud.tpu.v1.SchedulingConfig.getDefaultInstance() - : schedulingConfig_; + return schedulingConfig_ == null ? com.google.cloud.tpu.v1.SchedulingConfig.getDefaultInstance() : schedulingConfig_; } else { return schedulingConfigBuilder_.getMessage(); } } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4364,8 +3902,6 @@ public Builder setSchedulingConfig(com.google.cloud.tpu.v1.SchedulingConfig valu return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4384,8 +3920,6 @@ public Builder setSchedulingConfig( return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4396,9 +3930,7 @@ public Builder mergeSchedulingConfig(com.google.cloud.tpu.v1.SchedulingConfig va if (schedulingConfigBuilder_ == null) { if (schedulingConfig_ != null) { schedulingConfig_ = - com.google.cloud.tpu.v1.SchedulingConfig.newBuilder(schedulingConfig_) - .mergeFrom(value) - .buildPartial(); + com.google.cloud.tpu.v1.SchedulingConfig.newBuilder(schedulingConfig_).mergeFrom(value).buildPartial(); } else { schedulingConfig_ = value; } @@ -4410,8 +3942,6 @@ public Builder mergeSchedulingConfig(com.google.cloud.tpu.v1.SchedulingConfig va return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4430,8 +3960,6 @@ public Builder clearSchedulingConfig() { return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4439,13 +3967,11 @@ public Builder clearSchedulingConfig() { * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; */ public com.google.cloud.tpu.v1.SchedulingConfig.Builder getSchedulingConfigBuilder() { - + onChanged(); return getSchedulingConfigFieldBuilder().getBuilder(); } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4456,14 +3982,11 @@ public com.google.cloud.tpu.v1.SchedulingConfigOrBuilder getSchedulingConfigOrBu if (schedulingConfigBuilder_ != null) { return schedulingConfigBuilder_.getMessageOrBuilder(); } else { - return schedulingConfig_ == null - ? com.google.cloud.tpu.v1.SchedulingConfig.getDefaultInstance() - : schedulingConfig_; + return schedulingConfig_ == null ? + com.google.cloud.tpu.v1.SchedulingConfig.getDefaultInstance() : schedulingConfig_; } } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4471,51 +3994,39 @@ public com.google.cloud.tpu.v1.SchedulingConfigOrBuilder getSchedulingConfigOrBu * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v1.SchedulingConfig, - com.google.cloud.tpu.v1.SchedulingConfig.Builder, - com.google.cloud.tpu.v1.SchedulingConfigOrBuilder> + com.google.cloud.tpu.v1.SchedulingConfig, com.google.cloud.tpu.v1.SchedulingConfig.Builder, com.google.cloud.tpu.v1.SchedulingConfigOrBuilder> getSchedulingConfigFieldBuilder() { if (schedulingConfigBuilder_ == null) { - schedulingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v1.SchedulingConfig, - com.google.cloud.tpu.v1.SchedulingConfig.Builder, - com.google.cloud.tpu.v1.SchedulingConfigOrBuilder>( - getSchedulingConfig(), getParentForChildren(), isClean()); + schedulingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v1.SchedulingConfig, com.google.cloud.tpu.v1.SchedulingConfig.Builder, com.google.cloud.tpu.v1.SchedulingConfigOrBuilder>( + getSchedulingConfig(), + getParentForChildren(), + isClean()); schedulingConfig_ = null; } return schedulingConfigBuilder_; } private java.util.List networkEndpoints_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureNetworkEndpointsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - networkEndpoints_ = - new java.util.ArrayList(networkEndpoints_); + networkEndpoints_ = new java.util.ArrayList(networkEndpoints_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.NetworkEndpoint, - com.google.cloud.tpu.v1.NetworkEndpoint.Builder, - com.google.cloud.tpu.v1.NetworkEndpointOrBuilder> - networkEndpointsBuilder_; + com.google.cloud.tpu.v1.NetworkEndpoint, com.google.cloud.tpu.v1.NetworkEndpoint.Builder, com.google.cloud.tpu.v1.NetworkEndpointOrBuilder> networkEndpointsBuilder_; /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public java.util.List getNetworkEndpointsList() { if (networkEndpointsBuilder_ == null) { @@ -4525,17 +4036,13 @@ public java.util.List getNetworkEndpoin } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public int getNetworkEndpointsCount() { if (networkEndpointsBuilder_ == null) { @@ -4545,17 +4052,13 @@ public int getNetworkEndpointsCount() { } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v1.NetworkEndpoint getNetworkEndpoints(int index) { if (networkEndpointsBuilder_ == null) { @@ -4565,19 +4068,16 @@ public com.google.cloud.tpu.v1.NetworkEndpoint getNetworkEndpoints(int index) { } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder setNetworkEndpoints(int index, com.google.cloud.tpu.v1.NetworkEndpoint value) { + public Builder setNetworkEndpoints( + int index, com.google.cloud.tpu.v1.NetworkEndpoint value) { if (networkEndpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -4591,17 +4091,13 @@ public Builder setNetworkEndpoints(int index, com.google.cloud.tpu.v1.NetworkEnd return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder setNetworkEndpoints( int index, com.google.cloud.tpu.v1.NetworkEndpoint.Builder builderForValue) { @@ -4615,17 +4111,13 @@ public Builder setNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addNetworkEndpoints(com.google.cloud.tpu.v1.NetworkEndpoint value) { if (networkEndpointsBuilder_ == null) { @@ -4641,19 +4133,16 @@ public Builder addNetworkEndpoints(com.google.cloud.tpu.v1.NetworkEndpoint value return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder addNetworkEndpoints(int index, com.google.cloud.tpu.v1.NetworkEndpoint value) { + public Builder addNetworkEndpoints( + int index, com.google.cloud.tpu.v1.NetworkEndpoint value) { if (networkEndpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -4667,17 +4156,13 @@ public Builder addNetworkEndpoints(int index, com.google.cloud.tpu.v1.NetworkEnd return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addNetworkEndpoints( com.google.cloud.tpu.v1.NetworkEndpoint.Builder builderForValue) { @@ -4691,17 +4176,13 @@ public Builder addNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addNetworkEndpoints( int index, com.google.cloud.tpu.v1.NetworkEndpoint.Builder builderForValue) { @@ -4715,23 +4196,20 @@ public Builder addNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addAllNetworkEndpoints( java.lang.Iterable values) { if (networkEndpointsBuilder_ == null) { ensureNetworkEndpointsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkEndpoints_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, networkEndpoints_); onChanged(); } else { networkEndpointsBuilder_.addAllMessages(values); @@ -4739,17 +4217,13 @@ public Builder addAllNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder clearNetworkEndpoints() { if (networkEndpointsBuilder_ == null) { @@ -4762,17 +4236,13 @@ public Builder clearNetworkEndpoints() { return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder removeNetworkEndpoints(int index) { if (networkEndpointsBuilder_ == null) { @@ -4785,57 +4255,45 @@ public Builder removeNetworkEndpoints(int index) { return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v1.NetworkEndpoint.Builder getNetworkEndpointsBuilder(int index) { + public com.google.cloud.tpu.v1.NetworkEndpoint.Builder getNetworkEndpointsBuilder( + int index) { return getNetworkEndpointsFieldBuilder().getBuilder(index); } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( int index) { if (networkEndpointsBuilder_ == null) { - return networkEndpoints_.get(index); - } else { + return networkEndpoints_.get(index); } else { return networkEndpointsBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List - getNetworkEndpointsOrBuilderList() { + public java.util.List + getNetworkEndpointsOrBuilderList() { if (networkEndpointsBuilder_ != null) { return networkEndpointsBuilder_.getMessageOrBuilderList(); } else { @@ -4843,68 +4301,51 @@ public com.google.cloud.tpu.v1.NetworkEndpointOrBuilder getNetworkEndpointsOrBui } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v1.NetworkEndpoint.Builder addNetworkEndpointsBuilder() { - return getNetworkEndpointsFieldBuilder() - .addBuilder(com.google.cloud.tpu.v1.NetworkEndpoint.getDefaultInstance()); + return getNetworkEndpointsFieldBuilder().addBuilder( + com.google.cloud.tpu.v1.NetworkEndpoint.getDefaultInstance()); } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v1.NetworkEndpoint.Builder addNetworkEndpointsBuilder(int index) { - return getNetworkEndpointsFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v1.NetworkEndpoint.getDefaultInstance()); + public com.google.cloud.tpu.v1.NetworkEndpoint.Builder addNetworkEndpointsBuilder( + int index) { + return getNetworkEndpointsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v1.NetworkEndpoint.getDefaultInstance()); } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that Tensorflow clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List - getNetworkEndpointsBuilderList() { + public java.util.List + getNetworkEndpointsBuilderList() { return getNetworkEndpointsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.NetworkEndpoint, - com.google.cloud.tpu.v1.NetworkEndpoint.Builder, - com.google.cloud.tpu.v1.NetworkEndpointOrBuilder> + com.google.cloud.tpu.v1.NetworkEndpoint, com.google.cloud.tpu.v1.NetworkEndpoint.Builder, com.google.cloud.tpu.v1.NetworkEndpointOrBuilder> getNetworkEndpointsFieldBuilder() { if (networkEndpointsBuilder_ == null) { - networkEndpointsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.NetworkEndpoint, - com.google.cloud.tpu.v1.NetworkEndpoint.Builder, - com.google.cloud.tpu.v1.NetworkEndpointOrBuilder>( + networkEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v1.NetworkEndpoint, com.google.cloud.tpu.v1.NetworkEndpoint.Builder, com.google.cloud.tpu.v1.NetworkEndpointOrBuilder>( networkEndpoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -4916,65 +4357,51 @@ public com.google.cloud.tpu.v1.NetworkEndpoint.Builder addNetworkEndpointsBuilde private int health_ = 0; /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @return The enum numeric value on the wire for health. */ - @java.lang.Override - public int getHealthValue() { + @java.lang.Override public int getHealthValue() { return health_; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @param value The enum numeric value on the wire for health to set. * @return This builder for chaining. */ public Builder setHealthValue(int value) { - + health_ = value; onChanged(); return this; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @return The health. */ @java.lang.Override public com.google.cloud.tpu.v1.Node.Health getHealth() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v1.Node.Health result = - com.google.cloud.tpu.v1.Node.Health.valueOf(health_); + com.google.cloud.tpu.v1.Node.Health result = com.google.cloud.tpu.v1.Node.Health.valueOf(health_); return result == null ? com.google.cloud.tpu.v1.Node.Health.UNRECOGNIZED : result; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @param value The health to set. * @return This builder for chaining. */ @@ -4982,44 +4409,42 @@ public Builder setHealth(com.google.cloud.tpu.v1.Node.Health value) { if (value == null) { throw new NullPointerException(); } - + health_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @return This builder for chaining. */ public Builder clearHealth() { - + health_ = 0; onChanged(); return this; } - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); } return labels_; } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged(); - ; + internalGetMutableLabels() { + onChanged();; if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); @@ -5031,30 +4456,28 @@ public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ + @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } - /** Use {@link #getLabelsMap()} instead. */ + /** + * Use {@link #getLabelsMap()} instead. + */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
@@ -5062,12 +4485,11 @@ public java.util.Map getLabels() { * map<string, string> labels = 24; */ @java.lang.Override + public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
@@ -5075,17 +4497,16 @@ public java.util.Map getLabelsMap() { * map<string, string> labels = 24; */ @java.lang.Override + public java.lang.String getLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
@@ -5093,11 +4514,12 @@ public java.lang.String getLabelsOrDefault( * map<string, string> labels = 24; */ @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } @@ -5105,68 +4527,69 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public Builder clearLabels() { - internalGetMutableLabels().getMutableMap().clear(); + internalGetMutableLabels().getMutableMap() + .clear(); return this; } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); return this; } - /** Use alternate mutation accessors instead. */ + /** + * Use alternate mutation accessors instead. + */ @java.lang.Deprecated - public java.util.Map getMutableLabels() { + public java.util.Map + getMutableLabels() { return internalGetMutableLabels().getMutableMap(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } if (value == null) { - throw new NullPointerException("map value"); - } + throw new NullPointerException("map value"); +} - internalGetMutableLabels().getMutableMap().put(key, value); + internalGetMutableLabels().getMutableMap() + .put(key, value); return this; } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); return this; } - private boolean useServiceNetworking_; + private boolean useServiceNetworking_ ; /** - * - * *
      * Whether the VPC peering for the node is set up through Service Networking
      * API. The VPC Peering should be set up before provisioning the node.
@@ -5176,7 +4599,6 @@ public Builder putAllLabels(java.util.Map va
      * 
* * bool use_service_networking = 27; - * * @return The useServiceNetworking. */ @java.lang.Override @@ -5184,8 +4606,6 @@ public boolean getUseServiceNetworking() { return useServiceNetworking_; } /** - * - * *
      * Whether the VPC peering for the node is set up through Service Networking
      * API. The VPC Peering should be set up before provisioning the node.
@@ -5195,19 +4615,16 @@ public boolean getUseServiceNetworking() {
      * 
* * bool use_service_networking = 27; - * * @param value The useServiceNetworking to set. * @return This builder for chaining. */ public Builder setUseServiceNetworking(boolean value) { - + useServiceNetworking_ = value; onChanged(); return this; } /** - * - * *
      * Whether the VPC peering for the node is set up through Service Networking
      * API. The VPC Peering should be set up before provisioning the node.
@@ -5217,11 +4634,10 @@ public Builder setUseServiceNetworking(boolean value) {
      * 
* * bool use_service_networking = 27; - * * @return This builder for chaining. */ public Builder clearUseServiceNetworking() { - + useServiceNetworking_ = false; onChanged(); return this; @@ -5229,73 +4645,51 @@ public Builder clearUseServiceNetworking() { private int apiVersion_ = 0; /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for apiVersion. */ - @java.lang.Override - public int getApiVersionValue() { + @java.lang.Override public int getApiVersionValue() { return apiVersion_; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The enum numeric value on the wire for apiVersion to set. * @return This builder for chaining. */ public Builder setApiVersionValue(int value) { - + apiVersion_ = value; onChanged(); return this; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The apiVersion. */ @java.lang.Override public com.google.cloud.tpu.v1.Node.ApiVersion getApiVersion() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v1.Node.ApiVersion result = - com.google.cloud.tpu.v1.Node.ApiVersion.valueOf(apiVersion_); + com.google.cloud.tpu.v1.Node.ApiVersion result = com.google.cloud.tpu.v1.Node.ApiVersion.valueOf(apiVersion_); return result == null ? com.google.cloud.tpu.v1.Node.ApiVersion.UNRECOGNIZED : result; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The apiVersion to set. * @return This builder for chaining. */ @@ -5303,57 +4697,44 @@ public Builder setApiVersion(com.google.cloud.tpu.v1.Node.ApiVersion value) { if (value == null) { throw new NullPointerException(); } - + apiVersion_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return This builder for chaining. */ public Builder clearApiVersion() { - + apiVersion_ = 0; onChanged(); return this; } private java.util.List symptoms_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureSymptomsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { symptoms_ = new java.util.ArrayList(symptoms_); bitField0_ |= 0x00000004; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.Symptom, - com.google.cloud.tpu.v1.Symptom.Builder, - com.google.cloud.tpu.v1.SymptomOrBuilder> - symptomsBuilder_; + com.google.cloud.tpu.v1.Symptom, com.google.cloud.tpu.v1.Symptom.Builder, com.google.cloud.tpu.v1.SymptomOrBuilder> symptomsBuilder_; /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public java.util.List getSymptomsList() { if (symptomsBuilder_ == null) { @@ -5363,15 +4744,11 @@ public java.util.List getSymptomsList() { } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public int getSymptomsCount() { if (symptomsBuilder_ == null) { @@ -5381,15 +4758,11 @@ public int getSymptomsCount() { } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v1.Symptom getSymptoms(int index) { if (symptomsBuilder_ == null) { @@ -5399,17 +4772,14 @@ public com.google.cloud.tpu.v1.Symptom getSymptoms(int index) { } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder setSymptoms(int index, com.google.cloud.tpu.v1.Symptom value) { + public Builder setSymptoms( + int index, com.google.cloud.tpu.v1.Symptom value) { if (symptomsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5423,17 +4793,14 @@ public Builder setSymptoms(int index, com.google.cloud.tpu.v1.Symptom value) { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder setSymptoms(int index, com.google.cloud.tpu.v1.Symptom.Builder builderForValue) { + public Builder setSymptoms( + int index, com.google.cloud.tpu.v1.Symptom.Builder builderForValue) { if (symptomsBuilder_ == null) { ensureSymptomsIsMutable(); symptoms_.set(index, builderForValue.build()); @@ -5444,15 +4811,11 @@ public Builder setSymptoms(int index, com.google.cloud.tpu.v1.Symptom.Builder bu return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addSymptoms(com.google.cloud.tpu.v1.Symptom value) { if (symptomsBuilder_ == null) { @@ -5468,17 +4831,14 @@ public Builder addSymptoms(com.google.cloud.tpu.v1.Symptom value) { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder addSymptoms(int index, com.google.cloud.tpu.v1.Symptom value) { + public Builder addSymptoms( + int index, com.google.cloud.tpu.v1.Symptom value) { if (symptomsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5492,17 +4852,14 @@ public Builder addSymptoms(int index, com.google.cloud.tpu.v1.Symptom value) { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder addSymptoms(com.google.cloud.tpu.v1.Symptom.Builder builderForValue) { + public Builder addSymptoms( + com.google.cloud.tpu.v1.Symptom.Builder builderForValue) { if (symptomsBuilder_ == null) { ensureSymptomsIsMutable(); symptoms_.add(builderForValue.build()); @@ -5513,17 +4870,14 @@ public Builder addSymptoms(com.google.cloud.tpu.v1.Symptom.Builder builderForVal return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder addSymptoms(int index, com.google.cloud.tpu.v1.Symptom.Builder builderForValue) { + public Builder addSymptoms( + int index, com.google.cloud.tpu.v1.Symptom.Builder builderForValue) { if (symptomsBuilder_ == null) { ensureSymptomsIsMutable(); symptoms_.add(index, builderForValue.build()); @@ -5534,21 +4888,18 @@ public Builder addSymptoms(int index, com.google.cloud.tpu.v1.Symptom.Builder bu return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addAllSymptoms( java.lang.Iterable values) { if (symptomsBuilder_ == null) { ensureSymptomsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, symptoms_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symptoms_); onChanged(); } else { symptomsBuilder_.addAllMessages(values); @@ -5556,15 +4907,11 @@ public Builder addAllSymptoms( return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder clearSymptoms() { if (symptomsBuilder_ == null) { @@ -5577,15 +4924,11 @@ public Builder clearSymptoms() { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder removeSymptoms(int index) { if (symptomsBuilder_ == null) { @@ -5598,50 +4941,39 @@ public Builder removeSymptoms(int index) { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v1.Symptom.Builder getSymptomsBuilder(int index) { + public com.google.cloud.tpu.v1.Symptom.Builder getSymptomsBuilder( + int index) { return getSymptomsFieldBuilder().getBuilder(index); } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v1.SymptomOrBuilder getSymptomsOrBuilder(int index) { + public com.google.cloud.tpu.v1.SymptomOrBuilder getSymptomsOrBuilder( + int index) { if (symptomsBuilder_ == null) { - return symptoms_.get(index); - } else { + return symptoms_.get(index); } else { return symptomsBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List - getSymptomsOrBuilderList() { + public java.util.List + getSymptomsOrBuilderList() { if (symptomsBuilder_ != null) { return symptomsBuilder_.getMessageOrBuilderList(); } else { @@ -5649,69 +4981,56 @@ public com.google.cloud.tpu.v1.SymptomOrBuilder getSymptomsOrBuilder(int index) } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v1.Symptom.Builder addSymptomsBuilder() { - return getSymptomsFieldBuilder() - .addBuilder(com.google.cloud.tpu.v1.Symptom.getDefaultInstance()); + return getSymptomsFieldBuilder().addBuilder( + com.google.cloud.tpu.v1.Symptom.getDefaultInstance()); } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v1.Symptom.Builder addSymptomsBuilder(int index) { - return getSymptomsFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v1.Symptom.getDefaultInstance()); + public com.google.cloud.tpu.v1.Symptom.Builder addSymptomsBuilder( + int index) { + return getSymptomsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v1.Symptom.getDefaultInstance()); } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List getSymptomsBuilderList() { + public java.util.List + getSymptomsBuilderList() { return getSymptomsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.Symptom, - com.google.cloud.tpu.v1.Symptom.Builder, - com.google.cloud.tpu.v1.SymptomOrBuilder> + com.google.cloud.tpu.v1.Symptom, com.google.cloud.tpu.v1.Symptom.Builder, com.google.cloud.tpu.v1.SymptomOrBuilder> getSymptomsFieldBuilder() { if (symptomsBuilder_ == null) { - symptomsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v1.Symptom, - com.google.cloud.tpu.v1.Symptom.Builder, - com.google.cloud.tpu.v1.SymptomOrBuilder>( - symptoms_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + symptomsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v1.Symptom, com.google.cloud.tpu.v1.Symptom.Builder, com.google.cloud.tpu.v1.SymptomOrBuilder>( + symptoms_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); symptoms_ = null; } return symptomsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -5721,12 +5040,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.Node) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.Node) private static final com.google.cloud.tpu.v1.Node DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.Node(); } @@ -5735,27 +5054,27 @@ public static com.google.cloud.tpu.v1.Node getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Node parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Node parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -5770,4 +5089,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.Node getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeName.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeName.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeName.java diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeOrBuilder.java similarity index 72% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeOrBuilder.java index 4b8140083ede..7bca19d16a1b 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/NodeOrBuilder.java @@ -1,110 +1,73 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface NodeOrBuilder - extends +public interface NodeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.Node) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Output only. Immutable. The name of the TPU
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return The name. */ java.lang.String getName(); /** - * - * *
    * Output only. Immutable. The name of the TPU
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return The bytes for name. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString + getNameBytes(); /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The description. */ java.lang.String getDescription(); /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The bytes for description. */ - com.google.protobuf.ByteString getDescriptionBytes(); + com.google.protobuf.ByteString + getDescriptionBytes(); /** - * - * *
    * Required. The type of hardware accelerators associated with this node.
    * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @return The acceleratorType. */ java.lang.String getAcceleratorType(); /** - * - * *
    * Required. The type of hardware accelerators associated with this node.
    * 
* * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for acceleratorType. */ - com.google.protobuf.ByteString getAcceleratorTypeBytes(); + com.google.protobuf.ByteString + getAcceleratorTypeBytes(); /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network address for the TPU Node as visible to Compute Engine
@@ -112,16 +75,12 @@ public interface NodeOrBuilder
    * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @return The ipAddress. */ - @java.lang.Deprecated - java.lang.String getIpAddress(); + @java.lang.Deprecated java.lang.String getIpAddress(); /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network address for the TPU Node as visible to Compute Engine
@@ -129,129 +88,101 @@ public interface NodeOrBuilder
    * 
* * string ip_address = 8 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=275 + * @deprecated google.cloud.tpu.v1.Node.ip_address is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=275 * @return The bytes for ipAddress. */ - @java.lang.Deprecated - com.google.protobuf.ByteString getIpAddressBytes(); + @java.lang.Deprecated com.google.protobuf.ByteString + getIpAddressBytes(); /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network port for the TPU Node as visible to Compute Engine instances.
    * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @return The port. */ - @java.lang.Deprecated - java.lang.String getPort(); + @java.lang.Deprecated java.lang.String getPort(); /** - * - * *
    * Output only. DEPRECATED! Use network_endpoints instead.
    * The network port for the TPU Node as visible to Compute Engine instances.
    * 
* * string port = 14 [deprecated = true]; - * - * @deprecated google.cloud.tpu.v1.Node.port is deprecated. See - * google/cloud/tpu/v1/cloud_tpu.proto;l=279 + * @deprecated google.cloud.tpu.v1.Node.port is deprecated. + * See google/cloud/tpu/v1/cloud_tpu.proto;l=279 * @return The bytes for port. */ - @java.lang.Deprecated - com.google.protobuf.ByteString getPortBytes(); + @java.lang.Deprecated com.google.protobuf.ByteString + getPortBytes(); /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for state. */ int getStateValue(); /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The state. */ com.google.cloud.tpu.v1.Node.State getState(); /** - * - * *
    * Output only. If this field is populated, it contains a description of why the TPU Node
    * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The healthDescription. */ java.lang.String getHealthDescription(); /** - * - * *
    * Output only. If this field is populated, it contains a description of why the TPU Node
    * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for healthDescription. */ - com.google.protobuf.ByteString getHealthDescriptionBytes(); + com.google.protobuf.ByteString + getHealthDescriptionBytes(); /** - * - * *
    * Required. The version of Tensorflow running in the Node.
    * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The tensorflowVersion. */ java.lang.String getTensorflowVersion(); /** - * - * *
    * Required. The version of Tensorflow running in the Node.
    * 
* * string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for tensorflowVersion. */ - com.google.protobuf.ByteString getTensorflowVersionBytes(); + com.google.protobuf.ByteString + getTensorflowVersionBytes(); /** - * - * *
    * The name of a network they wish to peer the TPU node to. It must be a
    * preexisting Compute Engine network inside of the project on which this API
@@ -259,13 +190,10 @@ public interface NodeOrBuilder
    * 
* * string network = 12; - * * @return The network. */ java.lang.String getNetwork(); /** - * - * *
    * The name of a network they wish to peer the TPU node to. It must be a
    * preexisting Compute Engine network inside of the project on which this API
@@ -273,14 +201,12 @@ public interface NodeOrBuilder
    * 
* * string network = 12; - * * @return The bytes for network. */ - com.google.protobuf.ByteString getNetworkBytes(); + com.google.protobuf.ByteString + getNetworkBytes(); /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -293,13 +219,10 @@ public interface NodeOrBuilder
    * 
* * string cidr_block = 13; - * * @return The cidrBlock. */ java.lang.String getCidrBlock(); /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -312,14 +235,12 @@ public interface NodeOrBuilder
    * 
* * string cidr_block = 13; - * * @return The bytes for cidrBlock. */ - com.google.protobuf.ByteString getCidrBlockBytes(); + com.google.protobuf.ByteString + getCidrBlockBytes(); /** - * - * *
    * Output only. The service account used to run the tensor flow services within the node.
    * To share resources, including Google Cloud Storage data, with the
@@ -328,13 +249,10 @@ public interface NodeOrBuilder
    * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The serviceAccount. */ java.lang.String getServiceAccount(); /** - * - * *
    * Output only. The service account used to run the tensor flow services within the node.
    * To share resources, including Google Cloud Storage data, with the
@@ -343,76 +261,57 @@ public interface NodeOrBuilder
    * 
* * string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for serviceAccount. */ - com.google.protobuf.ByteString getServiceAccountBytes(); + com.google.protobuf.ByteString + getServiceAccountBytes(); /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return Whether the createTime field is set. */ boolean hasCreateTime(); /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * * @return Whether the schedulingConfig field is set. */ boolean hasSchedulingConfig(); /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * * @return The schedulingConfig. */ com.google.cloud.tpu.v1.SchedulingConfig getSchedulingConfig(); /** - * - * *
    * The scheduling options for this node.
    * 
@@ -422,105 +321,79 @@ public interface NodeOrBuilder com.google.cloud.tpu.v1.SchedulingConfigOrBuilder getSchedulingConfigOrBuilder(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List getNetworkEndpointsList(); + java.util.List + getNetworkEndpointsList(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ com.google.cloud.tpu.v1.NetworkEndpoint getNetworkEndpoints(int index); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ int getNetworkEndpointsCount(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List + java.util.List getNetworkEndpointsOrBuilderList(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that Tensorflow clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - com.google.cloud.tpu.v1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder(int index); + com.google.cloud.tpu.v1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( + int index); /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @return The enum numeric value on the wire for health. */ int getHealthValue(); /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v1.Node.Health health = 22; - * * @return The health. */ com.google.cloud.tpu.v1.Node.Health getHealth(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -529,31 +402,30 @@ public interface NodeOrBuilder */ int getLabelsCount(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ @java.lang.Deprecated - java.util.Map getLabels(); + java.util.Map + getLabels(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ - java.util.Map getLabelsMap(); + java.util.Map + getLabelsMap(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -562,24 +434,22 @@ public interface NodeOrBuilder */ /* nullable */ - java.lang.String getLabelsOrDefault( +java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ - java.lang.String defaultValue); +java.lang.String defaultValue); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ - java.lang.String getLabelsOrThrow(java.lang.String key); + + java.lang.String getLabelsOrThrow( + java.lang.String key); /** - * - * *
    * Whether the VPC peering for the node is set up through Service Networking
    * API. The VPC Peering should be set up before provisioning the node.
@@ -589,98 +459,70 @@ java.lang.String getLabelsOrDefault(
    * 
* * bool use_service_networking = 27; - * * @return The useServiceNetworking. */ boolean getUseServiceNetworking(); /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for apiVersion. */ int getApiVersionValue(); /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The apiVersion. */ com.google.cloud.tpu.v1.Node.ApiVersion getApiVersion(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List getSymptomsList(); + java.util.List + getSymptomsList(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ com.google.cloud.tpu.v1.Symptom getSymptoms(int index); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ int getSymptomsCount(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List getSymptomsOrBuilderList(); + java.util.List + getSymptomsOrBuilderList(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - com.google.cloud.tpu.v1.SymptomOrBuilder getSymptomsOrBuilder(int index); + com.google.cloud.tpu.v1.SymptomOrBuilder getSymptomsOrBuilder( + int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadata.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadata.java similarity index 72% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadata.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadata.java index 10671a434178..4780b21c35ac 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadata.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadata.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Metadata describing an [Operation][google.longrunning.Operation]
  * 
* * Protobuf type {@code google.cloud.tpu.v1.OperationMetadata} */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.OperationMetadata) OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use OperationMetadata.newBuilder() to construct. private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OperationMetadata() { target_ = ""; verb_ = ""; @@ -46,41 +28,37 @@ private OperationMetadata() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new OperationMetadata(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.OperationMetadata.class, - com.google.cloud.tpu.v1.OperationMetadata.Builder.class); + com.google.cloud.tpu.v1.OperationMetadata.class, com.google.cloud.tpu.v1.OperationMetadata.Builder.class); } public static final int CREATE_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp createTime_; /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ @java.lang.Override @@ -88,14 +66,11 @@ public boolean hasCreateTime() { return createTime_ != null; } /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ @java.lang.Override @@ -103,8 +78,6 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** - * - * *
    * The time the operation was created.
    * 
@@ -119,14 +92,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return Whether the endTime field is set. */ @java.lang.Override @@ -134,14 +104,11 @@ public boolean hasEndTime() { return endTime_ != null; } /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return The endTime. */ @java.lang.Override @@ -149,8 +116,6 @@ public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } /** - * - * *
    * The time the operation finished running.
    * 
@@ -165,15 +130,12 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int TARGET_FIELD_NUMBER = 3; private volatile java.lang.Object target_; /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The target. */ @java.lang.Override @@ -182,30 +144,30 @@ public java.lang.String getTarget() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); target_ = s; return s; } } /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The bytes for target. */ @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { + public com.google.protobuf.ByteString + getTargetBytes() { java.lang.Object ref = target_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); target_ = b; return b; } else { @@ -216,14 +178,11 @@ public com.google.protobuf.ByteString getTargetBytes() { public static final int VERB_FIELD_NUMBER = 4; private volatile java.lang.Object verb_; /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The verb. */ @java.lang.Override @@ -232,29 +191,29 @@ public java.lang.String getVerb() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); verb_ = s; return s; } } /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The bytes for verb. */ @java.lang.Override - public com.google.protobuf.ByteString getVerbBytes() { + public com.google.protobuf.ByteString + getVerbBytes() { java.lang.Object ref = verb_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); verb_ = b; return b; } else { @@ -265,14 +224,11 @@ public com.google.protobuf.ByteString getVerbBytes() { public static final int STATUS_DETAIL_FIELD_NUMBER = 5; private volatile java.lang.Object statusDetail_; /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The statusDetail. */ @java.lang.Override @@ -281,29 +237,29 @@ public java.lang.String getStatusDetail() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); statusDetail_ = s; return s; } } /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The bytes for statusDetail. */ @java.lang.Override - public com.google.protobuf.ByteString getStatusDetailBytes() { + public com.google.protobuf.ByteString + getStatusDetailBytes() { java.lang.Object ref = statusDetail_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); statusDetail_ = b; return b; } else { @@ -314,14 +270,11 @@ public com.google.protobuf.ByteString getStatusDetailBytes() { public static final int CANCEL_REQUESTED_FIELD_NUMBER = 6; private boolean cancelRequested_; /** - * - * *
    * Specifies if cancellation was requested for the operation.
    * 
* * bool cancel_requested = 6; - * * @return The cancelRequested. */ @java.lang.Override @@ -332,14 +285,11 @@ public boolean getCancelRequested() { public static final int API_VERSION_FIELD_NUMBER = 7; private volatile java.lang.Object apiVersion_; /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The apiVersion. */ @java.lang.Override @@ -348,29 +298,29 @@ public java.lang.String getApiVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); apiVersion_ = s; return s; } } /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The bytes for apiVersion. */ @java.lang.Override - public com.google.protobuf.ByteString getApiVersionBytes() { + public com.google.protobuf.ByteString + getApiVersionBytes() { java.lang.Object ref = apiVersion_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); apiVersion_ = b; return b; } else { @@ -379,7 +329,6 @@ public com.google.protobuf.ByteString getApiVersionBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -391,7 +340,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } @@ -423,10 +373,12 @@ public int getSerializedSize() { size = 0; if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); } if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); @@ -438,7 +390,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); } if (cancelRequested_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, cancelRequested_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, cancelRequested_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); @@ -451,27 +404,33 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.OperationMetadata)) { return super.equals(obj); } - com.google.cloud.tpu.v1.OperationMetadata other = - (com.google.cloud.tpu.v1.OperationMetadata) obj; + com.google.cloud.tpu.v1.OperationMetadata other = (com.google.cloud.tpu.v1.OperationMetadata) obj; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; + if (!getCreateTime() + .equals(other.getCreateTime())) return false; } if (hasEndTime() != other.hasEndTime()) return false; if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getTarget().equals(other.getTarget())) return false; - if (!getVerb().equals(other.getVerb())) return false; - if (!getStatusDetail().equals(other.getStatusDetail())) return false; - if (getCancelRequested() != other.getCancelRequested()) return false; - if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getVerb() + .equals(other.getVerb())) return false; + if (!getStatusDetail() + .equals(other.getStatusDetail())) return false; + if (getCancelRequested() + != other.getCancelRequested()) return false; + if (!getApiVersion() + .equals(other.getApiVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -498,7 +457,8 @@ public int hashCode() { hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; hash = (53 * hash) + getStatusDetail().hashCode(); hash = (37 * hash) + CANCEL_REQUESTED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCancelRequested()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCancelRequested()); hash = (37 * hash) + API_VERSION_FIELD_NUMBER; hash = (53 * hash) + getApiVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -506,136 +466,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.OperationMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.OperationMetadata prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Metadata describing an [Operation][google.longrunning.Operation]
    * 
* * Protobuf type {@code google.cloud.tpu.v1.OperationMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.OperationMetadata) com.google.cloud.tpu.v1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_OperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.OperationMetadata.class, - com.google.cloud.tpu.v1.OperationMetadata.Builder.class); + com.google.cloud.tpu.v1.OperationMetadata.class, com.google.cloud.tpu.v1.OperationMetadata.Builder.class); } // Construct using com.google.cloud.tpu.v1.OperationMetadata.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -665,9 +619,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_OperationMetadata_descriptor; } @java.lang.Override @@ -686,8 +640,7 @@ public com.google.cloud.tpu.v1.OperationMetadata build() { @java.lang.Override public com.google.cloud.tpu.v1.OperationMetadata buildPartial() { - com.google.cloud.tpu.v1.OperationMetadata result = - new com.google.cloud.tpu.v1.OperationMetadata(this); + com.google.cloud.tpu.v1.OperationMetadata result = new com.google.cloud.tpu.v1.OperationMetadata(this); if (createTimeBuilder_ == null) { result.createTime_ = createTime_; } else { @@ -711,39 +664,38 @@ public com.google.cloud.tpu.v1.OperationMetadata buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.OperationMetadata) { - return mergeFrom((com.google.cloud.tpu.v1.OperationMetadata) other); + return mergeFrom((com.google.cloud.tpu.v1.OperationMetadata)other); } else { super.mergeFrom(other); return this; @@ -803,55 +755,51 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - target_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - verb_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - statusDetail_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 48: - { - cancelRequested_ = input.readBool(); - - break; - } // case 48 - case 58: - { - apiVersion_ = input.readStringRequireUtf8(); - - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + statusDetail_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: { + cancelRequested_ = input.readBool(); + + break; + } // case 48 + case 58: { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -864,47 +812,34 @@ public Builder mergeFrom( private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** - * - * *
      * The time the operation was created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return createTimeBuilder_ != null || createTime_ != null; } /** - * - * *
      * The time the operation was created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** - * - * *
      * The time the operation was created.
      * 
@@ -925,15 +860,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation was created.
      * 
* * .google.protobuf.Timestamp create_time = 1; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); onChanged(); @@ -944,8 +878,6 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal return this; } /** - * - * *
      * The time the operation was created.
      * 
@@ -956,7 +888,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (createTime_ != null) { createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); } else { createTime_ = value; } @@ -968,8 +900,6 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation was created.
      * 
@@ -988,8 +918,6 @@ public Builder clearCreateTime() { return this; } /** - * - * *
      * The time the operation was created.
      * 
@@ -997,13 +925,11 @@ public Builder clearCreateTime() { * .google.protobuf.Timestamp create_time = 1; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - + onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** - * - * *
      * The time the operation was created.
      * 
@@ -1014,14 +940,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** - * - * *
      * The time the operation was created.
      * 
@@ -1029,17 +952,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); createTime_ = null; } return createTimeBuilder_; @@ -1047,33 +967,24 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { private com.google.protobuf.Timestamp endTime_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; /** - * - * *
      * The time the operation finished running.
      * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return Whether the endTime field is set. */ public boolean hasEndTime() { return endTimeBuilder_ != null || endTime_ != null; } /** - * - * *
      * The time the operation finished running.
      * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return The endTime. */ public com.google.protobuf.Timestamp getEndTime() { @@ -1084,8 +995,6 @@ public com.google.protobuf.Timestamp getEndTime() { } } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1106,15 +1015,14 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation finished running.
      * 
* * .google.protobuf.Timestamp end_time = 2; */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (endTimeBuilder_ == null) { endTime_ = builderForValue.build(); onChanged(); @@ -1125,8 +1033,6 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) return this; } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1137,7 +1043,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { if (endTimeBuilder_ == null) { if (endTime_ != null) { endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); } else { endTime_ = value; } @@ -1149,8 +1055,6 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1169,8 +1073,6 @@ public Builder clearEndTime() { return this; } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1178,13 +1080,11 @@ public Builder clearEndTime() { * .google.protobuf.Timestamp end_time = 2; */ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - + onChanged(); return getEndTimeFieldBuilder().getBuilder(); } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1195,12 +1095,11 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { if (endTimeBuilder_ != null) { return endTimeBuilder_.getMessageOrBuilder(); } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1208,17 +1107,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * .google.protobuf.Timestamp end_time = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); endTime_ = null; } return endTimeBuilder_; @@ -1226,21 +1122,19 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { private java.lang.Object target_ = ""; /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @return The target. */ public java.lang.String getTarget() { java.lang.Object ref = target_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); target_ = s; return s; @@ -1249,22 +1143,21 @@ public java.lang.String getTarget() { } } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @return The bytes for target. */ - public com.google.protobuf.ByteString getTargetBytes() { + public com.google.protobuf.ByteString + getTargetBytes() { java.lang.Object ref = target_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); target_ = b; return b; } else { @@ -1272,64 +1165,57 @@ public com.google.protobuf.ByteString getTargetBytes() { } } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @param value The target to set. * @return This builder for chaining. */ - public Builder setTarget(java.lang.String value) { + public Builder setTarget( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + target_ = value; onChanged(); return this; } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @return This builder for chaining. */ public Builder clearTarget() { - + target_ = getDefaultInstance().getTarget(); onChanged(); return this; } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @param value The bytes for target to set. * @return This builder for chaining. */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; onChanged(); return this; @@ -1337,20 +1223,18 @@ public Builder setTargetBytes(com.google.protobuf.ByteString value) { private java.lang.Object verb_ = ""; /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @return The verb. */ public java.lang.String getVerb() { java.lang.Object ref = verb_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); verb_ = s; return s; @@ -1359,21 +1243,20 @@ public java.lang.String getVerb() { } } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @return The bytes for verb. */ - public com.google.protobuf.ByteString getVerbBytes() { + public com.google.protobuf.ByteString + getVerbBytes() { java.lang.Object ref = verb_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); verb_ = b; return b; } else { @@ -1381,61 +1264,54 @@ public com.google.protobuf.ByteString getVerbBytes() { } } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @param value The verb to set. * @return This builder for chaining. */ - public Builder setVerb(java.lang.String value) { + public Builder setVerb( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + verb_ = value; onChanged(); return this; } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @return This builder for chaining. */ public Builder clearVerb() { - + verb_ = getDefaultInstance().getVerb(); onChanged(); return this; } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @param value The bytes for verb to set. * @return This builder for chaining. */ - public Builder setVerbBytes(com.google.protobuf.ByteString value) { + public Builder setVerbBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; onChanged(); return this; @@ -1443,20 +1319,18 @@ public Builder setVerbBytes(com.google.protobuf.ByteString value) { private java.lang.Object statusDetail_ = ""; /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @return The statusDetail. */ public java.lang.String getStatusDetail() { java.lang.Object ref = statusDetail_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); statusDetail_ = s; return s; @@ -1465,21 +1339,20 @@ public java.lang.String getStatusDetail() { } } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @return The bytes for statusDetail. */ - public com.google.protobuf.ByteString getStatusDetailBytes() { + public com.google.protobuf.ByteString + getStatusDetailBytes() { java.lang.Object ref = statusDetail_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); statusDetail_ = b; return b; } else { @@ -1487,76 +1360,66 @@ public com.google.protobuf.ByteString getStatusDetailBytes() { } } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @param value The statusDetail to set. * @return This builder for chaining. */ - public Builder setStatusDetail(java.lang.String value) { + public Builder setStatusDetail( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + statusDetail_ = value; onChanged(); return this; } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @return This builder for chaining. */ public Builder clearStatusDetail() { - + statusDetail_ = getDefaultInstance().getStatusDetail(); onChanged(); return this; } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @param value The bytes for statusDetail to set. * @return This builder for chaining. */ - public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { + public Builder setStatusDetailBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusDetail_ = value; onChanged(); return this; } - private boolean cancelRequested_; + private boolean cancelRequested_ ; /** - * - * *
      * Specifies if cancellation was requested for the operation.
      * 
* * bool cancel_requested = 6; - * * @return The cancelRequested. */ @java.lang.Override @@ -1564,36 +1427,30 @@ public boolean getCancelRequested() { return cancelRequested_; } /** - * - * *
      * Specifies if cancellation was requested for the operation.
      * 
* * bool cancel_requested = 6; - * * @param value The cancelRequested to set. * @return This builder for chaining. */ public Builder setCancelRequested(boolean value) { - + cancelRequested_ = value; onChanged(); return this; } /** - * - * *
      * Specifies if cancellation was requested for the operation.
      * 
* * bool cancel_requested = 6; - * * @return This builder for chaining. */ public Builder clearCancelRequested() { - + cancelRequested_ = false; onChanged(); return this; @@ -1601,20 +1458,18 @@ public Builder clearCancelRequested() { private java.lang.Object apiVersion_ = ""; /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @return The apiVersion. */ public java.lang.String getApiVersion() { java.lang.Object ref = apiVersion_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); apiVersion_ = s; return s; @@ -1623,21 +1478,20 @@ public java.lang.String getApiVersion() { } } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @return The bytes for apiVersion. */ - public com.google.protobuf.ByteString getApiVersionBytes() { + public com.google.protobuf.ByteString + getApiVersionBytes() { java.lang.Object ref = apiVersion_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); apiVersion_ = b; return b; } else { @@ -1645,68 +1499,61 @@ public com.google.protobuf.ByteString getApiVersionBytes() { } } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @param value The apiVersion to set. * @return This builder for chaining. */ - public Builder setApiVersion(java.lang.String value) { + public Builder setApiVersion( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + apiVersion_ = value; onChanged(); return this; } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @return This builder for chaining. */ public Builder clearApiVersion() { - + apiVersion_ = getDefaultInstance().getApiVersion(); onChanged(); return this; } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @param value The bytes for apiVersion to set. * @return This builder for chaining. */ - public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + public Builder setApiVersionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1716,12 +1563,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.OperationMetadata) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.OperationMetadata) private static final com.google.cloud.tpu.v1.OperationMetadata DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.OperationMetadata(); } @@ -1730,27 +1577,27 @@ public static com.google.cloud.tpu.v1.OperationMetadata getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1765,4 +1612,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.OperationMetadata getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadataOrBuilder.java similarity index 75% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadataOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadataOrBuilder.java index 8192fc69b200..b88331fd15d0 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadataOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/OperationMetadataOrBuilder.java @@ -1,55 +1,31 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface OperationMetadataOrBuilder - extends +public interface OperationMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.OperationMetadata) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ boolean hasCreateTime(); /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); /** - * - * *
    * The time the operation was created.
    * 
@@ -59,32 +35,24 @@ public interface OperationMetadataOrBuilder com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return Whether the endTime field is set. */ boolean hasEndTime(); /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); /** - * - * *
    * The time the operation finished running.
    * 
@@ -94,117 +62,94 @@ public interface OperationMetadataOrBuilder com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The target. */ java.lang.String getTarget(); /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The bytes for target. */ - com.google.protobuf.ByteString getTargetBytes(); + com.google.protobuf.ByteString + getTargetBytes(); /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The verb. */ java.lang.String getVerb(); /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The bytes for verb. */ - com.google.protobuf.ByteString getVerbBytes(); + com.google.protobuf.ByteString + getVerbBytes(); /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The statusDetail. */ java.lang.String getStatusDetail(); /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The bytes for statusDetail. */ - com.google.protobuf.ByteString getStatusDetailBytes(); + com.google.protobuf.ByteString + getStatusDetailBytes(); /** - * - * *
    * Specifies if cancellation was requested for the operation.
    * 
* * bool cancel_requested = 6; - * * @return The cancelRequested. */ boolean getCancelRequested(); /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The apiVersion. */ java.lang.String getApiVersion(); /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The bytes for apiVersion. */ - com.google.protobuf.ByteString getApiVersionBytes(); + com.google.protobuf.ByteString + getApiVersionBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequest.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequest.java index e2ffa921cdda..3e0bde1b1648 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequest.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [ReimageNode][google.cloud.tpu.v1.Tpu.ReimageNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.ReimageNodeRequest} */ -public final class ReimageNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ReimageNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.ReimageNodeRequest) ReimageNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ReimageNodeRequest.newBuilder() to construct. private ReimageNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ReimageNodeRequest() { name_ = ""; tensorflowVersion_ = ""; @@ -44,41 +26,37 @@ private ReimageNodeRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ReimageNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ReimageNodeRequest.class, - com.google.cloud.tpu.v1.ReimageNodeRequest.Builder.class); + com.google.cloud.tpu.v1.ReimageNodeRequest.class, com.google.cloud.tpu.v1.ReimageNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ @java.lang.Override @@ -87,29 +65,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -120,14 +98,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int TENSORFLOW_VERSION_FIELD_NUMBER = 2; private volatile java.lang.Object tensorflowVersion_; /** - * - * *
    * The version for reimage to create.
    * 
* * string tensorflow_version = 2; - * * @return The tensorflowVersion. */ @java.lang.Override @@ -136,29 +111,29 @@ public java.lang.String getTensorflowVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tensorflowVersion_ = s; return s; } } /** - * - * *
    * The version for reimage to create.
    * 
* * string tensorflow_version = 2; - * * @return The bytes for tensorflowVersion. */ @java.lang.Override - public com.google.protobuf.ByteString getTensorflowVersionBytes() { + public com.google.protobuf.ByteString + getTensorflowVersionBytes() { java.lang.Object ref = tensorflowVersion_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); tensorflowVersion_ = b; return b; } else { @@ -167,7 +142,6 @@ public com.google.protobuf.ByteString getTensorflowVersionBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -179,7 +153,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -209,16 +184,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.ReimageNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v1.ReimageNodeRequest other = - (com.google.cloud.tpu.v1.ReimageNodeRequest) obj; + com.google.cloud.tpu.v1.ReimageNodeRequest other = (com.google.cloud.tpu.v1.ReimageNodeRequest) obj; - if (!getName().equals(other.getName())) return false; - if (!getTensorflowVersion().equals(other.getTensorflowVersion())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getTensorflowVersion() + .equals(other.getTensorflowVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -239,136 +215,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.ReimageNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.ReimageNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.ReimageNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [ReimageNode][google.cloud.tpu.v1.Tpu.ReimageNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.ReimageNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.ReimageNodeRequest) com.google.cloud.tpu.v1.ReimageNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ReimageNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.ReimageNodeRequest.class, - com.google.cloud.tpu.v1.ReimageNodeRequest.Builder.class); + com.google.cloud.tpu.v1.ReimageNodeRequest.class, com.google.cloud.tpu.v1.ReimageNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.ReimageNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -380,9 +350,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_ReimageNodeRequest_descriptor; } @java.lang.Override @@ -401,8 +371,7 @@ public com.google.cloud.tpu.v1.ReimageNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.ReimageNodeRequest buildPartial() { - com.google.cloud.tpu.v1.ReimageNodeRequest result = - new com.google.cloud.tpu.v1.ReimageNodeRequest(this); + com.google.cloud.tpu.v1.ReimageNodeRequest result = new com.google.cloud.tpu.v1.ReimageNodeRequest(this); result.name_ = name_; result.tensorflowVersion_ = tensorflowVersion_; onBuilt(); @@ -413,39 +382,38 @@ public com.google.cloud.tpu.v1.ReimageNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.ReimageNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v1.ReimageNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.ReimageNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -488,25 +456,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - tensorflowVersion_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + tensorflowVersion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -519,20 +484,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -541,21 +504,20 @@ public java.lang.String getName() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -563,61 +525,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -625,20 +580,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object tensorflowVersion_ = ""; /** - * - * *
      * The version for reimage to create.
      * 
* * string tensorflow_version = 2; - * * @return The tensorflowVersion. */ public java.lang.String getTensorflowVersion() { java.lang.Object ref = tensorflowVersion_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tensorflowVersion_ = s; return s; @@ -647,21 +600,20 @@ public java.lang.String getTensorflowVersion() { } } /** - * - * *
      * The version for reimage to create.
      * 
* * string tensorflow_version = 2; - * * @return The bytes for tensorflowVersion. */ - public com.google.protobuf.ByteString getTensorflowVersionBytes() { + public com.google.protobuf.ByteString + getTensorflowVersionBytes() { java.lang.Object ref = tensorflowVersion_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); tensorflowVersion_ = b; return b; } else { @@ -669,68 +621,61 @@ public com.google.protobuf.ByteString getTensorflowVersionBytes() { } } /** - * - * *
      * The version for reimage to create.
      * 
* * string tensorflow_version = 2; - * * @param value The tensorflowVersion to set. * @return This builder for chaining. */ - public Builder setTensorflowVersion(java.lang.String value) { + public Builder setTensorflowVersion( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + tensorflowVersion_ = value; onChanged(); return this; } /** - * - * *
      * The version for reimage to create.
      * 
* * string tensorflow_version = 2; - * * @return This builder for chaining. */ public Builder clearTensorflowVersion() { - + tensorflowVersion_ = getDefaultInstance().getTensorflowVersion(); onChanged(); return this; } /** - * - * *
      * The version for reimage to create.
      * 
* * string tensorflow_version = 2; - * * @param value The bytes for tensorflowVersion to set. * @return This builder for chaining. */ - public Builder setTensorflowVersionBytes(com.google.protobuf.ByteString value) { + public Builder setTensorflowVersionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tensorflowVersion_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -740,12 +685,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.ReimageNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.ReimageNodeRequest) private static final com.google.cloud.tpu.v1.ReimageNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.ReimageNodeRequest(); } @@ -754,27 +699,27 @@ public static com.google.cloud.tpu.v1.ReimageNodeRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReimageNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReimageNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -789,4 +734,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.ReimageNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequestOrBuilder.java similarity index 53% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequestOrBuilder.java index e44a725d493f..3d0b1bfc7df5 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/ReimageNodeRequestOrBuilder.java @@ -1,75 +1,49 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface ReimageNodeRequestOrBuilder - extends +public interface ReimageNodeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.ReimageNodeRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ java.lang.String getName(); /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString + getNameBytes(); /** - * - * *
    * The version for reimage to create.
    * 
* * string tensorflow_version = 2; - * * @return The tensorflowVersion. */ java.lang.String getTensorflowVersion(); /** - * - * *
    * The version for reimage to create.
    * 
* * string tensorflow_version = 2; - * * @return The bytes for tensorflowVersion. */ - com.google.protobuf.ByteString getTensorflowVersionBytes(); + com.google.protobuf.ByteString + getTensorflowVersionBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfig.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfig.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfig.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfig.java index bab3a8f6d8f9..33c0c3078b4c 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfig.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfig.java @@ -1,81 +1,60 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Sets the scheduling options for this node.
  * 
* * Protobuf type {@code google.cloud.tpu.v1.SchedulingConfig} */ -public final class SchedulingConfig extends com.google.protobuf.GeneratedMessageV3 - implements +public final class SchedulingConfig extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.SchedulingConfig) SchedulingConfigOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use SchedulingConfig.newBuilder() to construct. private SchedulingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - - private SchedulingConfig() {} + private SchedulingConfig() { + } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new SchedulingConfig(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.SchedulingConfig.class, - com.google.cloud.tpu.v1.SchedulingConfig.Builder.class); + com.google.cloud.tpu.v1.SchedulingConfig.class, com.google.cloud.tpu.v1.SchedulingConfig.Builder.class); } public static final int PREEMPTIBLE_FIELD_NUMBER = 1; private boolean preemptible_; /** - * - * *
    * Defines whether the node is preemptible.
    * 
* * bool preemptible = 1; - * * @return The preemptible. */ @java.lang.Override @@ -86,14 +65,11 @@ public boolean getPreemptible() { public static final int RESERVED_FIELD_NUMBER = 2; private boolean reserved_; /** - * - * *
    * Whether the node is created under a reservation.
    * 
* * bool reserved = 2; - * * @return The reserved. */ @java.lang.Override @@ -102,7 +78,6 @@ public boolean getReserved() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -114,7 +89,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (preemptible_ != false) { output.writeBool(1, preemptible_); } @@ -131,10 +107,12 @@ public int getSerializedSize() { size = 0; if (preemptible_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, preemptible_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, preemptible_); } if (reserved_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, reserved_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, reserved_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -144,15 +122,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.SchedulingConfig)) { return super.equals(obj); } com.google.cloud.tpu.v1.SchedulingConfig other = (com.google.cloud.tpu.v1.SchedulingConfig) obj; - if (getPreemptible() != other.getPreemptible()) return false; - if (getReserved() != other.getReserved()) return false; + if (getPreemptible() + != other.getPreemptible()) return false; + if (getReserved() + != other.getReserved()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -165,144 +145,140 @@ public int hashCode() { int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PREEMPTIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPreemptible()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPreemptible()); hash = (37 * hash) + RESERVED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReserved()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReserved()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.SchedulingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.SchedulingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.SchedulingConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.SchedulingConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Sets the scheduling options for this node.
    * 
* * Protobuf type {@code google.cloud.tpu.v1.SchedulingConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.SchedulingConfig) com.google.cloud.tpu.v1.SchedulingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_SchedulingConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.SchedulingConfig.class, - com.google.cloud.tpu.v1.SchedulingConfig.Builder.class); + com.google.cloud.tpu.v1.SchedulingConfig.class, com.google.cloud.tpu.v1.SchedulingConfig.Builder.class); } // Construct using com.google.cloud.tpu.v1.SchedulingConfig.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -314,9 +290,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_SchedulingConfig_descriptor; } @java.lang.Override @@ -335,8 +311,7 @@ public com.google.cloud.tpu.v1.SchedulingConfig build() { @java.lang.Override public com.google.cloud.tpu.v1.SchedulingConfig buildPartial() { - com.google.cloud.tpu.v1.SchedulingConfig result = - new com.google.cloud.tpu.v1.SchedulingConfig(this); + com.google.cloud.tpu.v1.SchedulingConfig result = new com.google.cloud.tpu.v1.SchedulingConfig(this); result.preemptible_ = preemptible_; result.reserved_ = reserved_; onBuilt(); @@ -347,39 +322,38 @@ public com.google.cloud.tpu.v1.SchedulingConfig buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.SchedulingConfig) { - return mergeFrom((com.google.cloud.tpu.v1.SchedulingConfig) other); + return mergeFrom((com.google.cloud.tpu.v1.SchedulingConfig)other); } else { super.mergeFrom(other); return this; @@ -420,25 +394,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: - { - preemptible_ = input.readBool(); - - break; - } // case 8 - case 16: - { - reserved_ = input.readBool(); - - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 8: { + preemptible_ = input.readBool(); + + break; + } // case 8 + case 16: { + reserved_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -449,16 +420,13 @@ public Builder mergeFrom( return this; } - private boolean preemptible_; + private boolean preemptible_ ; /** - * - * *
      * Defines whether the node is preemptible.
      * 
* * bool preemptible = 1; - * * @return The preemptible. */ @java.lang.Override @@ -466,51 +434,42 @@ public boolean getPreemptible() { return preemptible_; } /** - * - * *
      * Defines whether the node is preemptible.
      * 
* * bool preemptible = 1; - * * @param value The preemptible to set. * @return This builder for chaining. */ public Builder setPreemptible(boolean value) { - + preemptible_ = value; onChanged(); return this; } /** - * - * *
      * Defines whether the node is preemptible.
      * 
* * bool preemptible = 1; - * * @return This builder for chaining. */ public Builder clearPreemptible() { - + preemptible_ = false; onChanged(); return this; } - private boolean reserved_; + private boolean reserved_ ; /** - * - * *
      * Whether the node is created under a reservation.
      * 
* * bool reserved = 2; - * * @return The reserved. */ @java.lang.Override @@ -518,43 +477,37 @@ public boolean getReserved() { return reserved_; } /** - * - * *
      * Whether the node is created under a reservation.
      * 
* * bool reserved = 2; - * * @param value The reserved to set. * @return This builder for chaining. */ public Builder setReserved(boolean value) { - + reserved_ = value; onChanged(); return this; } /** - * - * *
      * Whether the node is created under a reservation.
      * 
* * bool reserved = 2; - * * @return This builder for chaining. */ public Builder clearReserved() { - + reserved_ = false; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -564,12 +517,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.SchedulingConfig) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.SchedulingConfig) private static final com.google.cloud.tpu.v1.SchedulingConfig DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.SchedulingConfig(); } @@ -578,27 +531,27 @@ public static com.google.cloud.tpu.v1.SchedulingConfig getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SchedulingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -613,4 +566,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.SchedulingConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java new file mode 100644 index 000000000000..ee190f21b550 --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SchedulingConfigOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public interface SchedulingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.SchedulingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Defines whether the node is preemptible.
+   * 
+ * + * bool preemptible = 1; + * @return The preemptible. + */ + boolean getPreemptible(); + + /** + *
+   * Whether the node is created under a reservation.
+   * 
+ * + * bool reserved = 2; + * @return The reserved. + */ + boolean getReserved(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequest.java similarity index 64% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequest.java index a8ea93470d87..9f8f33159306 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequest.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [StartNode][google.cloud.tpu.v1.Tpu.StartNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.StartNodeRequest} */ -public final class StartNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class StartNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.StartNodeRequest) StartNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use StartNodeRequest.newBuilder() to construct. private StartNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StartNodeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new StartNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.StartNodeRequest.class, - com.google.cloud.tpu.v1.StartNodeRequest.Builder.class); + com.google.cloud.tpu.v1.StartNodeRequest.class, com.google.cloud.tpu.v1.StartNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -117,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -129,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -153,14 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.StartNodeRequest)) { return super.equals(obj); } com.google.cloud.tpu.v1.StartNodeRequest other = (com.google.cloud.tpu.v1.StartNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -179,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.StartNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.StartNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.StartNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.StartNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [StartNode][google.cloud.tpu.v1.Tpu.StartNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.StartNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.StartNodeRequest) com.google.cloud.tpu.v1.StartNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StartNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.StartNodeRequest.class, - com.google.cloud.tpu.v1.StartNodeRequest.Builder.class); + com.google.cloud.tpu.v1.StartNodeRequest.class, com.google.cloud.tpu.v1.StartNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.StartNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -318,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StartNodeRequest_descriptor; } @java.lang.Override @@ -339,8 +312,7 @@ public com.google.cloud.tpu.v1.StartNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.StartNodeRequest buildPartial() { - com.google.cloud.tpu.v1.StartNodeRequest result = - new com.google.cloud.tpu.v1.StartNodeRequest(this); + com.google.cloud.tpu.v1.StartNodeRequest result = new com.google.cloud.tpu.v1.StartNodeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -350,39 +322,38 @@ public com.google.cloud.tpu.v1.StartNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.StartNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v1.StartNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.StartNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -421,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -446,20 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -468,21 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -490,68 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -561,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.StartNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.StartNodeRequest) private static final com.google.cloud.tpu.v1.StartNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.StartNodeRequest(); } @@ -575,27 +534,27 @@ public static com.google.cloud.tpu.v1.StartNodeRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StartNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -610,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.StartNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java new file mode 100644 index 000000000000..c7b3e0e1275d --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StartNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public interface StartNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.StartNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequest.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequest.java similarity index 64% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequest.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequest.java index bb1d107e5176..f3680936ab65 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequest.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequest.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * Request for [StopNode][google.cloud.tpu.v1.Tpu.StopNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v1.StopNodeRequest} */ -public final class StopNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class StopNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.StopNodeRequest) StopNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use StopNodeRequest.newBuilder() to construct. private StopNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StopNodeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new StopNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.StopNodeRequest.class, - com.google.cloud.tpu.v1.StopNodeRequest.Builder.class); + com.google.cloud.tpu.v1.StopNodeRequest.class, com.google.cloud.tpu.v1.StopNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -117,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -129,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -153,14 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.StopNodeRequest)) { return super.equals(obj); } com.google.cloud.tpu.v1.StopNodeRequest other = (com.google.cloud.tpu.v1.StopNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -179,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.StopNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.StopNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.StopNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.StopNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [StopNode][google.cloud.tpu.v1.Tpu.StopNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v1.StopNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.StopNodeRequest) com.google.cloud.tpu.v1.StopNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StopNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.StopNodeRequest.class, - com.google.cloud.tpu.v1.StopNodeRequest.Builder.class); + com.google.cloud.tpu.v1.StopNodeRequest.class, com.google.cloud.tpu.v1.StopNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v1.StopNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -318,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_StopNodeRequest_descriptor; } @java.lang.Override @@ -339,8 +312,7 @@ public com.google.cloud.tpu.v1.StopNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v1.StopNodeRequest buildPartial() { - com.google.cloud.tpu.v1.StopNodeRequest result = - new com.google.cloud.tpu.v1.StopNodeRequest(this); + com.google.cloud.tpu.v1.StopNodeRequest result = new com.google.cloud.tpu.v1.StopNodeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -350,39 +322,38 @@ public com.google.cloud.tpu.v1.StopNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.StopNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v1.StopNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v1.StopNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -421,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -446,20 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -468,21 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -490,68 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -561,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.StopNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.StopNodeRequest) private static final com.google.cloud.tpu.v1.StopNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.StopNodeRequest(); } @@ -575,27 +534,27 @@ public static com.google.cloud.tpu.v1.StopNodeRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StopNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -610,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.StopNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java new file mode 100644 index 000000000000..6b652fd17f76 --- /dev/null +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/StopNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v1/cloud_tpu.proto + +package com.google.cloud.tpu.v1; + +public interface StopNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.StopNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Symptom.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Symptom.java similarity index 71% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Symptom.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Symptom.java index d6127e722081..4e5645ce6709 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Symptom.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/Symptom.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * A Symptom instance.
  * 
* * Protobuf type {@code google.cloud.tpu.v1.Symptom} */ -public final class Symptom extends com.google.protobuf.GeneratedMessageV3 - implements +public final class Symptom extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.Symptom) SymptomOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use Symptom.newBuilder() to construct. private Symptom(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Symptom() { symptomType_ = 0; details_ = ""; @@ -45,32 +27,30 @@ private Symptom() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new Symptom(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Symptom_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Symptom_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.tpu.v1.Symptom.class, com.google.cloud.tpu.v1.Symptom.Builder.class); } /** - * - * *
    * SymptomType represents the different types of Symptoms that a TPU can be
    * at.
@@ -78,10 +58,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * Protobuf enum {@code google.cloud.tpu.v1.Symptom.SymptomType}
    */
-  public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum {
+  public enum SymptomType
+      implements com.google.protobuf.ProtocolMessageEnum {
     /**
-     *
-     *
      * 
      * Unspecified symptom.
      * 
@@ -90,8 +69,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ SYMPTOM_TYPE_UNSPECIFIED(0), /** - * - * *
      * TPU VM memory is low.
      * 
@@ -100,8 +77,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ LOW_MEMORY(1), /** - * - * *
      * TPU runtime is out of memory.
      * 
@@ -110,8 +85,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ OUT_OF_MEMORY(2), /** - * - * *
      * TPU runtime execution has timed out.
      * 
@@ -120,8 +93,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ EXECUTE_TIMED_OUT(3), /** - * - * *
      * TPU runtime fails to construct a mesh that recognizes each TPU device's
      * neighbors.
@@ -131,8 +102,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum {
      */
     MESH_BUILD_FAIL(4),
     /**
-     *
-     *
      * 
      * TPU HBM is out of memory.
      * 
@@ -141,8 +110,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ HBM_OUT_OF_MEMORY(5), /** - * - * *
      * Abusive behaviors have been identified on the current project.
      * 
@@ -154,8 +121,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { ; /** - * - * *
      * Unspecified symptom.
      * 
@@ -164,8 +129,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int SYMPTOM_TYPE_UNSPECIFIED_VALUE = 0; /** - * - * *
      * TPU VM memory is low.
      * 
@@ -174,8 +137,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int LOW_MEMORY_VALUE = 1; /** - * - * *
      * TPU runtime is out of memory.
      * 
@@ -184,8 +145,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int OUT_OF_MEMORY_VALUE = 2; /** - * - * *
      * TPU runtime execution has timed out.
      * 
@@ -194,8 +153,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int EXECUTE_TIMED_OUT_VALUE = 3; /** - * - * *
      * TPU runtime fails to construct a mesh that recognizes each TPU device's
      * neighbors.
@@ -205,8 +162,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int MESH_BUILD_FAIL_VALUE = 4;
     /**
-     *
-     *
      * 
      * TPU HBM is out of memory.
      * 
@@ -215,8 +170,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HBM_OUT_OF_MEMORY_VALUE = 5; /** - * - * *
      * Abusive behaviors have been identified on the current project.
      * 
@@ -225,6 +178,7 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int PROJECT_ABUSE_VALUE = 6; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -249,57 +203,53 @@ public static SymptomType valueOf(int value) { */ public static SymptomType forNumber(int value) { switch (value) { - case 0: - return SYMPTOM_TYPE_UNSPECIFIED; - case 1: - return LOW_MEMORY; - case 2: - return OUT_OF_MEMORY; - case 3: - return EXECUTE_TIMED_OUT; - case 4: - return MESH_BUILD_FAIL; - case 5: - return HBM_OUT_OF_MEMORY; - case 6: - return PROJECT_ABUSE; - default: - return null; + case 0: return SYMPTOM_TYPE_UNSPECIFIED; + case 1: return LOW_MEMORY; + case 2: return OUT_OF_MEMORY; + case 3: return EXECUTE_TIMED_OUT; + case 4: return MESH_BUILD_FAIL; + case 5: return HBM_OUT_OF_MEMORY; + case 6: return PROJECT_ABUSE; + default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< + SymptomType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SymptomType findValueByNumber(int number) { + return SymptomType.forNumber(number); + } + }; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SymptomType findValueByNumber(int number) { - return SymptomType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { return getDescriptor(); } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { return com.google.cloud.tpu.v1.Symptom.getDescriptor().getEnumTypes().get(0); } private static final SymptomType[] VALUES = values(); - public static SymptomType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static SymptomType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -319,14 +269,11 @@ private SymptomType(int value) { public static final int CREATE_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp createTime_; /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ @java.lang.Override @@ -334,14 +281,11 @@ public boolean hasCreateTime() { return createTime_ != null; } /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ @java.lang.Override @@ -349,8 +293,6 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** - * - * *
    * Timestamp when the Symptom is created.
    * 
@@ -365,50 +307,38 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int SYMPTOM_TYPE_FIELD_NUMBER = 2; private int symptomType_; /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @return The enum numeric value on the wire for symptomType. */ - @java.lang.Override - public int getSymptomTypeValue() { + @java.lang.Override public int getSymptomTypeValue() { return symptomType_; } /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @return The symptomType. */ - @java.lang.Override - public com.google.cloud.tpu.v1.Symptom.SymptomType getSymptomType() { + @java.lang.Override public com.google.cloud.tpu.v1.Symptom.SymptomType getSymptomType() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v1.Symptom.SymptomType result = - com.google.cloud.tpu.v1.Symptom.SymptomType.valueOf(symptomType_); + com.google.cloud.tpu.v1.Symptom.SymptomType result = com.google.cloud.tpu.v1.Symptom.SymptomType.valueOf(symptomType_); return result == null ? com.google.cloud.tpu.v1.Symptom.SymptomType.UNRECOGNIZED : result; } public static final int DETAILS_FIELD_NUMBER = 3; private volatile java.lang.Object details_; /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The details. */ @java.lang.Override @@ -417,29 +347,29 @@ public java.lang.String getDetails() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; } } /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The bytes for details. */ @java.lang.Override - public com.google.protobuf.ByteString getDetailsBytes() { + public com.google.protobuf.ByteString + getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); details_ = b; return b; } else { @@ -450,14 +380,11 @@ public com.google.protobuf.ByteString getDetailsBytes() { public static final int WORKER_ID_FIELD_NUMBER = 4; private volatile java.lang.Object workerId_; /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The workerId. */ @java.lang.Override @@ -466,29 +393,29 @@ public java.lang.String getWorkerId() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); workerId_ = s; return s; } } /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The bytes for workerId. */ @java.lang.Override - public com.google.protobuf.ByteString getWorkerIdBytes() { + public com.google.protobuf.ByteString + getWorkerIdBytes() { java.lang.Object ref = workerId_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); workerId_ = b; return b; } else { @@ -497,7 +424,6 @@ public com.google.protobuf.ByteString getWorkerIdBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -509,12 +435,12 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } - if (symptomType_ - != com.google.cloud.tpu.v1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { + if (symptomType_ != com.google.cloud.tpu.v1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, symptomType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { @@ -533,11 +459,12 @@ public int getSerializedSize() { size = 0; if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); } - if (symptomType_ - != com.google.cloud.tpu.v1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, symptomType_); + if (symptomType_ != com.google.cloud.tpu.v1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, symptomType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, details_); @@ -553,7 +480,7 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.Symptom)) { return super.equals(obj); @@ -562,11 +489,14 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; + if (!getCreateTime() + .equals(other.getCreateTime())) return false; } if (symptomType_ != other.symptomType_) return false; - if (!getDetails().equals(other.getDetails())) return false; - if (!getWorkerId().equals(other.getWorkerId())) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!getWorkerId() + .equals(other.getWorkerId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -593,134 +523,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.Symptom parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.Symptom parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.Symptom parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v1.Symptom parseFrom(com.google.protobuf.ByteString data) + public static com.google.cloud.tpu.v1.Symptom parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.Symptom parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.Symptom parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.Symptom parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.Symptom parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.Symptom parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.Symptom parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.Symptom parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.Symptom parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.Symptom parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.Symptom prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A Symptom instance.
    * 
* * Protobuf type {@code google.cloud.tpu.v1.Symptom} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.Symptom) com.google.cloud.tpu.v1.SymptomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Symptom_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Symptom_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Symptom_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.tpu.v1.Symptom.class, com.google.cloud.tpu.v1.Symptom.Builder.class); } // Construct using com.google.cloud.tpu.v1.Symptom.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -740,9 +666,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_Symptom_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_Symptom_descriptor; } @java.lang.Override @@ -778,39 +704,38 @@ public com.google.cloud.tpu.v1.Symptom buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.Symptom) { - return mergeFrom((com.google.cloud.tpu.v1.Symptom) other); + return mergeFrom((com.google.cloud.tpu.v1.Symptom)other); } else { super.mergeFrom(other); return this; @@ -859,37 +784,34 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 16: - { - symptomType_ = input.readEnum(); - - break; - } // case 16 - case 26: - { - details_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - workerId_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 16: { + symptomType_ = input.readEnum(); + + break; + } // case 16 + case 26: { + details_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + workerId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -902,47 +824,34 @@ public Builder mergeFrom( private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** - * - * *
      * Timestamp when the Symptom is created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return createTimeBuilder_ != null || createTime_ != null; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -963,15 +872,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
* * .google.protobuf.Timestamp create_time = 1; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); onChanged(); @@ -982,8 +890,6 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -994,7 +900,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (createTime_ != null) { createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); } else { createTime_ = value; } @@ -1006,8 +912,6 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1026,8 +930,6 @@ public Builder clearCreateTime() { return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1035,13 +937,11 @@ public Builder clearCreateTime() { * .google.protobuf.Timestamp create_time = 1; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - + onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1052,14 +952,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1067,17 +964,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); createTime_ = null; } return createTimeBuilder_; @@ -1085,65 +979,51 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { private int symptomType_ = 0; /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @return The enum numeric value on the wire for symptomType. */ - @java.lang.Override - public int getSymptomTypeValue() { + @java.lang.Override public int getSymptomTypeValue() { return symptomType_; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @param value The enum numeric value on the wire for symptomType to set. * @return This builder for chaining. */ public Builder setSymptomTypeValue(int value) { - + symptomType_ = value; onChanged(); return this; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @return The symptomType. */ @java.lang.Override public com.google.cloud.tpu.v1.Symptom.SymptomType getSymptomType() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v1.Symptom.SymptomType result = - com.google.cloud.tpu.v1.Symptom.SymptomType.valueOf(symptomType_); + com.google.cloud.tpu.v1.Symptom.SymptomType result = com.google.cloud.tpu.v1.Symptom.SymptomType.valueOf(symptomType_); return result == null ? com.google.cloud.tpu.v1.Symptom.SymptomType.UNRECOGNIZED : result; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @param value The symptomType to set. * @return This builder for chaining. */ @@ -1151,24 +1031,21 @@ public Builder setSymptomType(com.google.cloud.tpu.v1.Symptom.SymptomType value) if (value == null) { throw new NullPointerException(); } - + symptomType_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @return This builder for chaining. */ public Builder clearSymptomType() { - + symptomType_ = 0; onChanged(); return this; @@ -1176,20 +1053,18 @@ public Builder clearSymptomType() { private java.lang.Object details_ = ""; /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @return The details. */ public java.lang.String getDetails() { java.lang.Object ref = details_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; @@ -1198,21 +1073,20 @@ public java.lang.String getDetails() { } } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @return The bytes for details. */ - public com.google.protobuf.ByteString getDetailsBytes() { + public com.google.protobuf.ByteString + getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); details_ = b; return b; } else { @@ -1220,61 +1094,54 @@ public com.google.protobuf.ByteString getDetailsBytes() { } } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @param value The details to set. * @return This builder for chaining. */ - public Builder setDetails(java.lang.String value) { + public Builder setDetails( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + details_ = value; onChanged(); return this; } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @return This builder for chaining. */ public Builder clearDetails() { - + details_ = getDefaultInstance().getDetails(); onChanged(); return this; } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @param value The bytes for details to set. * @return This builder for chaining. */ - public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + details_ = value; onChanged(); return this; @@ -1282,20 +1149,18 @@ public Builder setDetailsBytes(com.google.protobuf.ByteString value) { private java.lang.Object workerId_ = ""; /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @return The workerId. */ public java.lang.String getWorkerId() { java.lang.Object ref = workerId_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); workerId_ = s; return s; @@ -1304,21 +1169,20 @@ public java.lang.String getWorkerId() { } } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @return The bytes for workerId. */ - public com.google.protobuf.ByteString getWorkerIdBytes() { + public com.google.protobuf.ByteString + getWorkerIdBytes() { java.lang.Object ref = workerId_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); workerId_ = b; return b; } else { @@ -1326,68 +1190,61 @@ public com.google.protobuf.ByteString getWorkerIdBytes() { } } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @param value The workerId to set. * @return This builder for chaining. */ - public Builder setWorkerId(java.lang.String value) { + public Builder setWorkerId( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + workerId_ = value; onChanged(); return this; } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @return This builder for chaining. */ public Builder clearWorkerId() { - + workerId_ = getDefaultInstance().getWorkerId(); onChanged(); return this; } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @param value The bytes for workerId to set. * @return This builder for chaining. */ - public Builder setWorkerIdBytes(com.google.protobuf.ByteString value) { + public Builder setWorkerIdBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + workerId_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1397,12 +1254,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.Symptom) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.Symptom) private static final com.google.cloud.tpu.v1.Symptom DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.Symptom(); } @@ -1411,27 +1268,27 @@ public static com.google.cloud.tpu.v1.Symptom getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Symptom parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symptom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1446,4 +1303,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.Symptom getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SymptomOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SymptomOrBuilder.java similarity index 71% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SymptomOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SymptomOrBuilder.java index 72ba143f550d..60cfa7da86a9 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SymptomOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/SymptomOrBuilder.java @@ -1,55 +1,31 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface SymptomOrBuilder - extends +public interface SymptomOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.Symptom) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ boolean hasCreateTime(); /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); /** - * - * *
    * Timestamp when the Symptom is created.
    * 
@@ -59,77 +35,61 @@ public interface SymptomOrBuilder com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @return The enum numeric value on the wire for symptomType. */ int getSymptomTypeValue(); /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * * @return The symptomType. */ com.google.cloud.tpu.v1.Symptom.SymptomType getSymptomType(); /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The details. */ java.lang.String getDetails(); /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The bytes for details. */ - com.google.protobuf.ByteString getDetailsBytes(); + com.google.protobuf.ByteString + getDetailsBytes(); /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The workerId. */ java.lang.String getWorkerId(); /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The bytes for workerId. */ - com.google.protobuf.ByteString getWorkerIdBytes(); + com.google.protobuf.ByteString + getWorkerIdBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersion.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersion.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersion.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersion.java index add54a94ba1a..83bdfea05d3e 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersion.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersion.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; /** - * - * *
  * A tensorflow version that a Node can be configured with.
  * 
* * Protobuf type {@code google.cloud.tpu.v1.TensorFlowVersion} */ -public final class TensorFlowVersion extends com.google.protobuf.GeneratedMessageV3 - implements +public final class TensorFlowVersion extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v1.TensorFlowVersion) TensorFlowVersionOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use TensorFlowVersion.newBuilder() to construct. private TensorFlowVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private TensorFlowVersion() { name_ = ""; version_ = ""; @@ -44,41 +26,37 @@ private TensorFlowVersion() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new TensorFlowVersion(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.TensorFlowVersion.class, - com.google.cloud.tpu.v1.TensorFlowVersion.Builder.class); + com.google.cloud.tpu.v1.TensorFlowVersion.class, com.google.cloud.tpu.v1.TensorFlowVersion.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ @java.lang.Override @@ -87,29 +65,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -120,14 +98,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VERSION_FIELD_NUMBER = 2; private volatile java.lang.Object version_; /** - * - * *
    * the tensorflow version.
    * 
* * string version = 2; - * * @return The version. */ @java.lang.Override @@ -136,29 +111,29 @@ public java.lang.String getVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; } } /** - * - * *
    * the tensorflow version.
    * 
* * string version = 2; - * * @return The bytes for version. */ @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { + public com.google.protobuf.ByteString + getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); version_ = b; return b; } else { @@ -167,7 +142,6 @@ public com.google.protobuf.ByteString getVersionBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -179,7 +153,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -209,16 +184,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v1.TensorFlowVersion)) { return super.equals(obj); } - com.google.cloud.tpu.v1.TensorFlowVersion other = - (com.google.cloud.tpu.v1.TensorFlowVersion) obj; + com.google.cloud.tpu.v1.TensorFlowVersion other = (com.google.cloud.tpu.v1.TensorFlowVersion) obj; - if (!getName().equals(other.getName())) return false; - if (!getVersion().equals(other.getVersion())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -239,136 +215,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v1.TensorFlowVersion parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v1.TensorFlowVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v1.TensorFlowVersion parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v1.TensorFlowVersion prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A tensorflow version that a Node can be configured with.
    * 
* * Protobuf type {@code google.cloud.tpu.v1.TensorFlowVersion} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v1.TensorFlowVersion) com.google.cloud.tpu.v1.TensorFlowVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_TensorFlowVersion_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v1.TensorFlowVersion.class, - com.google.cloud.tpu.v1.TensorFlowVersion.Builder.class); + com.google.cloud.tpu.v1.TensorFlowVersion.class, com.google.cloud.tpu.v1.TensorFlowVersion.Builder.class); } // Construct using com.google.cloud.tpu.v1.TensorFlowVersion.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -380,9 +350,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v1.CloudTpuProto - .internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v1.CloudTpuProto.internal_static_google_cloud_tpu_v1_TensorFlowVersion_descriptor; } @java.lang.Override @@ -401,8 +371,7 @@ public com.google.cloud.tpu.v1.TensorFlowVersion build() { @java.lang.Override public com.google.cloud.tpu.v1.TensorFlowVersion buildPartial() { - com.google.cloud.tpu.v1.TensorFlowVersion result = - new com.google.cloud.tpu.v1.TensorFlowVersion(this); + com.google.cloud.tpu.v1.TensorFlowVersion result = new com.google.cloud.tpu.v1.TensorFlowVersion(this); result.name_ = name_; result.version_ = version_; onBuilt(); @@ -413,39 +382,38 @@ public com.google.cloud.tpu.v1.TensorFlowVersion buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v1.TensorFlowVersion) { - return mergeFrom((com.google.cloud.tpu.v1.TensorFlowVersion) other); + return mergeFrom((com.google.cloud.tpu.v1.TensorFlowVersion)other); } else { super.mergeFrom(other); return this; @@ -488,25 +456,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - version_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + version_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -519,20 +484,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -541,21 +504,20 @@ public java.lang.String getName() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -563,61 +525,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -625,20 +580,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object version_ = ""; /** - * - * *
      * the tensorflow version.
      * 
* * string version = 2; - * * @return The version. */ public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; @@ -647,21 +600,20 @@ public java.lang.String getVersion() { } } /** - * - * *
      * the tensorflow version.
      * 
* * string version = 2; - * * @return The bytes for version. */ - public com.google.protobuf.ByteString getVersionBytes() { + public com.google.protobuf.ByteString + getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); version_ = b; return b; } else { @@ -669,68 +621,61 @@ public com.google.protobuf.ByteString getVersionBytes() { } } /** - * - * *
      * the tensorflow version.
      * 
* * string version = 2; - * * @param value The version to set. * @return This builder for chaining. */ - public Builder setVersion(java.lang.String value) { + public Builder setVersion( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + version_ = value; onChanged(); return this; } /** - * - * *
      * the tensorflow version.
      * 
* * string version = 2; - * * @return This builder for chaining. */ public Builder clearVersion() { - + version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** - * - * *
      * the tensorflow version.
      * 
* * string version = 2; - * * @param value The bytes for version to set. * @return This builder for chaining. */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -740,12 +685,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v1.TensorFlowVersion) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v1.TensorFlowVersion) private static final com.google.cloud.tpu.v1.TensorFlowVersion DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v1.TensorFlowVersion(); } @@ -754,27 +699,27 @@ public static com.google.cloud.tpu.v1.TensorFlowVersion getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TensorFlowVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TensorFlowVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -789,4 +734,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v1.TensorFlowVersion getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionName.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionName.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionName.java diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionOrBuilder.java b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionOrBuilder.java similarity index 51% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionOrBuilder.java rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionOrBuilder.java index 7192ca2da720..fe0475ee89cd 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionOrBuilder.java +++ b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TensorFlowVersionOrBuilder.java @@ -1,75 +1,49 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v1/cloud_tpu.proto package com.google.cloud.tpu.v1; -public interface TensorFlowVersionOrBuilder - extends +public interface TensorFlowVersionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v1.TensorFlowVersion) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ java.lang.String getName(); /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString + getNameBytes(); /** - * - * *
    * the tensorflow version.
    * 
* * string version = 2; - * * @return The version. */ java.lang.String getVersion(); /** - * - * *
    * the tensorflow version.
    * 
* * string version = 2; - * * @return The bytes for version. */ - com.google.protobuf.ByteString getVersionBytes(); + com.google.protobuf.ByteString + getVersionBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v1/src/main/proto/google/cloud/tpu/v1/cloud_tpu.proto b/owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/proto/google/cloud/tpu/v1/cloud_tpu.proto similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v1/src/main/proto/google/cloud/tpu/v1/cloud_tpu.proto rename to owl-bot-staging/java-tpu/v1/proto-google-cloud-tpu-v1/src/main/proto/google/cloud/tpu/v1/cloud_tpu.proto diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/stub/tpustubsettings/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/stub/tpustubsettings/getnode/SyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/stub/tpustubsettings/getnode/SyncGetNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/stub/tpustubsettings/getnode/SyncGetNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetCredentialsProvider.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/create/SyncCreateSetEndpoint.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNodeLRO.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNodeLRO.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNodeLRO.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/AsyncCreateNodeLRO.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeStringNodeString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeStringNodeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeStringNodeString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/createnode/SyncCreateNodeStringNodeString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNodeLRO.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNodeLRO.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNodeLRO.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/AsyncDeleteNodeLRO.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeNodename.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeNodename.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeNodename.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeNodename.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/deletenode/SyncDeleteNodeString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/AsyncGetAcceleratorType.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/AsyncGetAcceleratorType.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/AsyncGetAcceleratorType.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/AsyncGetAcceleratorType.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorType.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorType.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorType.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorType.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/AsyncGetLocation.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/AsyncGetLocation.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/AsyncGetLocation.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/SyncGetLocation.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/SyncGetLocation.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/SyncGetLocation.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getlocation/SyncGetLocation.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/AsyncGetNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/AsyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/AsyncGetNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/AsyncGetNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeNodename.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeNodename.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeNodename.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeNodename.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/getnode/SyncGetNodeString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/AsyncGetTensorFlowVersion.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/AsyncGetTensorFlowVersion.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/AsyncGetTensorFlowVersion.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/AsyncGetTensorFlowVersion.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersion.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersion.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersion.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersion.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionTensorflowversionname.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionTensorflowversionname.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionTensorflowversionname.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/gettensorflowversion/SyncGetTensorFlowVersionTensorflowversionname.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocations.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocations.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocations.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocations.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocationsPaged.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocationsPaged.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/AsyncListLocationsPaged.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/SyncListLocations.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/SyncListLocations.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/SyncListLocations.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listlocations/SyncListLocations.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodes.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodes.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodes.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodes.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodesPaged.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodesPaged.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodesPaged.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/AsyncListNodesPaged.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodes.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodes.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodes.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodes.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesLocationname.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesLocationname.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesLocationname.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesLocationname.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listnodes/SyncListNodesString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersions.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersions.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersions.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersions.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersionsPaged.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersionsPaged.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersionsPaged.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/AsyncListTensorFlowVersionsPaged.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersions.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersions.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersions.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersions.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsString.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsString.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsTensorflowversionname.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsTensorflowversionname.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsTensorflowversionname.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/listtensorflowversions/SyncListTensorFlowVersionsTensorflowversionname.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNodeLRO.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNodeLRO.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNodeLRO.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/AsyncReimageNodeLRO.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/SyncReimageNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/SyncReimageNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/SyncReimageNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/reimagenode/SyncReimageNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNodeLRO.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNodeLRO.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNodeLRO.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/AsyncStartNodeLRO.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/SyncStartNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/SyncStartNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/SyncStartNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/startnode/SyncStartNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNodeLRO.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNodeLRO.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNodeLRO.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/AsyncStopNodeLRO.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/SyncStopNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/SyncStopNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/SyncStopNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpu/stopnode/SyncStopNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpusettings/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpusettings/getnode/SyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v1/tpusettings/getnode/SyncGetNode.java rename to owl-bot-staging/java-tpu/v1/samples/snippets/generated/com/google/cloud/tpu/v1/tpusettings/getnode/SyncGetNode.java diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuClient.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/TpuClient.java similarity index 84% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuClient.java rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/TpuClient.java index 7a1fbd831549..8b87de0d67d4 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuClient.java +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/TpuClient.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package com.google.cloud.tpu.v2alpha1; +package com.google.cloud.tpu.v2; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; @@ -27,11 +28,15 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.tpu.v2alpha1.stub.TpuStub; -import com.google.cloud.tpu.v2alpha1.stub.TpuStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.stub.TpuStub; +import com.google.cloud.tpu.v2.stub.TpuStubSettings; import com.google.common.util.concurrent.MoreExecutors; import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.List; @@ -42,7 +47,7 @@ /** * Service Description: Manages TPU nodes and other resources * - *

TPU API v2alpha1 + *

TPU API v2 * *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -112,14 +117,27 @@ * TpuClient tpuClient = TpuClient.create(tpuSettings); * }

* + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TpuSettings tpuSettings = TpuSettings.newHttpJsonBuilder().build();
+ * TpuClient tpuClient = TpuClient.create(tpuSettings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@BetaApi @Generated("by gapic-generator-java") public class TpuClient implements BackgroundResource { private final TpuSettings settings; private final TpuStub stub; - private final OperationsClient operationsClient; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of TpuClient with default settings. */ public static final TpuClient create() throws IOException { @@ -149,13 +167,17 @@ public static final TpuClient create(TpuStub stub) { protected TpuClient(TpuSettings settings) throws IOException { this.settings = settings; this.stub = ((TpuStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected TpuClient(TpuStub stub) { this.settings = null; this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final TpuSettings getSettings() { @@ -170,10 +192,19 @@ public TpuStub getStub() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ - public final OperationsClient getOperationsClient() { + public final com.google.longrunning.OperationsClient getOperationsClient() { return operationsClient; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists nodes. @@ -187,7 +218,7 @@ public final OperationsClient getOperationsClient() { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * NodeName parent = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * for (Node element : tpuClient.listNodes(parent).iterateAll()) { * // doThingsWith(element); * } @@ -197,7 +228,7 @@ public final OperationsClient getOperationsClient() { * @param parent Required. The parent resource name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListNodesPagedResponse listNodes(NodeName parent) { + public final ListNodesPagedResponse listNodes(LocationName parent) { ListNodesRequest request = ListNodesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listNodes(request); @@ -216,7 +247,7 @@ public final ListNodesPagedResponse listNodes(NodeName parent) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * String parent = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString(); + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); * for (Node element : tpuClient.listNodes(parent).iterateAll()) { * // doThingsWith(element); * } @@ -246,7 +277,7 @@ public final ListNodesPagedResponse listNodes(String parent) { * try (TpuClient tpuClient = TpuClient.create()) { * ListNodesRequest request = * ListNodesRequest.newBuilder() - * .setParent(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -278,7 +309,7 @@ public final ListNodesPagedResponse listNodes(ListNodesRequest request) { * try (TpuClient tpuClient = TpuClient.create()) { * ListNodesRequest request = * ListNodesRequest.newBuilder() - * .setParent(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -309,7 +340,7 @@ public final UnaryCallable listNodesPa * try (TpuClient tpuClient = TpuClient.create()) { * ListNodesRequest request = * ListNodesRequest.newBuilder() - * .setParent(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -612,14 +643,14 @@ public final UnaryCallable createNodeCallable() { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { * NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); - * Node response = tpuClient.deleteNodeAsync(name).get(); + * tpuClient.deleteNodeAsync(name).get(); * } * }

* * @param name Required. The resource name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture deleteNodeAsync(NodeName name) { + public final OperationFuture deleteNodeAsync(NodeName name) { DeleteNodeRequest request = DeleteNodeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteNodeAsync(request); @@ -639,14 +670,14 @@ public final OperationFuture deleteNodeAsync(NodeName n * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { * String name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString(); - * Node response = tpuClient.deleteNodeAsync(name).get(); + * tpuClient.deleteNodeAsync(name).get(); * } * }
* * @param name Required. The resource name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture deleteNodeAsync(String name) { + public final OperationFuture deleteNodeAsync(String name) { DeleteNodeRequest request = DeleteNodeRequest.newBuilder().setName(name).build(); return deleteNodeAsync(request); } @@ -668,14 +699,15 @@ public final OperationFuture deleteNodeAsync(String nam * DeleteNodeRequest.newBuilder() * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) * .build(); - * Node response = tpuClient.deleteNodeAsync(request).get(); + * tpuClient.deleteNodeAsync(request).get(); * } * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture deleteNodeAsync(DeleteNodeRequest request) { + public final OperationFuture deleteNodeAsync( + DeleteNodeRequest request) { return deleteNodeOperationCallable().futureCall(request); } @@ -696,14 +728,14 @@ public final OperationFuture deleteNodeAsync(DeleteNode * DeleteNodeRequest.newBuilder() * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) * .build(); - * OperationFuture future = + * OperationFuture future = * tpuClient.deleteNodeOperationCallable().futureCall(request); * // Do something. - * Node response = future.get(); + * future.get(); * } * }
*/ - public final OperationCallable + public final OperationCallable deleteNodeOperationCallable() { return stub.deleteNodeOperationCallable(); } @@ -727,7 +759,7 @@ public final OperationFuture deleteNodeAsync(DeleteNode * .build(); * ApiFuture future = tpuClient.deleteNodeCallable().futureCall(request); * // Do something. - * Operation response = future.get(); + * future.get(); * } * }
*/ @@ -748,7 +780,10 @@ public final UnaryCallable deleteNodeCallable() { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + * StopNodeRequest request = + * StopNodeRequest.newBuilder() + * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .build(); * Node response = tpuClient.stopNodeAsync(request).get(); * } * }
@@ -773,7 +808,10 @@ public final OperationFuture stopNodeAsync(StopNodeRequ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + * StopNodeRequest request = + * StopNodeRequest.newBuilder() + * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .build(); * OperationFuture future = * tpuClient.stopNodeOperationCallable().futureCall(request); * // Do something. @@ -799,7 +837,10 @@ public final OperationFuture stopNodeAsync(StopNodeRequ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + * StopNodeRequest request = + * StopNodeRequest.newBuilder() + * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .build(); * ApiFuture future = tpuClient.stopNodeCallable().futureCall(request); * // Do something. * Operation response = future.get(); @@ -823,7 +864,10 @@ public final UnaryCallable stopNodeCallable() { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + * StartNodeRequest request = + * StartNodeRequest.newBuilder() + * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .build(); * Node response = tpuClient.startNodeAsync(request).get(); * } * }
@@ -848,7 +892,10 @@ public final OperationFuture startNodeAsync(StartNodeRe * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + * StartNodeRequest request = + * StartNodeRequest.newBuilder() + * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .build(); * OperationFuture future = * tpuClient.startNodeOperationCallable().futureCall(request); * // Do something. @@ -874,7 +921,10 @@ public final OperationFuture startNodeAsync(StartNodeRe * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + * StartNodeRequest request = + * StartNodeRequest.newBuilder() + * .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + * .build(); * ApiFuture future = tpuClient.startNodeCallable().futureCall(request); * // Do something. * Operation response = future.get(); @@ -906,7 +956,7 @@ public final UnaryCallable startNodeCallable() { * * @param node Required. The node. Only fields specified in update_mask are updated. * @param updateMask Required. Mask of fields from [Node][Tpu.Node] to update. Supported fields: - * None. + * [description, tags, labels, metadata, network_config.enable_external_ips]. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateNodeAsync( @@ -1074,8 +1124,7 @@ public final GenerateServiceIdentityResponse generateServiceIdentity( * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * AcceleratorTypeName parent = - * AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) { * // doThingsWith(element); * } @@ -1085,7 +1134,7 @@ public final GenerateServiceIdentityResponse generateServiceIdentity( * @param parent Required. The parent resource name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(AcceleratorTypeName parent) { + public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(LocationName parent) { ListAcceleratorTypesRequest request = ListAcceleratorTypesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) @@ -1106,8 +1155,7 @@ public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(AcceleratorT * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * String parent = - * AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString(); + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); * for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) { * // doThingsWith(element); * } @@ -1138,9 +1186,7 @@ public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(String paren * try (TpuClient tpuClient = TpuClient.create()) { * ListAcceleratorTypesRequest request = * ListAcceleratorTypesRequest.newBuilder() - * .setParent( - * AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") - * .toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") @@ -1175,9 +1221,7 @@ public final ListAcceleratorTypesPagedResponse listAcceleratorTypes( * try (TpuClient tpuClient = TpuClient.create()) { * ListAcceleratorTypesRequest request = * ListAcceleratorTypesRequest.newBuilder() - * .setParent( - * AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") - * .toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") @@ -1212,9 +1256,7 @@ public final ListAcceleratorTypesPagedResponse listAcceleratorTypes( * try (TpuClient tpuClient = TpuClient.create()) { * ListAcceleratorTypesRequest request = * ListAcceleratorTypesRequest.newBuilder() - * .setParent( - * AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") - * .toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") @@ -1373,8 +1415,7 @@ public final AcceleratorType getAcceleratorType(GetAcceleratorTypeRequest reques * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * RuntimeVersionName parent = - * RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) { * // doThingsWith(element); * } @@ -1384,7 +1425,7 @@ public final AcceleratorType getAcceleratorType(GetAcceleratorTypeRequest reques * @param parent Required. The parent resource name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListRuntimeVersionsPagedResponse listRuntimeVersions(RuntimeVersionName parent) { + public final ListRuntimeVersionsPagedResponse listRuntimeVersions(LocationName parent) { ListRuntimeVersionsRequest request = ListRuntimeVersionsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) @@ -1405,8 +1446,7 @@ public final ListRuntimeVersionsPagedResponse listRuntimeVersions(RuntimeVersion * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (TpuClient tpuClient = TpuClient.create()) { - * String parent = - * RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString(); + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); * for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) { * // doThingsWith(element); * } @@ -1437,8 +1477,7 @@ public final ListRuntimeVersionsPagedResponse listRuntimeVersions(String parent) * try (TpuClient tpuClient = TpuClient.create()) { * ListRuntimeVersionsRequest request = * ListRuntimeVersionsRequest.newBuilder() - * .setParent( - * RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") @@ -1473,8 +1512,7 @@ public final ListRuntimeVersionsPagedResponse listRuntimeVersions( * try (TpuClient tpuClient = TpuClient.create()) { * ListRuntimeVersionsRequest request = * ListRuntimeVersionsRequest.newBuilder() - * .setParent( - * RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") @@ -1509,8 +1547,7 @@ public final ListRuntimeVersionsPagedResponse listRuntimeVersions( * try (TpuClient tpuClient = TpuClient.create()) { * ListRuntimeVersionsRequest request = * ListRuntimeVersionsRequest.newBuilder() - * .setParent( - * RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") @@ -1712,6 +1749,160 @@ public final GetGuestAttributesResponse getGuestAttributes(GetGuestAttributesReq return stub.getGuestAttributesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : tpuClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = tpuClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = tpuClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = tpuClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = tpuClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + @Override public final void close() { stub.close(); @@ -1974,4 +2165,80 @@ protected ListRuntimeVersionsFixedSizeCollection createCollection( return new ListRuntimeVersionsFixedSizeCollection(pages, collectionSize); } } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuSettings.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/TpuSettings.java similarity index 85% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuSettings.java rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/TpuSettings.java index 84b03976c4e3..4b00298043a9 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuSettings.java +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/TpuSettings.java @@ -14,26 +14,34 @@ * limitations under the License. */ -package com.google.cloud.tpu.v2alpha1; +package com.google.cloud.tpu.v2; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListRuntimeVersionsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.tpu.v2alpha1.stub.TpuStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.stub.TpuStubSettings; import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -71,7 +79,6 @@ * TpuSettings tpuSettings = tpuSettingsBuilder.build(); * }
*/ -@BetaApi @Generated("by gapic-generator-java") public class TpuSettings extends ClientSettings { @@ -103,7 +110,7 @@ public UnaryCallSettings deleteNodeSettings() { } /** Returns the object with the settings used for calls to deleteNode. */ - public OperationCallSettings + public OperationCallSettings deleteNodeOperationSettings() { return ((TpuStubSettings) getStubSettings()).deleteNodeOperationSettings(); } @@ -180,6 +187,17 @@ public UnaryCallSettings getRuntimeVer return ((TpuStubSettings) getStubSettings()).getGuestAttributesSettings(); } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((TpuStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((TpuStubSettings) getStubSettings()).getLocationSettings(); + } + public static final TpuSettings create(TpuStubSettings stub) throws IOException { return new TpuSettings.Builder(stub.toBuilder()).build(); } @@ -204,11 +222,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return TpuStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return TpuStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return TpuStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return TpuStubSettings.defaultTransportChannelProvider(); } @@ -218,11 +243,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return TpuStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -260,6 +291,11 @@ private static Builder createDefault() { return new Builder(TpuStubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(TpuStubSettings.newHttpJsonBuilder()); + } + public TpuStubSettings.Builder getStubSettingsBuilder() { return ((TpuStubSettings.Builder) getStubSettings()); } @@ -304,7 +340,7 @@ public UnaryCallSettings.Builder deleteNodeSetting } /** Returns the builder for the settings used for calls to deleteNode. */ - public OperationCallSettings.Builder + public OperationCallSettings.Builder deleteNodeOperationSettings() { return getStubSettingsBuilder().deleteNodeOperationSettings(); } @@ -385,6 +421,18 @@ public UnaryCallSettings.Builder updateNodeSetting return getStubSettingsBuilder().getGuestAttributesSettings(); } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + @Override public TpuSettings build() throws IOException { return new TpuSettings(this); diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/gapic_metadata.json b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/gapic_metadata.json similarity index 87% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/gapic_metadata.json rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/gapic_metadata.json index db678f19cbc3..fe300048387b 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/gapic_metadata.json +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/gapic_metadata.json @@ -2,8 +2,8 @@ "schema": "1.0", "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", "language": "java", - "protoPackage": "google.cloud.tpu.v2alpha1", - "libraryPackage": "com.google.cloud.tpu.v2alpha1", + "protoPackage": "google.cloud.tpu.v2", + "libraryPackage": "com.google.cloud.tpu.v2", "services": { "Tpu": { "clients": { @@ -25,6 +25,9 @@ "GetGuestAttributes": { "methods": ["getGuestAttributes", "getGuestAttributesCallable"] }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "GetNode": { "methods": ["getNode", "getNode", "getNode", "getNodeCallable"] }, @@ -34,6 +37,9 @@ "ListAcceleratorTypes": { "methods": ["listAcceleratorTypes", "listAcceleratorTypes", "listAcceleratorTypes", "listAcceleratorTypesPagedCallable", "listAcceleratorTypesCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "ListNodes": { "methods": ["listNodes", "listNodes", "listNodes", "listNodesPagedCallable", "listNodesCallable"] }, diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/package-info.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/package-info.java new file mode 100644 index 000000000000..f0a429235eaf --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/package-info.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Cloud TPU API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= TpuClient ======================= + * + *

Service Description: Manages TPU nodes and other resources + * + *

TPU API v2 + * + *

Sample for TpuClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TpuClient tpuClient = TpuClient.create()) {
+ *   NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]");
+ *   Node response = tpuClient.getNode(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.tpu.v2; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/GrpcTpuCallableFactory.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/GrpcTpuCallableFactory.java new file mode 100644 index 000000000000..068d5163059d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/GrpcTpuCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Tpu service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcTpuCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuStub.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/GrpcTpuStub.java similarity index 81% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuStub.java rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/GrpcTpuStub.java index cd2c7d7fd0fc..eb977d9d9176 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuStub.java +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/GrpcTpuStub.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.cloud.tpu.v2alpha1.stub; +package com.google.cloud.tpu.v2.stub; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListRuntimeVersionsPagedResponse; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; @@ -28,34 +28,40 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.CreateNodeRequest; -import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; -import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest; -import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse; -import com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest; -import com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest; -import com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse; -import com.google.cloud.tpu.v2alpha1.GetNodeRequest; -import com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest; -import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; -import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse; -import com.google.cloud.tpu.v2alpha1.ListNodesRequest; -import com.google.cloud.tpu.v2alpha1.ListNodesResponse; -import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; -import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse; -import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.OperationMetadata; -import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.StartNodeRequest; -import com.google.cloud.tpu.v2alpha1.StopNodeRequest; -import com.google.cloud.tpu.v2alpha1.UpdateNodeRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.CreateNodeRequest; +import com.google.cloud.tpu.v2.DeleteNodeRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2.GetNodeRequest; +import com.google.cloud.tpu.v2.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2.ListNodesRequest; +import com.google.cloud.tpu.v2.ListNodesResponse; +import com.google.cloud.tpu.v2.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.StartNodeRequest; +import com.google.cloud.tpu.v2.StopNodeRequest; +import com.google.cloud.tpu.v2.UpdateNodeRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; 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; @@ -65,14 +71,13 @@ * *

This class is for advanced usage and reflects the underlying API directly. */ -@BetaApi @Generated("by gapic-generator-java") public class GrpcTpuStub extends TpuStub { private static final MethodDescriptor listNodesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/ListNodes") + .setFullMethodName("google.cloud.tpu.v2.Tpu/ListNodes") .setRequestMarshaller(ProtoUtils.marshaller(ListNodesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListNodesResponse.getDefaultInstance())) .build(); @@ -80,7 +85,7 @@ public class GrpcTpuStub extends TpuStub { private static final MethodDescriptor getNodeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetNode") + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetNode") .setRequestMarshaller(ProtoUtils.marshaller(GetNodeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Node.getDefaultInstance())) .build(); @@ -88,7 +93,7 @@ public class GrpcTpuStub extends TpuStub { private static final MethodDescriptor createNodeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/CreateNode") + .setFullMethodName("google.cloud.tpu.v2.Tpu/CreateNode") .setRequestMarshaller(ProtoUtils.marshaller(CreateNodeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); @@ -96,7 +101,7 @@ public class GrpcTpuStub extends TpuStub { private static final MethodDescriptor deleteNodeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/DeleteNode") + .setFullMethodName("google.cloud.tpu.v2.Tpu/DeleteNode") .setRequestMarshaller(ProtoUtils.marshaller(DeleteNodeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); @@ -104,7 +109,7 @@ public class GrpcTpuStub extends TpuStub { private static final MethodDescriptor stopNodeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/StopNode") + .setFullMethodName("google.cloud.tpu.v2.Tpu/StopNode") .setRequestMarshaller(ProtoUtils.marshaller(StopNodeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); @@ -112,7 +117,7 @@ public class GrpcTpuStub extends TpuStub { private static final MethodDescriptor startNodeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/StartNode") + .setFullMethodName("google.cloud.tpu.v2.Tpu/StartNode") .setRequestMarshaller(ProtoUtils.marshaller(StartNodeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); @@ -120,7 +125,7 @@ public class GrpcTpuStub extends TpuStub { private static final MethodDescriptor updateNodeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/UpdateNode") + .setFullMethodName("google.cloud.tpu.v2.Tpu/UpdateNode") .setRequestMarshaller(ProtoUtils.marshaller(UpdateNodeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); @@ -131,7 +136,7 @@ public class GrpcTpuStub extends TpuStub { MethodDescriptor .newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GenerateServiceIdentity") + .setFullMethodName("google.cloud.tpu.v2.Tpu/GenerateServiceIdentity") .setRequestMarshaller( ProtoUtils.marshaller(GenerateServiceIdentityRequest.getDefaultInstance())) .setResponseMarshaller( @@ -142,7 +147,7 @@ public class GrpcTpuStub extends TpuStub { listAcceleratorTypesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/ListAcceleratorTypes") + .setFullMethodName("google.cloud.tpu.v2.Tpu/ListAcceleratorTypes") .setRequestMarshaller( ProtoUtils.marshaller(ListAcceleratorTypesRequest.getDefaultInstance())) .setResponseMarshaller( @@ -153,7 +158,7 @@ public class GrpcTpuStub extends TpuStub { getAcceleratorTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetAcceleratorType") + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetAcceleratorType") .setRequestMarshaller( ProtoUtils.marshaller(GetAcceleratorTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(AcceleratorType.getDefaultInstance())) @@ -163,7 +168,7 @@ public class GrpcTpuStub extends TpuStub { listRuntimeVersionsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/ListRuntimeVersions") + .setFullMethodName("google.cloud.tpu.v2.Tpu/ListRuntimeVersions") .setRequestMarshaller( ProtoUtils.marshaller(ListRuntimeVersionsRequest.getDefaultInstance())) .setResponseMarshaller( @@ -174,7 +179,7 @@ public class GrpcTpuStub extends TpuStub { getRuntimeVersionMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetRuntimeVersion") + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetRuntimeVersion") .setRequestMarshaller( ProtoUtils.marshaller(GetRuntimeVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RuntimeVersion.getDefaultInstance())) @@ -184,13 +189,32 @@ public class GrpcTpuStub extends TpuStub { getGuestAttributesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetGuestAttributes") + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetGuestAttributes") .setRequestMarshaller( ProtoUtils.marshaller(GetGuestAttributesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(GetGuestAttributesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + private final UnaryCallable listNodesCallable; private final UnaryCallable listNodesPagedCallable; private final UnaryCallable getNodeCallable; @@ -198,7 +222,7 @@ public class GrpcTpuStub extends TpuStub { private final OperationCallable createNodeOperationCallable; private final UnaryCallable deleteNodeCallable; - private final OperationCallable + private final OperationCallable deleteNodeOperationCallable; private final UnaryCallable stopNodeCallable; private final OperationCallable @@ -224,6 +248,10 @@ public class GrpcTpuStub extends TpuStub { private final UnaryCallable getRuntimeVersionCallable; private final UnaryCallable getGuestAttributesCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -398,6 +426,26 @@ protected GrpcTpuStub( return params.build(); }) .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); this.listNodesCallable = callableFactory.createUnaryCallable( @@ -493,6 +541,15 @@ protected GrpcTpuStub( getGuestAttributesTransportSettings, settings.getGuestAttributesSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -534,7 +591,7 @@ public UnaryCallable deleteNodeCallable() { } @Override - public OperationCallable + public OperationCallable deleteNodeOperationCallable() { return deleteNodeOperationCallable; } @@ -616,6 +673,22 @@ public UnaryCallable getRuntimeVersion return getGuestAttributesCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + @Override public final void close() { try { diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuCallableFactory.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuCallableFactory.java new file mode 100644 index 000000000000..68b0e22df8dd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Tpu service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonTpuCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuStub.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuStub.java new file mode 100644 index 000000000000..acbf0d3d8423 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/HttpJsonTpuStub.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.stub; + +import static com.google.cloud.tpu.v2.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListRuntimeVersionsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.CreateNodeRequest; +import com.google.cloud.tpu.v2.DeleteNodeRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2.GetNodeRequest; +import com.google.cloud.tpu.v2.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2.ListNodesRequest; +import com.google.cloud.tpu.v2.ListNodesResponse; +import com.google.cloud.tpu.v2.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.StartNodeRequest; +import com.google.cloud.tpu.v2.StopNodeRequest; +import com.google.cloud.tpu.v2.UpdateNodeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Tpu service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonTpuStub extends TpuStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Node.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listNodesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/ListNodes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/nodes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListNodesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getNodeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetNode") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/nodes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Node.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createNodeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/CreateNode") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/nodes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "nodeId", request.getNodeId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("node", request.getNode(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateNodeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteNodeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/DeleteNode") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/nodes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteNodeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor stopNodeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/StopNode") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/nodes/*}:stop", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StopNodeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor startNodeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/StartNode") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/nodes/*}:start", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StartNodeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateNodeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/UpdateNode") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{node.name=projects/*/locations/*/nodes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "node.name", request.getNode().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("node", request.getNode(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateNodeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + GenerateServiceIdentityRequest, GenerateServiceIdentityResponse> + generateServiceIdentityMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/GenerateServiceIdentity") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}:generateServiceIdentity", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerateServiceIdentityResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAcceleratorTypesRequest, ListAcceleratorTypesResponse> + listAcceleratorTypesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/ListAcceleratorTypes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/acceleratorTypes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAcceleratorTypesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAcceleratorTypeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetAcceleratorType") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/acceleratorTypes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AcceleratorType.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listRuntimeVersionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/ListRuntimeVersions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*/locations/*}/runtimeVersions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRuntimeVersionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getRuntimeVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetRuntimeVersion") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/runtimeVersions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RuntimeVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getGuestAttributesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tpu.v2.Tpu/GetGuestAttributes") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/nodes/*}:getGuestAttributes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GetGuestAttributesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=projects/*}/locations", + "/v2alpha1/{name=projects/*}/locations", + "/v2/{name=projects/*}/locations") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1/{name=projects/*/locations/*}", + "/v2alpha1/{name=projects/*/locations/*}", + "/v2/{name=projects/*/locations/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listNodesCallable; + private final UnaryCallable listNodesPagedCallable; + private final UnaryCallable getNodeCallable; + private final UnaryCallable createNodeCallable; + private final OperationCallable + createNodeOperationCallable; + private final UnaryCallable deleteNodeCallable; + private final OperationCallable + deleteNodeOperationCallable; + private final UnaryCallable stopNodeCallable; + private final OperationCallable + stopNodeOperationCallable; + private final UnaryCallable startNodeCallable; + private final OperationCallable + startNodeOperationCallable; + private final UnaryCallable updateNodeCallable; + private final OperationCallable + updateNodeOperationCallable; + private final UnaryCallable + generateServiceIdentityCallable; + private final UnaryCallable + listAcceleratorTypesCallable; + private final UnaryCallable + listAcceleratorTypesPagedCallable; + private final UnaryCallable + getAcceleratorTypeCallable; + private final UnaryCallable + listRuntimeVersionsCallable; + private final UnaryCallable + listRuntimeVersionsPagedCallable; + private final UnaryCallable getRuntimeVersionCallable; + private final UnaryCallable + getGuestAttributesCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonTpuStub create(TpuStubSettings settings) throws IOException { + return new HttpJsonTpuStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonTpuStub create(ClientContext clientContext) throws IOException { + return new HttpJsonTpuStub(TpuStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonTpuStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonTpuStub( + TpuStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonTpuStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected HttpJsonTpuStub(TpuStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonTpuCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonTpuStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected HttpJsonTpuStub( + TpuStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings listNodesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listNodesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getNodeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNodeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createNodeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createNodeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteNodeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteNodeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings stopNodeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(stopNodeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings startNodeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(startNodeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateNodeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateNodeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + generateServiceIdentityTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(generateServiceIdentityMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listAcceleratorTypesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAcceleratorTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getAcceleratorTypeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAcceleratorTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listRuntimeVersionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listRuntimeVersionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getRuntimeVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getRuntimeVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getGuestAttributesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getGuestAttributesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listNodesCallable = + callableFactory.createUnaryCallable( + listNodesTransportSettings, settings.listNodesSettings(), clientContext); + this.listNodesPagedCallable = + callableFactory.createPagedCallable( + listNodesTransportSettings, settings.listNodesSettings(), clientContext); + this.getNodeCallable = + callableFactory.createUnaryCallable( + getNodeTransportSettings, settings.getNodeSettings(), clientContext); + this.createNodeCallable = + callableFactory.createUnaryCallable( + createNodeTransportSettings, settings.createNodeSettings(), clientContext); + this.createNodeOperationCallable = + callableFactory.createOperationCallable( + createNodeTransportSettings, + settings.createNodeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteNodeCallable = + callableFactory.createUnaryCallable( + deleteNodeTransportSettings, settings.deleteNodeSettings(), clientContext); + this.deleteNodeOperationCallable = + callableFactory.createOperationCallable( + deleteNodeTransportSettings, + settings.deleteNodeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.stopNodeCallable = + callableFactory.createUnaryCallable( + stopNodeTransportSettings, settings.stopNodeSettings(), clientContext); + this.stopNodeOperationCallable = + callableFactory.createOperationCallable( + stopNodeTransportSettings, + settings.stopNodeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.startNodeCallable = + callableFactory.createUnaryCallable( + startNodeTransportSettings, settings.startNodeSettings(), clientContext); + this.startNodeOperationCallable = + callableFactory.createOperationCallable( + startNodeTransportSettings, + settings.startNodeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateNodeCallable = + callableFactory.createUnaryCallable( + updateNodeTransportSettings, settings.updateNodeSettings(), clientContext); + this.updateNodeOperationCallable = + callableFactory.createOperationCallable( + updateNodeTransportSettings, + settings.updateNodeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.generateServiceIdentityCallable = + callableFactory.createUnaryCallable( + generateServiceIdentityTransportSettings, + settings.generateServiceIdentitySettings(), + clientContext); + this.listAcceleratorTypesCallable = + callableFactory.createUnaryCallable( + listAcceleratorTypesTransportSettings, + settings.listAcceleratorTypesSettings(), + clientContext); + this.listAcceleratorTypesPagedCallable = + callableFactory.createPagedCallable( + listAcceleratorTypesTransportSettings, + settings.listAcceleratorTypesSettings(), + clientContext); + this.getAcceleratorTypeCallable = + callableFactory.createUnaryCallable( + getAcceleratorTypeTransportSettings, + settings.getAcceleratorTypeSettings(), + clientContext); + this.listRuntimeVersionsCallable = + callableFactory.createUnaryCallable( + listRuntimeVersionsTransportSettings, + settings.listRuntimeVersionsSettings(), + clientContext); + this.listRuntimeVersionsPagedCallable = + callableFactory.createPagedCallable( + listRuntimeVersionsTransportSettings, + settings.listRuntimeVersionsSettings(), + clientContext); + this.getRuntimeVersionCallable = + callableFactory.createUnaryCallable( + getRuntimeVersionTransportSettings, + settings.getRuntimeVersionSettings(), + clientContext); + this.getGuestAttributesCallable = + callableFactory.createUnaryCallable( + getGuestAttributesTransportSettings, + settings.getGuestAttributesSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listNodesMethodDescriptor); + methodDescriptors.add(getNodeMethodDescriptor); + methodDescriptors.add(createNodeMethodDescriptor); + methodDescriptors.add(deleteNodeMethodDescriptor); + methodDescriptors.add(stopNodeMethodDescriptor); + methodDescriptors.add(startNodeMethodDescriptor); + methodDescriptors.add(updateNodeMethodDescriptor); + methodDescriptors.add(generateServiceIdentityMethodDescriptor); + methodDescriptors.add(listAcceleratorTypesMethodDescriptor); + methodDescriptors.add(getAcceleratorTypeMethodDescriptor); + methodDescriptors.add(listRuntimeVersionsMethodDescriptor); + methodDescriptors.add(getRuntimeVersionMethodDescriptor); + methodDescriptors.add(getGuestAttributesMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listNodesCallable() { + return listNodesCallable; + } + + @Override + public UnaryCallable listNodesPagedCallable() { + return listNodesPagedCallable; + } + + @Override + public UnaryCallable getNodeCallable() { + return getNodeCallable; + } + + @Override + public UnaryCallable createNodeCallable() { + return createNodeCallable; + } + + @Override + public OperationCallable + createNodeOperationCallable() { + return createNodeOperationCallable; + } + + @Override + public UnaryCallable deleteNodeCallable() { + return deleteNodeCallable; + } + + @Override + public OperationCallable + deleteNodeOperationCallable() { + return deleteNodeOperationCallable; + } + + @Override + public UnaryCallable stopNodeCallable() { + return stopNodeCallable; + } + + @Override + public OperationCallable stopNodeOperationCallable() { + return stopNodeOperationCallable; + } + + @Override + public UnaryCallable startNodeCallable() { + return startNodeCallable; + } + + @Override + public OperationCallable startNodeOperationCallable() { + return startNodeOperationCallable; + } + + @Override + public UnaryCallable updateNodeCallable() { + return updateNodeCallable; + } + + @Override + public OperationCallable + updateNodeOperationCallable() { + return updateNodeOperationCallable; + } + + @Override + public UnaryCallable + generateServiceIdentityCallable() { + return generateServiceIdentityCallable; + } + + @Override + public UnaryCallable + listAcceleratorTypesCallable() { + return listAcceleratorTypesCallable; + } + + @Override + public UnaryCallable + listAcceleratorTypesPagedCallable() { + return listAcceleratorTypesPagedCallable; + } + + @Override + public UnaryCallable getAcceleratorTypeCallable() { + return getAcceleratorTypeCallable; + } + + @Override + public UnaryCallable + listRuntimeVersionsCallable() { + return listRuntimeVersionsCallable; + } + + @Override + public UnaryCallable + listRuntimeVersionsPagedCallable() { + return listRuntimeVersionsPagedCallable; + } + + @Override + public UnaryCallable getRuntimeVersionCallable() { + return getRuntimeVersionCallable; + } + + @Override + public UnaryCallable + getGuestAttributesCallable() { + return getGuestAttributesCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStub.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/TpuStub.java similarity index 68% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStub.java rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/TpuStub.java index 02185bf703a8..40e5b83b1807 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStub.java +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/TpuStub.java @@ -14,40 +14,45 @@ * limitations under the License. */ -package com.google.cloud.tpu.v2alpha1.stub; +package com.google.cloud.tpu.v2.stub; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListRuntimeVersionsPagedResponse; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.CreateNodeRequest; -import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; -import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest; -import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse; -import com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest; -import com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest; -import com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse; -import com.google.cloud.tpu.v2alpha1.GetNodeRequest; -import com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest; -import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; -import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse; -import com.google.cloud.tpu.v2alpha1.ListNodesRequest; -import com.google.cloud.tpu.v2alpha1.ListNodesResponse; -import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; -import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse; -import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.OperationMetadata; -import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.StartNodeRequest; -import com.google.cloud.tpu.v2alpha1.StopNodeRequest; -import com.google.cloud.tpu.v2alpha1.UpdateNodeRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.CreateNodeRequest; +import com.google.cloud.tpu.v2.DeleteNodeRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2.GetNodeRequest; +import com.google.cloud.tpu.v2.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2.ListNodesRequest; +import com.google.cloud.tpu.v2.ListNodesResponse; +import com.google.cloud.tpu.v2.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.StartNodeRequest; +import com.google.cloud.tpu.v2.StopNodeRequest; +import com.google.cloud.tpu.v2.UpdateNodeRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -56,12 +61,15 @@ * *

This class is for advanced usage and reflects the underlying API directly. */ -@BetaApi @Generated("by gapic-generator-java") public abstract class TpuStub implements BackgroundResource { public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; } public UnaryCallable listNodesPagedCallable() { @@ -85,7 +93,7 @@ public UnaryCallable createNodeCallable() { throw new UnsupportedOperationException("Not implemented: createNodeCallable()"); } - public OperationCallable + public OperationCallable deleteNodeOperationCallable() { throw new UnsupportedOperationException("Not implemented: deleteNodeOperationCallable()"); } @@ -157,6 +165,19 @@ public UnaryCallable getRuntimeVersion throw new UnsupportedOperationException("Not implemented: getGuestAttributesCallable()"); } + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + @Override public abstract void close(); } diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStubSettings.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/TpuStubSettings.java similarity index 82% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStubSettings.java rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/TpuStubSettings.java index 726f0fec79ac..3612ad9e4435 100644 --- a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStubSettings.java +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2/stub/TpuStubSettings.java @@ -14,11 +14,12 @@ * limitations under the License. */ -package com.google.cloud.tpu.v2alpha1.stub; +package com.google.cloud.tpu.v2.stub; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListRuntimeVersionsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -30,6 +31,9 @@ import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.longrunning.OperationSnapshot; import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; @@ -46,33 +50,38 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.CreateNodeRequest; -import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; -import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest; -import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse; -import com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest; -import com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest; -import com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse; -import com.google.cloud.tpu.v2alpha1.GetNodeRequest; -import com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest; -import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; -import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse; -import com.google.cloud.tpu.v2alpha1.ListNodesRequest; -import com.google.cloud.tpu.v2alpha1.ListNodesResponse; -import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; -import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse; -import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.OperationMetadata; -import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.StartNodeRequest; -import com.google.cloud.tpu.v2alpha1.StopNodeRequest; -import com.google.cloud.tpu.v2alpha1.UpdateNodeRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.CreateNodeRequest; +import com.google.cloud.tpu.v2.DeleteNodeRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2.GetNodeRequest; +import com.google.cloud.tpu.v2.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2.ListNodesRequest; +import com.google.cloud.tpu.v2.ListNodesResponse; +import com.google.cloud.tpu.v2.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.StartNodeRequest; +import com.google.cloud.tpu.v2.StopNodeRequest; +import com.google.cloud.tpu.v2.UpdateNodeRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -111,7 +120,6 @@ * TpuStubSettings tpuSettings = tpuSettingsBuilder.build(); * }

*/ -@BetaApi @Generated("by gapic-generator-java") public class TpuStubSettings extends StubSettings { /** The default scopes of the service. */ @@ -125,7 +133,7 @@ public class TpuStubSettings extends StubSettings { private final OperationCallSettings createNodeOperationSettings; private final UnaryCallSettings deleteNodeSettings; - private final OperationCallSettings + private final OperationCallSettings deleteNodeOperationSettings; private final UnaryCallSettings stopNodeSettings; private final OperationCallSettings @@ -152,6 +160,10 @@ public class TpuStubSettings extends StubSettings { getRuntimeVersionSettings; private final UnaryCallSettings getGuestAttributesSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; private static final PagedListDescriptor LIST_NODES_PAGE_STR_DESC = @@ -270,6 +282,42 @@ public Iterable extractResources(ListRuntimeVersionsResponse pay } }; + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + private static final PagedListResponseFactory< ListNodesRequest, ListNodesResponse, ListNodesPagedResponse> LIST_NODES_PAGE_STR_FACT = @@ -332,6 +380,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listNodes. */ public PagedCallSettings listNodesSettings() { @@ -360,7 +425,7 @@ public UnaryCallSettings deleteNodeSettings() { } /** Returns the object with the settings used for calls to deleteNode. */ - public OperationCallSettings + public OperationCallSettings deleteNodeOperationSettings() { return deleteNodeOperationSettings; } @@ -437,12 +502,28 @@ public UnaryCallSettings getRuntimeVer return getGuestAttributesSettings; } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + public TpuStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcTpuStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonTpuStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -475,29 +556,54 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(TpuStubSettings.class)) .setTransportToken( GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(TpuStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TpuStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -529,6 +635,8 @@ protected TpuStubSettings(Builder settingsBuilder) throws IOException { listRuntimeVersionsSettings = settingsBuilder.listRuntimeVersionsSettings().build(); getRuntimeVersionSettings = settingsBuilder.getRuntimeVersionSettings().build(); getGuestAttributesSettings = settingsBuilder.getGuestAttributesSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); } /** Builder for TpuStubSettings. */ @@ -542,7 +650,7 @@ public static class Builder extends StubSettings.Builder createNodeOperationSettings; private final UnaryCallSettings.Builder deleteNodeSettings; - private final OperationCallSettings.Builder + private final OperationCallSettings.Builder deleteNodeOperationSettings; private final UnaryCallSettings.Builder stopNodeSettings; private final OperationCallSettings.Builder @@ -572,6 +680,10 @@ public static class Builder extends StubSettings.Builder getGuestAttributesSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -626,6 +738,8 @@ protected Builder(ClientContext clientContext) { PagedCallSettings.newBuilder(LIST_RUNTIME_VERSIONS_PAGE_STR_FACT); getRuntimeVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getGuestAttributesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -641,7 +755,9 @@ protected Builder(ClientContext clientContext) { getAcceleratorTypeSettings, listRuntimeVersionsSettings, getRuntimeVersionSettings, - getGuestAttributesSettings); + getGuestAttributesSettings, + listLocationsSettings, + getLocationSettings); initDefaults(this); } @@ -666,6 +782,8 @@ protected Builder(TpuStubSettings settings) { listRuntimeVersionsSettings = settings.listRuntimeVersionsSettings.toBuilder(); getRuntimeVersionSettings = settings.getRuntimeVersionSettings.toBuilder(); getGuestAttributesSettings = settings.getGuestAttributesSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -681,7 +799,9 @@ protected Builder(TpuStubSettings settings) { getAcceleratorTypeSettings, listRuntimeVersionsSettings, getRuntimeVersionSettings, - getGuestAttributesSettings); + getGuestAttributesSettings, + listLocationsSettings, + getLocationSettings); } private static Builder createDefault() { @@ -697,6 +817,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .listNodesSettings() @@ -763,6 +896,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .createNodeOperationSettings() .setInitialCallSettings( @@ -792,7 +935,8 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) .build()) - .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Node.class)) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) .setMetadataTransformer( ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) .setPollingAlgorithm( @@ -923,7 +1067,7 @@ public UnaryCallSettings.Builder deleteNodeSetting /** Returns the builder for the settings used for calls to deleteNode. */ @BetaApi( "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder + public OperationCallSettings.Builder deleteNodeOperationSettings() { return deleteNodeOperationSettings; } @@ -1010,6 +1154,18 @@ public UnaryCallSettings.Builder updateNodeSetting return getGuestAttributesSettings; } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + @Override public TpuStubSettings build() throws IOException { return new TpuStubSettings(this); diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocations.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocations.java new file mode 100644 index 000000000000..6138e7cf8adf --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocationsImpl.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocationsImpl.java new file mode 100644 index 000000000000..65e856801dc1 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockTpu.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockTpu.java new file mode 100644 index 000000000000..21fe2a3617ad --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockTpu.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTpu implements MockGrpcService { + private final MockTpuImpl serviceImpl; + + public MockTpu() { + serviceImpl = new MockTpuImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpuImpl.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockTpuImpl.java similarity index 99% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpuImpl.java rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockTpuImpl.java index 54096f705d73..69d56985205b 100644 --- a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpuImpl.java +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/MockTpuImpl.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.cloud.tpu.v2alpha1; +package com.google.cloud.tpu.v2; import com.google.api.core.BetaApi; -import com.google.cloud.tpu.v2alpha1.TpuGrpc.TpuImplBase; +import com.google.cloud.tpu.v2.TpuGrpc.TpuImplBase; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import io.grpc.stub.StreamObserver; diff --git a/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/TpuClientHttpJsonTest.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/TpuClientHttpJsonTest.java new file mode 100644 index 000000000000..00600782e421 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/TpuClientHttpJsonTest.java @@ -0,0 +1,1406 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import static com.google.cloud.tpu.v2.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListRuntimeVersionsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.stub.HttpJsonTpuStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TpuClientHttpJsonTest { + private static MockHttpService mockService; + private static TpuClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonTpuStub.getMethodDescriptors(), TpuSettings.getDefaultEndpoint()); + TpuSettings settings = + TpuSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + TpuSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TpuClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listNodesTest() throws Exception { + Node responsesElement = Node.newBuilder().build(); + ListNodesResponse expectedResponse = + ListNodesResponse.newBuilder() + .setNextPageToken("") + .addAllNodes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNodesPagedResponse pagedListResponse = client.listNodes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNodesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNodesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNodes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNodesTest2() throws Exception { + Node responsesElement = Node.newBuilder().build(); + ListNodesResponse expectedResponse = + ListNodesResponse.newBuilder() + .setNextPageToken("") + .addAllNodes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListNodesPagedResponse pagedListResponse = client.listNodes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNodesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNodesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listNodes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + + Node actualResponse = client.getNode(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNodeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + client.getNode(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodeTest2() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-8007/locations/location-8007/nodes/node-8007"; + + Node actualResponse = client.getNode(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNodeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8007/locations/location-8007/nodes/node-8007"; + client.getNode(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + + Node actualResponse = client.createNodeAsync(parent, node, nodeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNodeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + client.createNodeAsync(parent, node, nodeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createNodeTest2() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + + Node actualResponse = client.createNodeAsync(parent, node, nodeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNodeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + client.createNodeAsync(parent, node, nodeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteNodeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + + client.deleteNodeAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteNodeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + client.deleteNodeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteNodeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8007/locations/location-8007/nodes/node-8007"; + + client.deleteNodeAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteNodeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8007/locations/location-8007/nodes/node-8007"; + client.deleteNodeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void stopNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + + Node actualResponse = client.stopNodeAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void stopNodeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + client.stopNodeAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void startNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + + Node actualResponse = client.startNodeAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void startNodeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + client.startNodeAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Node node = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Node actualResponse = client.updateNodeAsync(node, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateNodeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Node node = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNodeAsync(node, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void generateServiceIdentityTest() throws Exception { + GenerateServiceIdentityResponse expectedResponse = + GenerateServiceIdentityResponse.newBuilder() + .setIdentity(ServiceIdentity.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GenerateServiceIdentityRequest request = + GenerateServiceIdentityRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + + GenerateServiceIdentityResponse actualResponse = client.generateServiceIdentity(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void generateServiceIdentityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GenerateServiceIdentityRequest request = + GenerateServiceIdentityRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + client.generateServiceIdentity(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAcceleratorTypesTest() throws Exception { + AcceleratorType responsesElement = AcceleratorType.newBuilder().build(); + ListAcceleratorTypesResponse expectedResponse = + ListAcceleratorTypesResponse.newBuilder() + .setNextPageToken("") + .addAllAcceleratorTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAcceleratorTypesPagedResponse pagedListResponse = client.listAcceleratorTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAcceleratorTypesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAcceleratorTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAcceleratorTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAcceleratorTypesTest2() throws Exception { + AcceleratorType responsesElement = AcceleratorType.newBuilder().build(); + ListAcceleratorTypesResponse expectedResponse = + ListAcceleratorTypesResponse.newBuilder() + .setNextPageToken("") + .addAllAcceleratorTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAcceleratorTypesPagedResponse pagedListResponse = client.listAcceleratorTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAcceleratorTypesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAcceleratorTypesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listAcceleratorTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAcceleratorTypeTest() throws Exception { + AcceleratorType expectedResponse = + AcceleratorType.newBuilder() + .setName( + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString()) + .setType("type3575610") + .build(); + mockService.addResponse(expectedResponse); + + AcceleratorTypeName name = + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + + AcceleratorType actualResponse = client.getAcceleratorType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAcceleratorTypeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AcceleratorTypeName name = + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + client.getAcceleratorType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAcceleratorTypeTest2() throws Exception { + AcceleratorType expectedResponse = + AcceleratorType.newBuilder() + .setName( + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString()) + .setType("type3575610") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7118/locations/location-7118/acceleratorTypes/acceleratorType-7118"; + + AcceleratorType actualResponse = client.getAcceleratorType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAcceleratorTypeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7118/locations/location-7118/acceleratorTypes/acceleratorType-7118"; + client.getAcceleratorType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRuntimeVersionsTest() throws Exception { + RuntimeVersion responsesElement = RuntimeVersion.newBuilder().build(); + ListRuntimeVersionsResponse expectedResponse = + ListRuntimeVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllRuntimeVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRuntimeVersionsPagedResponse pagedListResponse = client.listRuntimeVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuntimeVersionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listRuntimeVersionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRuntimeVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRuntimeVersionsTest2() throws Exception { + RuntimeVersion responsesElement = RuntimeVersion.newBuilder().build(); + ListRuntimeVersionsResponse expectedResponse = + ListRuntimeVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllRuntimeVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListRuntimeVersionsPagedResponse pagedListResponse = client.listRuntimeVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuntimeVersionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listRuntimeVersionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listRuntimeVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRuntimeVersionTest() throws Exception { + RuntimeVersion expectedResponse = + RuntimeVersion.newBuilder() + .setName( + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .setVersion("version351608024") + .build(); + mockService.addResponse(expectedResponse); + + RuntimeVersionName name = RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + + RuntimeVersion actualResponse = client.getRuntimeVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getRuntimeVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RuntimeVersionName name = + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + client.getRuntimeVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRuntimeVersionTest2() throws Exception { + RuntimeVersion expectedResponse = + RuntimeVersion.newBuilder() + .setName( + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .setVersion("version351608024") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5927/locations/location-5927/runtimeVersions/runtimeVersion-5927"; + + RuntimeVersion actualResponse = client.getRuntimeVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getRuntimeVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5927/locations/location-5927/runtimeVersions/runtimeVersion-5927"; + client.getRuntimeVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGuestAttributesTest() throws Exception { + GetGuestAttributesResponse expectedResponse = + GetGuestAttributesResponse.newBuilder() + .addAllGuestAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + GetGuestAttributesRequest request = + GetGuestAttributesRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setQueryPath("queryPath-1807004403") + .addAllWorkerIds(new ArrayList()) + .build(); + + GetGuestAttributesResponse actualResponse = client.getGuestAttributes(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getGuestAttributesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetGuestAttributesRequest request = + GetGuestAttributesRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setQueryPath("queryPath-1807004403") + .addAllWorkerIds(new ArrayList()) + .build(); + client.getGuestAttributes(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/TpuClientTest.java b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/TpuClientTest.java similarity index 88% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/TpuClientTest.java rename to owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/TpuClientTest.java index 79115b13271b..c1f2e4502e8d 100644 --- a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/TpuClientTest.java +++ b/owl-bot-staging/java-tpu/v2/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2/TpuClientTest.java @@ -14,11 +14,12 @@ * limitations under the License. */ -package com.google.cloud.tpu.v2alpha1; +package com.google.cloud.tpu.v2; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; -import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2.TpuClient.ListRuntimeVersionsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -28,10 +29,15 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; +import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; @@ -52,6 +58,7 @@ @Generated("by gapic-generator-java") public class TpuClientTest { + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private static MockTpu mockTpu; private LocalChannelProvider channelProvider; @@ -60,9 +67,10 @@ public class TpuClientTest { @BeforeClass public static void startStaticServer() { mockTpu = new MockTpu(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockTpu)); + UUID.randomUUID().toString(), Arrays.asList(mockTpu, mockLocations)); mockServiceHelper.start(); } @@ -98,7 +106,7 @@ public void listNodesTest() throws Exception { .build(); mockTpu.addResponse(expectedResponse); - NodeName parent = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ListNodesPagedResponse pagedListResponse = client.listNodes(parent); @@ -124,7 +132,7 @@ public void listNodesExceptionTest() throws Exception { mockTpu.addException(exception); try { - NodeName parent = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); client.listNodes(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -426,27 +434,7 @@ public void createNodeExceptionTest2() throws Exception { @Test public void deleteNodeTest() throws Exception { - Node expectedResponse = - Node.newBuilder() - .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) - .setDescription("description-1724546052") - .setAcceleratorType("acceleratorType-82462651") - .setHealthDescription("healthDescription1231837184") - .setRuntimeVersion("runtimeVersion602071520") - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setCidrBlock("cidrBlock1646183801") - .setServiceAccount(ServiceAccount.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setSchedulingConfig(SchedulingConfig.newBuilder().build()) - .addAllNetworkEndpoints(new ArrayList()) - .putAllLabels(new HashMap()) - .putAllMetadata(new HashMap()) - .addAllTags(new ArrayList()) - .setId(3355) - .addAllDataDisks(new ArrayList()) - .addAllSymptoms(new ArrayList()) - .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) - .build(); + Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() .setName("deleteNodeTest") @@ -457,8 +445,7 @@ public void deleteNodeTest() throws Exception { NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); - Node actualResponse = client.deleteNodeAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteNodeAsync(name).get(); List actualRequests = mockTpu.getRequests(); Assert.assertEquals(1, actualRequests.size()); @@ -489,27 +476,7 @@ public void deleteNodeExceptionTest() throws Exception { @Test public void deleteNodeTest2() throws Exception { - Node expectedResponse = - Node.newBuilder() - .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) - .setDescription("description-1724546052") - .setAcceleratorType("acceleratorType-82462651") - .setHealthDescription("healthDescription1231837184") - .setRuntimeVersion("runtimeVersion602071520") - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setCidrBlock("cidrBlock1646183801") - .setServiceAccount(ServiceAccount.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setSchedulingConfig(SchedulingConfig.newBuilder().build()) - .addAllNetworkEndpoints(new ArrayList()) - .putAllLabels(new HashMap()) - .putAllMetadata(new HashMap()) - .addAllTags(new ArrayList()) - .setId(3355) - .addAllDataDisks(new ArrayList()) - .addAllSymptoms(new ArrayList()) - .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) - .build(); + Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() .setName("deleteNodeTest") @@ -520,8 +487,7 @@ public void deleteNodeTest2() throws Exception { String name = "name3373707"; - Node actualResponse = client.deleteNodeAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteNodeAsync(name).get(); List actualRequests = mockTpu.getRequests(); Assert.assertEquals(1, actualRequests.size()); @@ -581,7 +547,10 @@ public void stopNodeTest() throws Exception { .build(); mockTpu.addResponse(resultOperation); - StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); Node actualResponse = client.stopNodeAsync(request).get(); Assert.assertEquals(expectedResponse, actualResponse); @@ -603,7 +572,10 @@ public void stopNodeExceptionTest() throws Exception { mockTpu.addException(exception); try { - StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); client.stopNodeAsync(request).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { @@ -644,7 +616,10 @@ public void startNodeTest() throws Exception { .build(); mockTpu.addResponse(resultOperation); - StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); Node actualResponse = client.startNodeAsync(request).get(); Assert.assertEquals(expectedResponse, actualResponse); @@ -666,7 +641,10 @@ public void startNodeExceptionTest() throws Exception { mockTpu.addException(exception); try { - StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); client.startNodeAsync(request).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { @@ -797,8 +775,7 @@ public void listAcceleratorTypesTest() throws Exception { .build(); mockTpu.addResponse(expectedResponse); - AcceleratorTypeName parent = - AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ListAcceleratorTypesPagedResponse pagedListResponse = client.listAcceleratorTypes(parent); @@ -825,8 +802,7 @@ public void listAcceleratorTypesExceptionTest() throws Exception { mockTpu.addException(exception); try { - AcceleratorTypeName parent = - AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); client.listAcceleratorTypes(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -971,8 +947,7 @@ public void listRuntimeVersionsTest() throws Exception { .build(); mockTpu.addResponse(expectedResponse); - RuntimeVersionName parent = - RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ListRuntimeVersionsPagedResponse pagedListResponse = client.listRuntimeVersions(parent); @@ -998,8 +973,7 @@ public void listRuntimeVersionsExceptionTest() throws Exception { mockTpu.addException(exception); try { - RuntimeVersionName parent = - RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); client.listRuntimeVersions(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -1181,4 +1155,105 @@ public void getGuestAttributesExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/owl-bot-staging/java-tpu/v2/grpc-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/TpuGrpc.java b/owl-bot-staging/java-tpu/v2/grpc-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/TpuGrpc.java new file mode 100644 index 000000000000..2aa134ae6486 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/grpc-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/TpuGrpc.java @@ -0,0 +1,1340 @@ +package com.google.cloud.tpu.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Manages TPU nodes and other resources
+ * TPU API v2
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/tpu/v2/cloud_tpu.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class TpuGrpc { + + private TpuGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.tpu.v2.Tpu"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListNodesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNodes", + requestType = com.google.cloud.tpu.v2.ListNodesRequest.class, + responseType = com.google.cloud.tpu.v2.ListNodesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNodesMethod() { + io.grpc.MethodDescriptor getListNodesMethod; + if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { + TpuGrpc.getListNodesMethod = getListNodesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNodes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.ListNodesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.ListNodesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListNodes")) + .build(); + } + } + } + return getListNodesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNode", + requestType = com.google.cloud.tpu.v2.GetNodeRequest.class, + responseType = com.google.cloud.tpu.v2.Node.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNodeMethod() { + io.grpc.MethodDescriptor getGetNodeMethod; + if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { + TpuGrpc.getGetNodeMethod = getGetNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.GetNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.Node.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetNode")) + .build(); + } + } + } + return getGetNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNode", + requestType = com.google.cloud.tpu.v2.CreateNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateNodeMethod() { + io.grpc.MethodDescriptor getCreateNodeMethod; + if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { + TpuGrpc.getCreateNodeMethod = getCreateNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.CreateNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("CreateNode")) + .build(); + } + } + } + return getCreateNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNode", + requestType = com.google.cloud.tpu.v2.DeleteNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteNodeMethod() { + io.grpc.MethodDescriptor getDeleteNodeMethod; + if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { + TpuGrpc.getDeleteNodeMethod = getDeleteNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.DeleteNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("DeleteNode")) + .build(); + } + } + } + return getDeleteNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getStopNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopNode", + requestType = com.google.cloud.tpu.v2.StopNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getStopNodeMethod() { + io.grpc.MethodDescriptor getStopNodeMethod; + if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { + TpuGrpc.getStopNodeMethod = getStopNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.StopNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StopNode")) + .build(); + } + } + } + return getStopNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getStartNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartNode", + requestType = com.google.cloud.tpu.v2.StartNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getStartNodeMethod() { + io.grpc.MethodDescriptor getStartNodeMethod; + if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { + TpuGrpc.getStartNodeMethod = getStartNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.StartNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StartNode")) + .build(); + } + } + } + return getStartNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateNode", + requestType = com.google.cloud.tpu.v2.UpdateNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateNodeMethod() { + io.grpc.MethodDescriptor getUpdateNodeMethod; + if ((getUpdateNodeMethod = TpuGrpc.getUpdateNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getUpdateNodeMethod = TpuGrpc.getUpdateNodeMethod) == null) { + TpuGrpc.getUpdateNodeMethod = getUpdateNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.UpdateNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("UpdateNode")) + .build(); + } + } + } + return getUpdateNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getGenerateServiceIdentityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateServiceIdentity", + requestType = com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.class, + responseType = com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGenerateServiceIdentityMethod() { + io.grpc.MethodDescriptor getGenerateServiceIdentityMethod; + if ((getGenerateServiceIdentityMethod = TpuGrpc.getGenerateServiceIdentityMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGenerateServiceIdentityMethod = TpuGrpc.getGenerateServiceIdentityMethod) == null) { + TpuGrpc.getGenerateServiceIdentityMethod = getGenerateServiceIdentityMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateServiceIdentity")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GenerateServiceIdentity")) + .build(); + } + } + } + return getGenerateServiceIdentityMethod; + } + + private static volatile io.grpc.MethodDescriptor getListAcceleratorTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAcceleratorTypes", + requestType = com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.class, + responseType = com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListAcceleratorTypesMethod() { + io.grpc.MethodDescriptor getListAcceleratorTypesMethod; + if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { + TpuGrpc.getListAcceleratorTypesMethod = getListAcceleratorTypesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAcceleratorTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListAcceleratorTypes")) + .build(); + } + } + } + return getListAcceleratorTypesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAcceleratorTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAcceleratorType", + requestType = com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.class, + responseType = com.google.cloud.tpu.v2.AcceleratorType.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAcceleratorTypeMethod() { + io.grpc.MethodDescriptor getGetAcceleratorTypeMethod; + if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { + TpuGrpc.getGetAcceleratorTypeMethod = getGetAcceleratorTypeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAcceleratorType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.AcceleratorType.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetAcceleratorType")) + .build(); + } + } + } + return getGetAcceleratorTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor getListRuntimeVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRuntimeVersions", + requestType = com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.class, + responseType = com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListRuntimeVersionsMethod() { + io.grpc.MethodDescriptor getListRuntimeVersionsMethod; + if ((getListRuntimeVersionsMethod = TpuGrpc.getListRuntimeVersionsMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListRuntimeVersionsMethod = TpuGrpc.getListRuntimeVersionsMethod) == null) { + TpuGrpc.getListRuntimeVersionsMethod = getListRuntimeVersionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRuntimeVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListRuntimeVersions")) + .build(); + } + } + } + return getListRuntimeVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetRuntimeVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRuntimeVersion", + requestType = com.google.cloud.tpu.v2.GetRuntimeVersionRequest.class, + responseType = com.google.cloud.tpu.v2.RuntimeVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRuntimeVersionMethod() { + io.grpc.MethodDescriptor getGetRuntimeVersionMethod; + if ((getGetRuntimeVersionMethod = TpuGrpc.getGetRuntimeVersionMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetRuntimeVersionMethod = TpuGrpc.getGetRuntimeVersionMethod) == null) { + TpuGrpc.getGetRuntimeVersionMethod = getGetRuntimeVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRuntimeVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.GetRuntimeVersionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.RuntimeVersion.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetRuntimeVersion")) + .build(); + } + } + } + return getGetRuntimeVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetGuestAttributesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGuestAttributes", + requestType = com.google.cloud.tpu.v2.GetGuestAttributesRequest.class, + responseType = com.google.cloud.tpu.v2.GetGuestAttributesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetGuestAttributesMethod() { + io.grpc.MethodDescriptor getGetGuestAttributesMethod; + if ((getGetGuestAttributesMethod = TpuGrpc.getGetGuestAttributesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetGuestAttributesMethod = TpuGrpc.getGetGuestAttributesMethod) == null) { + TpuGrpc.getGetGuestAttributesMethod = getGetGuestAttributesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGuestAttributes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.GetGuestAttributesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2.GetGuestAttributesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetGuestAttributes")) + .build(); + } + } + } + return getGetGuestAttributesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static TpuStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuStub(channel, callOptions); + } + }; + return TpuStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TpuBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuBlockingStub(channel, callOptions); + } + }; + return TpuBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static TpuFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuFutureStub(channel, callOptions); + } + }; + return TpuFutureStub.newStub(factory, channel); + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2
+   * 
+ */ + public static abstract class TpuImplBase implements io.grpc.BindableService { + + /** + *
+     * Lists nodes.
+     * 
+ */ + public void listNodes(com.google.cloud.tpu.v2.ListNodesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public void getNode(com.google.cloud.tpu.v2.GetNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public void createNode(com.google.cloud.tpu.v2.CreateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public void deleteNode(com.google.cloud.tpu.v2.DeleteNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public void stopNode(com.google.cloud.tpu.v2.StopNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public void startNode(com.google.cloud.tpu.v2.StartNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public void updateNode(com.google.cloud.tpu.v2.UpdateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public void generateServiceIdentity(com.google.cloud.tpu.v2.GenerateServiceIdentityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGenerateServiceIdentityMethod(), responseObserver); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public void listAcceleratorTypes(com.google.cloud.tpu.v2.ListAcceleratorTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAcceleratorTypesMethod(), responseObserver); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public void getAcceleratorType(com.google.cloud.tpu.v2.GetAcceleratorTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAcceleratorTypeMethod(), responseObserver); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public void listRuntimeVersions(com.google.cloud.tpu.v2.ListRuntimeVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListRuntimeVersionsMethod(), responseObserver); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public void getRuntimeVersion(com.google.cloud.tpu.v2.GetRuntimeVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRuntimeVersionMethod(), responseObserver); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public void getGuestAttributes(com.google.cloud.tpu.v2.GetGuestAttributesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGuestAttributesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListNodesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.ListNodesRequest, + com.google.cloud.tpu.v2.ListNodesResponse>( + this, METHODID_LIST_NODES))) + .addMethod( + getGetNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.GetNodeRequest, + com.google.cloud.tpu.v2.Node>( + this, METHODID_GET_NODE))) + .addMethod( + getCreateNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.CreateNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_NODE))) + .addMethod( + getDeleteNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.DeleteNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_NODE))) + .addMethod( + getStopNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.StopNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_STOP_NODE))) + .addMethod( + getStartNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.StartNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_START_NODE))) + .addMethod( + getUpdateNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.UpdateNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_UPDATE_NODE))) + .addMethod( + getGenerateServiceIdentityMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest, + com.google.cloud.tpu.v2.GenerateServiceIdentityResponse>( + this, METHODID_GENERATE_SERVICE_IDENTITY))) + .addMethod( + getListAcceleratorTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest, + com.google.cloud.tpu.v2.ListAcceleratorTypesResponse>( + this, METHODID_LIST_ACCELERATOR_TYPES))) + .addMethod( + getGetAcceleratorTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest, + com.google.cloud.tpu.v2.AcceleratorType>( + this, METHODID_GET_ACCELERATOR_TYPE))) + .addMethod( + getListRuntimeVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest, + com.google.cloud.tpu.v2.ListRuntimeVersionsResponse>( + this, METHODID_LIST_RUNTIME_VERSIONS))) + .addMethod( + getGetRuntimeVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.GetRuntimeVersionRequest, + com.google.cloud.tpu.v2.RuntimeVersion>( + this, METHODID_GET_RUNTIME_VERSION))) + .addMethod( + getGetGuestAttributesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2.GetGuestAttributesRequest, + com.google.cloud.tpu.v2.GetGuestAttributesResponse>( + this, METHODID_GET_GUEST_ATTRIBUTES))) + .build(); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2
+   * 
+ */ + public static final class TpuStub extends io.grpc.stub.AbstractAsyncStub { + private TpuStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public void listNodes(com.google.cloud.tpu.v2.ListNodesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNodesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public void getNode(com.google.cloud.tpu.v2.GetNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public void createNode(com.google.cloud.tpu.v2.CreateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public void deleteNode(com.google.cloud.tpu.v2.DeleteNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public void stopNode(com.google.cloud.tpu.v2.StopNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public void startNode(com.google.cloud.tpu.v2.StartNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public void updateNode(com.google.cloud.tpu.v2.UpdateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public void generateServiceIdentity(com.google.cloud.tpu.v2.GenerateServiceIdentityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateServiceIdentityMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public void listAcceleratorTypes(com.google.cloud.tpu.v2.ListAcceleratorTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public void getAcceleratorType(com.google.cloud.tpu.v2.GetAcceleratorTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public void listRuntimeVersions(com.google.cloud.tpu.v2.ListRuntimeVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRuntimeVersionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public void getRuntimeVersion(com.google.cloud.tpu.v2.GetRuntimeVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public void getGuestAttributes(com.google.cloud.tpu.v2.GetGuestAttributesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGuestAttributesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2
+   * 
+ */ + public static final class TpuBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private TpuBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public com.google.cloud.tpu.v2.ListNodesResponse listNodes(com.google.cloud.tpu.v2.ListNodesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNodesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public com.google.cloud.tpu.v2.Node getNode(com.google.cloud.tpu.v2.GetNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public com.google.longrunning.Operation createNode(com.google.cloud.tpu.v2.CreateNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public com.google.longrunning.Operation deleteNode(com.google.cloud.tpu.v2.DeleteNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public com.google.longrunning.Operation stopNode(com.google.cloud.tpu.v2.StopNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public com.google.longrunning.Operation startNode(com.google.cloud.tpu.v2.StartNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public com.google.longrunning.Operation updateNode(com.google.cloud.tpu.v2.UpdateNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public com.google.cloud.tpu.v2.GenerateServiceIdentityResponse generateServiceIdentity(com.google.cloud.tpu.v2.GenerateServiceIdentityRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateServiceIdentityMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public com.google.cloud.tpu.v2.ListAcceleratorTypesResponse listAcceleratorTypes(com.google.cloud.tpu.v2.ListAcceleratorTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAcceleratorTypesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public com.google.cloud.tpu.v2.AcceleratorType getAcceleratorType(com.google.cloud.tpu.v2.GetAcceleratorTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAcceleratorTypeMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public com.google.cloud.tpu.v2.ListRuntimeVersionsResponse listRuntimeVersions(com.google.cloud.tpu.v2.ListRuntimeVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRuntimeVersionsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public com.google.cloud.tpu.v2.RuntimeVersion getRuntimeVersion(com.google.cloud.tpu.v2.GetRuntimeVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRuntimeVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public com.google.cloud.tpu.v2.GetGuestAttributesResponse getGuestAttributes(com.google.cloud.tpu.v2.GetGuestAttributesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGuestAttributesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2
+   * 
+ */ + public static final class TpuFutureStub extends io.grpc.stub.AbstractFutureStub { + private TpuFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuFutureStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNodes( + com.google.cloud.tpu.v2.ListNodesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNodesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNode( + com.google.cloud.tpu.v2.GetNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createNode( + com.google.cloud.tpu.v2.CreateNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteNode( + com.google.cloud.tpu.v2.DeleteNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture stopNode( + com.google.cloud.tpu.v2.StopNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture startNode( + com.google.cloud.tpu.v2.StartNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateNode( + com.google.cloud.tpu.v2.UpdateNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture generateServiceIdentity( + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateServiceIdentityMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listAcceleratorTypes( + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAcceleratorType( + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listRuntimeVersions( + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRuntimeVersionsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getRuntimeVersion( + com.google.cloud.tpu.v2.GetRuntimeVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getGuestAttributes( + com.google.cloud.tpu.v2.GetGuestAttributesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGuestAttributesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_NODES = 0; + private static final int METHODID_GET_NODE = 1; + private static final int METHODID_CREATE_NODE = 2; + private static final int METHODID_DELETE_NODE = 3; + private static final int METHODID_STOP_NODE = 4; + private static final int METHODID_START_NODE = 5; + private static final int METHODID_UPDATE_NODE = 6; + private static final int METHODID_GENERATE_SERVICE_IDENTITY = 7; + private static final int METHODID_LIST_ACCELERATOR_TYPES = 8; + private static final int METHODID_GET_ACCELERATOR_TYPE = 9; + private static final int METHODID_LIST_RUNTIME_VERSIONS = 10; + private static final int METHODID_GET_RUNTIME_VERSION = 11; + private static final int METHODID_GET_GUEST_ATTRIBUTES = 12; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final TpuImplBase serviceImpl; + private final int methodId; + + MethodHandlers(TpuImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_NODES: + serviceImpl.listNodes((com.google.cloud.tpu.v2.ListNodesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NODE: + serviceImpl.getNode((com.google.cloud.tpu.v2.GetNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_NODE: + serviceImpl.createNode((com.google.cloud.tpu.v2.CreateNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NODE: + serviceImpl.deleteNode((com.google.cloud.tpu.v2.DeleteNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_STOP_NODE: + serviceImpl.stopNode((com.google.cloud.tpu.v2.StopNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_NODE: + serviceImpl.startNode((com.google.cloud.tpu.v2.StartNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_NODE: + serviceImpl.updateNode((com.google.cloud.tpu.v2.UpdateNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_SERVICE_IDENTITY: + serviceImpl.generateServiceIdentity((com.google.cloud.tpu.v2.GenerateServiceIdentityRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ACCELERATOR_TYPES: + serviceImpl.listAcceleratorTypes((com.google.cloud.tpu.v2.ListAcceleratorTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ACCELERATOR_TYPE: + serviceImpl.getAcceleratorType((com.google.cloud.tpu.v2.GetAcceleratorTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_RUNTIME_VERSIONS: + serviceImpl.listRuntimeVersions((com.google.cloud.tpu.v2.ListRuntimeVersionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RUNTIME_VERSION: + serviceImpl.getRuntimeVersion((com.google.cloud.tpu.v2.GetRuntimeVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_GUEST_ATTRIBUTES: + serviceImpl.getGuestAttributes((com.google.cloud.tpu.v2.GetGuestAttributesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class TpuBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TpuBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Tpu"); + } + } + + private static final class TpuFileDescriptorSupplier + extends TpuBaseDescriptorSupplier { + TpuFileDescriptorSupplier() {} + } + + private static final class TpuMethodDescriptorSupplier + extends TpuBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TpuMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TpuGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TpuFileDescriptorSupplier()) + .addMethod(getListNodesMethod()) + .addMethod(getGetNodeMethod()) + .addMethod(getCreateNodeMethod()) + .addMethod(getDeleteNodeMethod()) + .addMethod(getStopNodeMethod()) + .addMethod(getStartNodeMethod()) + .addMethod(getUpdateNodeMethod()) + .addMethod(getGenerateServiceIdentityMethod()) + .addMethod(getListAcceleratorTypesMethod()) + .addMethod(getGetAcceleratorTypeMethod()) + .addMethod(getListRuntimeVersionsMethod()) + .addMethod(getGetRuntimeVersionMethod()) + .addMethod(getGetGuestAttributesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorType.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorType.java new file mode 100644 index 000000000000..0194324212c4 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorType.java @@ -0,0 +1,739 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A accelerator type that a Node can be configured with.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.AcceleratorType} + */ +public final class AcceleratorType extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.AcceleratorType) + AcceleratorTypeOrBuilder { +private static final long serialVersionUID = 0L; + // Use AcceleratorType.newBuilder() to construct. + private AcceleratorType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AcceleratorType() { + name_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AcceleratorType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AcceleratorType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AcceleratorType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.AcceleratorType.class, com.google.cloud.tpu.v2.AcceleratorType.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + *
+   * the accelerator type.
+   * 
+ * + * string type = 2; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * the accelerator type.
+   * 
+ * + * string type = 2; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.AcceleratorType)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.AcceleratorType other = (com.google.cloud.tpu.v2.AcceleratorType) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getType() + .equals(other.getType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AcceleratorType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.AcceleratorType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A accelerator type that a Node can be configured with.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.AcceleratorType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.AcceleratorType) + com.google.cloud.tpu.v2.AcceleratorTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AcceleratorType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AcceleratorType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.AcceleratorType.class, com.google.cloud.tpu.v2.AcceleratorType.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.AcceleratorType.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AcceleratorType_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AcceleratorType getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.AcceleratorType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AcceleratorType build() { + com.google.cloud.tpu.v2.AcceleratorType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AcceleratorType buildPartial() { + com.google.cloud.tpu.v2.AcceleratorType result = new com.google.cloud.tpu.v2.AcceleratorType(this); + result.name_ = name_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.AcceleratorType) { + return mergeFrom((com.google.cloud.tpu.v2.AcceleratorType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.AcceleratorType other) { + if (other == com.google.cloud.tpu.v2.AcceleratorType.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * the accelerator type.
+     * 
+ * + * string type = 2; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * the accelerator type.
+     * 
+ * + * string type = 2; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * the accelerator type.
+     * 
+ * + * string type = 2; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * the accelerator type.
+     * 
+ * + * string type = 2; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + *
+     * the accelerator type.
+     * 
+ * + * string type = 2; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.AcceleratorType) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.AcceleratorType) + private static final com.google.cloud.tpu.v2.AcceleratorType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.AcceleratorType(); + } + + public static com.google.cloud.tpu.v2.AcceleratorType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceleratorType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AcceleratorType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeName.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeName.java new file mode 100644 index 000000000000..0bfd92c8219c --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AcceleratorTypeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ACCELERATOR_TYPE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String acceleratorType; + + @Deprecated + protected AcceleratorTypeName() { + project = null; + location = null; + acceleratorType = null; + } + + private AcceleratorTypeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + acceleratorType = Preconditions.checkNotNull(builder.getAcceleratorType()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAcceleratorType() { + return acceleratorType; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AcceleratorTypeName of(String project, String location, String acceleratorType) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAcceleratorType(acceleratorType) + .build(); + } + + public static String format(String project, String location, String acceleratorType) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAcceleratorType(acceleratorType) + .build() + .toString(); + } + + public static AcceleratorTypeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ACCELERATOR_TYPE.validatedMatch( + formattedString, "AcceleratorTypeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("accelerator_type")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AcceleratorTypeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ACCELERATOR_TYPE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (acceleratorType != null) { + fieldMapBuilder.put("accelerator_type", acceleratorType); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ACCELERATOR_TYPE.instantiate( + "project", project, "location", location, "accelerator_type", acceleratorType); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AcceleratorTypeName that = ((AcceleratorTypeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.acceleratorType, that.acceleratorType); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(acceleratorType); + return h; + } + + /** Builder for projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}. */ + public static class Builder { + private String project; + private String location; + private String acceleratorType; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAcceleratorType() { + return acceleratorType; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAcceleratorType(String acceleratorType) { + this.acceleratorType = acceleratorType; + return this; + } + + private Builder(AcceleratorTypeName acceleratorTypeName) { + this.project = acceleratorTypeName.project; + this.location = acceleratorTypeName.location; + this.acceleratorType = acceleratorTypeName.acceleratorType; + } + + public AcceleratorTypeName build() { + return new AcceleratorTypeName(this); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeOrBuilder.java new file mode 100644 index 000000000000..dc24d97a09b0 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AcceleratorTypeOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface AcceleratorTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.AcceleratorType) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * the accelerator type.
+   * 
+ * + * string type = 2; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * the accelerator type.
+   * 
+ * + * string type = 2; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfig.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfig.java new file mode 100644 index 000000000000..ea6d58609851 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfig.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * An access config attached to the TPU worker.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.AccessConfig} + */ +public final class AccessConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.AccessConfig) + AccessConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use AccessConfig.newBuilder() to construct. + private AccessConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AccessConfig() { + externalIp_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AccessConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.AccessConfig.class, com.google.cloud.tpu.v2.AccessConfig.Builder.class); + } + + public static final int EXTERNAL_IP_FIELD_NUMBER = 1; + private volatile java.lang.Object externalIp_; + /** + *
+   * Output only. An external IP address associated with the TPU worker.
+   * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } + } + /** + *
+   * Output only. An external IP address associated with the TPU worker.
+   * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, externalIp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, externalIp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.AccessConfig)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.AccessConfig other = (com.google.cloud.tpu.v2.AccessConfig) obj; + + if (!getExternalIp() + .equals(other.getExternalIp())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AccessConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AccessConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AccessConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.AccessConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An access config attached to the TPU worker.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.AccessConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.AccessConfig) + com.google.cloud.tpu.v2.AccessConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.AccessConfig.class, com.google.cloud.tpu.v2.AccessConfig.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.AccessConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + externalIp_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AccessConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AccessConfig getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.AccessConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AccessConfig build() { + com.google.cloud.tpu.v2.AccessConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AccessConfig buildPartial() { + com.google.cloud.tpu.v2.AccessConfig result = new com.google.cloud.tpu.v2.AccessConfig(this); + result.externalIp_ = externalIp_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.AccessConfig) { + return mergeFrom((com.google.cloud.tpu.v2.AccessConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.AccessConfig other) { + if (other == com.google.cloud.tpu.v2.AccessConfig.getDefaultInstance()) return this; + if (!other.getExternalIp().isEmpty()) { + externalIp_ = other.externalIp_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + externalIp_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object externalIp_ = ""; + /** + *
+     * Output only. An external IP address associated with the TPU worker.
+     * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. An external IP address associated with the TPU worker.
+     * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString + getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. An external IP address associated with the TPU worker.
+     * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalIp_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. An external IP address associated with the TPU worker.
+     * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + + externalIp_ = getDefaultInstance().getExternalIp(); + onChanged(); + return this; + } + /** + *
+     * Output only. An external IP address associated with the TPU worker.
+     * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalIp_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.AccessConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.AccessConfig) + private static final com.google.cloud.tpu.v2.AccessConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.AccessConfig(); + } + + public static com.google.cloud.tpu.v2.AccessConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AccessConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfigOrBuilder.java new file mode 100644 index 000000000000..8e23ae69ce14 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AccessConfigOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface AccessConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.AccessConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. An external IP address associated with the TPU worker.
+   * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The externalIp. + */ + java.lang.String getExternalIp(); + /** + *
+   * Output only. An external IP address associated with the TPU worker.
+   * 
+ * + * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString + getExternalIpBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDisk.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDisk.java new file mode 100644 index 000000000000..2d88a52bba92 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDisk.java @@ -0,0 +1,869 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A node-attached disk resource.
+ * Next ID: 8;
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.AttachedDisk} + */ +public final class AttachedDisk extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.AttachedDisk) + AttachedDiskOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttachedDisk.newBuilder() to construct. + private AttachedDisk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttachedDisk() { + sourceDisk_ = ""; + mode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttachedDisk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AttachedDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AttachedDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.AttachedDisk.class, com.google.cloud.tpu.v2.AttachedDisk.Builder.class); + } + + /** + *
+   * The different mode of the attached disk.
+   * 
+ * + * Protobuf enum {@code google.cloud.tpu.v2.AttachedDisk.DiskMode} + */ + public enum DiskMode + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The disk mode is not known/set.
+     * 
+ * + * DISK_MODE_UNSPECIFIED = 0; + */ + DISK_MODE_UNSPECIFIED(0), + /** + *
+     * Attaches the disk in read-write mode. Only one TPU node can attach a disk
+     * in read-write mode at a time.
+     * 
+ * + * READ_WRITE = 1; + */ + READ_WRITE(1), + /** + *
+     * Attaches the disk in read-only mode. Multiple TPU nodes can attach
+     * a disk in read-only mode at a time.
+     * 
+ * + * READ_ONLY = 2; + */ + READ_ONLY(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The disk mode is not known/set.
+     * 
+ * + * DISK_MODE_UNSPECIFIED = 0; + */ + public static final int DISK_MODE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Attaches the disk in read-write mode. Only one TPU node can attach a disk
+     * in read-write mode at a time.
+     * 
+ * + * READ_WRITE = 1; + */ + public static final int READ_WRITE_VALUE = 1; + /** + *
+     * Attaches the disk in read-only mode. Multiple TPU nodes can attach
+     * a disk in read-only mode at a time.
+     * 
+ * + * READ_ONLY = 2; + */ + public static final int READ_ONLY_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiskMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiskMode forNumber(int value) { + switch (value) { + case 0: return DISK_MODE_UNSPECIFIED; + case 1: return READ_WRITE; + case 2: return READ_ONLY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DiskMode> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiskMode findValueByNumber(int number) { + return DiskMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.tpu.v2.AttachedDisk.getDescriptor().getEnumTypes().get(0); + } + + private static final DiskMode[] VALUES = values(); + + public static DiskMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiskMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tpu.v2.AttachedDisk.DiskMode) + } + + public static final int SOURCE_DISK_FIELD_NUMBER = 3; + private volatile java.lang.Object sourceDisk_; + /** + *
+   * Specifies the full path to an existing disk.
+   * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+   * 
+ * + * string source_disk = 3; + * @return The sourceDisk. + */ + @java.lang.Override + public java.lang.String getSourceDisk() { + java.lang.Object ref = sourceDisk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDisk_ = s; + return s; + } + } + /** + *
+   * Specifies the full path to an existing disk.
+   * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+   * 
+ * + * string source_disk = 3; + * @return The bytes for sourceDisk. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceDiskBytes() { + java.lang.Object ref = sourceDisk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDisk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODE_FIELD_NUMBER = 4; + private int mode_; + /** + *
+   * The mode in which to attach this disk.
+   * If not specified, the default is READ_WRITE mode.
+   * Only applicable to data_disks.
+   * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override public int getModeValue() { + return mode_; + } + /** + *
+   * The mode in which to attach this disk.
+   * If not specified, the default is READ_WRITE mode.
+   * Only applicable to data_disks.
+   * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return The mode. + */ + @java.lang.Override public com.google.cloud.tpu.v2.AttachedDisk.DiskMode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.AttachedDisk.DiskMode result = com.google.cloud.tpu.v2.AttachedDisk.DiskMode.valueOf(mode_); + return result == null ? com.google.cloud.tpu.v2.AttachedDisk.DiskMode.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDisk_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceDisk_); + } + if (mode_ != com.google.cloud.tpu.v2.AttachedDisk.DiskMode.DISK_MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, mode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDisk_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDisk_); + } + if (mode_ != com.google.cloud.tpu.v2.AttachedDisk.DiskMode.DISK_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, mode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.AttachedDisk)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.AttachedDisk other = (com.google.cloud.tpu.v2.AttachedDisk) obj; + + if (!getSourceDisk() + .equals(other.getSourceDisk())) return false; + if (mode_ != other.mode_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_DISK_FIELD_NUMBER; + hash = (53 * hash) + getSourceDisk().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.AttachedDisk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.AttachedDisk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A node-attached disk resource.
+   * Next ID: 8;
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.AttachedDisk} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.AttachedDisk) + com.google.cloud.tpu.v2.AttachedDiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AttachedDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AttachedDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.AttachedDisk.class, com.google.cloud.tpu.v2.AttachedDisk.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.AttachedDisk.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceDisk_ = ""; + + mode_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_AttachedDisk_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AttachedDisk getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.AttachedDisk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AttachedDisk build() { + com.google.cloud.tpu.v2.AttachedDisk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AttachedDisk buildPartial() { + com.google.cloud.tpu.v2.AttachedDisk result = new com.google.cloud.tpu.v2.AttachedDisk(this); + result.sourceDisk_ = sourceDisk_; + result.mode_ = mode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.AttachedDisk) { + return mergeFrom((com.google.cloud.tpu.v2.AttachedDisk)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.AttachedDisk other) { + if (other == com.google.cloud.tpu.v2.AttachedDisk.getDefaultInstance()) return this; + if (!other.getSourceDisk().isEmpty()) { + sourceDisk_ = other.sourceDisk_; + onChanged(); + } + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + sourceDisk_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + mode_ = input.readEnum(); + + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object sourceDisk_ = ""; + /** + *
+     * Specifies the full path to an existing disk.
+     * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+     * 
+ * + * string source_disk = 3; + * @return The sourceDisk. + */ + public java.lang.String getSourceDisk() { + java.lang.Object ref = sourceDisk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDisk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Specifies the full path to an existing disk.
+     * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+     * 
+ * + * string source_disk = 3; + * @return The bytes for sourceDisk. + */ + public com.google.protobuf.ByteString + getSourceDiskBytes() { + java.lang.Object ref = sourceDisk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDisk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Specifies the full path to an existing disk.
+     * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+     * 
+ * + * string source_disk = 3; + * @param value The sourceDisk to set. + * @return This builder for chaining. + */ + public Builder setSourceDisk( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceDisk_ = value; + onChanged(); + return this; + } + /** + *
+     * Specifies the full path to an existing disk.
+     * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+     * 
+ * + * string source_disk = 3; + * @return This builder for chaining. + */ + public Builder clearSourceDisk() { + + sourceDisk_ = getDefaultInstance().getSourceDisk(); + onChanged(); + return this; + } + /** + *
+     * Specifies the full path to an existing disk.
+     * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+     * 
+ * + * string source_disk = 3; + * @param value The bytes for sourceDisk to set. + * @return This builder for chaining. + */ + public Builder setSourceDiskBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceDisk_ = value; + onChanged(); + return this; + } + + private int mode_ = 0; + /** + *
+     * The mode in which to attach this disk.
+     * If not specified, the default is READ_WRITE mode.
+     * Only applicable to data_disks.
+     * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override public int getModeValue() { + return mode_; + } + /** + *
+     * The mode in which to attach this disk.
+     * If not specified, the default is READ_WRITE mode.
+     * Only applicable to data_disks.
+     * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + + mode_ = value; + onChanged(); + return this; + } + /** + *
+     * The mode in which to attach this disk.
+     * If not specified, the default is READ_WRITE mode.
+     * Only applicable to data_disks.
+     * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.AttachedDisk.DiskMode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.AttachedDisk.DiskMode result = com.google.cloud.tpu.v2.AttachedDisk.DiskMode.valueOf(mode_); + return result == null ? com.google.cloud.tpu.v2.AttachedDisk.DiskMode.UNRECOGNIZED : result; + } + /** + *
+     * The mode in which to attach this disk.
+     * If not specified, the default is READ_WRITE mode.
+     * Only applicable to data_disks.
+     * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(com.google.cloud.tpu.v2.AttachedDisk.DiskMode value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The mode in which to attach this disk.
+     * If not specified, the default is READ_WRITE mode.
+     * Only applicable to data_disks.
+     * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.AttachedDisk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.AttachedDisk) + private static final com.google.cloud.tpu.v2.AttachedDisk DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.AttachedDisk(); + } + + public static com.google.cloud.tpu.v2.AttachedDisk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttachedDisk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.AttachedDisk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDiskOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDiskOrBuilder.java new file mode 100644 index 000000000000..c01d3356cc9b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDiskOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface AttachedDiskOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.AttachedDisk) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Specifies the full path to an existing disk.
+   * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+   * 
+ * + * string source_disk = 3; + * @return The sourceDisk. + */ + java.lang.String getSourceDisk(); + /** + *
+   * Specifies the full path to an existing disk.
+   * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
+   * 
+ * + * string source_disk = 3; + * @return The bytes for sourceDisk. + */ + com.google.protobuf.ByteString + getSourceDiskBytes(); + + /** + *
+   * The mode in which to attach this disk.
+   * If not specified, the default is READ_WRITE mode.
+   * Only applicable to data_disks.
+   * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + *
+   * The mode in which to attach this disk.
+   * If not specified, the default is READ_WRITE mode.
+   * Only applicable to data_disks.
+   * 
+ * + * .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return The mode. + */ + com.google.cloud.tpu.v2.AttachedDisk.DiskMode getMode(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CloudTpuProto.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CloudTpuProto.java new file mode 100644 index 000000000000..a29b7fca3d32 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CloudTpuProto.java @@ -0,0 +1,658 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public final class CloudTpuProto { + private CloudTpuProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GuestAttributes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GuestAttributes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GuestAttributesValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GuestAttributesValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GuestAttributesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GuestAttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_AttachedDisk_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_AttachedDisk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_SchedulingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_SchedulingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_NetworkEndpoint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_NetworkEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_AccessConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_AccessConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_NetworkConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ServiceAccount_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ServiceAccount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_Node_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_Node_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_Node_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_Node_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_Node_MetadataEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_Node_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ListNodesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ListNodesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ListNodesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ListNodesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GetNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GetNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_CreateNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_CreateNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_DeleteNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_DeleteNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_StopNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_StopNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_StartNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_StartNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_UpdateNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_UpdateNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ServiceIdentity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ServiceIdentity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GenerateServiceIdentityRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GenerateServiceIdentityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GenerateServiceIdentityResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GenerateServiceIdentityResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_AcceleratorType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_AcceleratorType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GetAcceleratorTypeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GetAcceleratorTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ListAcceleratorTypesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ListAcceleratorTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ListAcceleratorTypesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ListAcceleratorTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_RuntimeVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_RuntimeVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GetRuntimeVersionRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GetRuntimeVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ListRuntimeVersionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ListRuntimeVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ListRuntimeVersionsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ListRuntimeVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_Symptom_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_Symptom_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GetGuestAttributesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GetGuestAttributesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_GetGuestAttributesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_GetGuestAttributesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2_ShieldedInstanceConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2_ShieldedInstanceConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#google/cloud/tpu/v2/cloud_tpu.proto\022\023g" + + "oogle.cloud.tpu.v2\032\034google/api/annotatio" + + "ns.proto\032\027google/api/client.proto\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\032#google/longrunning/operat" + + "ions.proto\032 google/protobuf/field_mask.p" + + "roto\032\037google/protobuf/timestamp.proto\"e\n" + + "\017GuestAttributes\022\022\n\nquery_path\030\001 \001(\t\022>\n\013" + + "query_value\030\002 \001(\0132).google.cloud.tpu.v2." + + "GuestAttributesValue\"P\n\024GuestAttributesV" + + "alue\0228\n\005items\030\001 \003(\0132).google.cloud.tpu.v" + + "2.GuestAttributesEntry\"E\n\024GuestAttribute" + + "sEntry\022\021\n\tnamespace\030\001 \001(\t\022\013\n\003key\030\002 \001(\t\022\r" + + "\n\005value\030\003 \001(\t\"\243\001\n\014AttachedDisk\022\023\n\013source" + + "_disk\030\003 \001(\t\0228\n\004mode\030\004 \001(\0162*.google.cloud" + + ".tpu.v2.AttachedDisk.DiskMode\"D\n\010DiskMod" + + "e\022\031\n\025DISK_MODE_UNSPECIFIED\020\000\022\016\n\nREAD_WRI" + + "TE\020\001\022\r\n\tREAD_ONLY\020\002\"9\n\020SchedulingConfig\022" + + "\023\n\013preemptible\030\001 \001(\010\022\020\n\010reserved\030\002 \001(\010\"m" + + "\n\017NetworkEndpoint\022\022\n\nip_address\030\001 \001(\t\022\014\n" + + "\004port\030\002 \001(\005\0228\n\raccess_config\030\005 \001(\0132!.goo" + + "gle.cloud.tpu.v2.AccessConfig\"(\n\014AccessC" + + "onfig\022\030\n\013external_ip\030\001 \001(\tB\003\340A\003\"i\n\rNetwo" + + "rkConfig\022\017\n\007network\030\001 \001(\t\022\022\n\nsubnetwork\030" + + "\002 \001(\t\022\033\n\023enable_external_ips\030\003 \001(\010\022\026\n\016ca" + + "n_ip_forward\030\004 \001(\010\".\n\016ServiceAccount\022\r\n\005" + + "email\030\001 \001(\t\022\r\n\005scope\030\002 \003(\t\"\260\014\n\004Node\022\024\n\004n" + + "ame\030\001 \001(\tB\006\340A\003\340A\005\022\023\n\013description\030\003 \001(\t\022\035" + + "\n\020accelerator_type\030\005 \001(\tB\003\340A\002\0223\n\005state\030\t" + + " \001(\0162\037.google.cloud.tpu.v2.Node.StateB\003\340" + + "A\003\022\037\n\022health_description\030\n \001(\tB\003\340A\003\022\034\n\017r" + + "untime_version\030\013 \001(\tB\003\340A\002\022:\n\016network_con" + + "fig\030$ \001(\0132\".google.cloud.tpu.v2.NetworkC" + + "onfig\022\022\n\ncidr_block\030\r \001(\t\022<\n\017service_acc" + + "ount\030% \001(\0132#.google.cloud.tpu.v2.Service" + + "Account\0224\n\013create_time\030\020 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022@\n\021scheduling_conf" + + "ig\030\021 \001(\0132%.google.cloud.tpu.v2.Schedulin" + + "gConfig\022D\n\021network_endpoints\030\025 \003(\0132$.goo" + + "gle.cloud.tpu.v2.NetworkEndpointB\003\340A\003\0220\n" + + "\006health\030\026 \001(\0162 .google.cloud.tpu.v2.Node" + + ".Health\0225\n\006labels\030\030 \003(\0132%.google.cloud.t" + + "pu.v2.Node.LabelsEntry\0229\n\010metadata\030\" \003(\013" + + "2\'.google.cloud.tpu.v2.Node.MetadataEntr" + + "y\022\014\n\004tags\030( \003(\t\022\017\n\002id\030! \001(\003B\003\340A\003\0225\n\ndata" + + "_disks\030) \003(\0132!.google.cloud.tpu.v2.Attac" + + "hedDisk\022>\n\013api_version\030& \001(\0162$.google.cl" + + "oud.tpu.v2.Node.ApiVersionB\003\340A\003\0223\n\010sympt" + + "oms\030\' \003(\0132\034.google.cloud.tpu.v2.SymptomB" + + "\003\340A\003\022M\n\030shielded_instance_config\030- \001(\0132+" + + ".google.cloud.tpu.v2.ShieldedInstanceCon" + + "fig\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\"\341\001\n\005State\022\025\n\021STATE_U" + + "NSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\016\n" + + "\nRESTARTING\020\003\022\r\n\tREIMAGING\020\004\022\014\n\010DELETING" + + "\020\005\022\r\n\tREPAIRING\020\006\022\013\n\007STOPPED\020\010\022\014\n\010STOPPI" + + "NG\020\t\022\014\n\010STARTING\020\n\022\r\n\tPREEMPTED\020\013\022\016\n\nTER" + + "MINATED\020\014\022\n\n\006HIDING\020\r\022\n\n\006HIDDEN\020\016\022\014\n\010UNH" + + "IDING\020\017\"o\n\006Health\022\026\n\022HEALTH_UNSPECIFIED\020" + + "\000\022\013\n\007HEALTHY\020\001\022\013\n\007TIMEOUT\020\003\022\030\n\024UNHEALTHY" + + "_TENSORFLOW\020\004\022\031\n\025UNHEALTHY_MAINTENANCE\020\005" + + "\"W\n\nApiVersion\022\033\n\027API_VERSION_UNSPECIFIE" + + "D\020\000\022\r\n\tV1_ALPHA1\020\001\022\006\n\002V1\020\002\022\r\n\tV2_ALPHA1\020" + + "\003\022\006\n\002V2\020\004:R\352AO\n\027tpu.googleapis.com/Node\022" + + "4projects/{project}/locations/{location}" + + "/nodes/{node}\"j\n\020ListNodesRequest\022/\n\006par" + + "ent\030\001 \001(\tB\037\340A\002\372A\031\022\027tpu.googleapis.com/No" + + "de\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"k\n\021ListNodesResponse\022(\n\005nodes\030\001 \003(\0132\031." + + "google.cloud.tpu.v2.Node\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"?\n\016GetNod" + + "eRequest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.goog" + + "leapis.com/Node\"\215\001\n\021CreateNodeRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googlea" + + "pis.com/Location\022\017\n\007node_id\030\002 \001(\t\022,\n\004nod" + + "e\030\003 \001(\0132\031.google.cloud.tpu.v2.NodeB\003\340A\002\"" + + "B\n\021DeleteNodeRequest\022-\n\004name\030\001 \001(\tB\037\340A\002\372" + + "A\031\n\027tpu.googleapis.com/Node\"@\n\017StopNodeR" + + "equest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.google" + + "apis.com/Node\"A\n\020StartNodeRequest\022-\n\004nam" + + "e\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googleapis.com/Node" + + "\"w\n\021UpdateNodeRequest\0224\n\013update_mask\030\001 \001" + + "(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022,\n\004n" + + "ode\030\002 \001(\0132\031.google.cloud.tpu.v2.NodeB\003\340A" + + "\002\" \n\017ServiceIdentity\022\r\n\005email\030\001 \001(\t\"[\n\036G" + + "enerateServiceIdentityRequest\0229\n\006parent\030" + + "\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com/" + + "Location\"Y\n\037GenerateServiceIdentityRespo" + + "nse\0226\n\010identity\030\001 \001(\0132$.google.cloud.tpu" + + ".v2.ServiceIdentity\"\243\001\n\017AcceleratorType\022" + + "\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\t:t\352Aq\n\"tpu.go" + + "ogleapis.com/AcceleratorType\022Kprojects/{" + + "project}/locations/{location}/accelerato" + + "rTypes/{accelerator_type}\"U\n\031GetAccelera" + + "torTypeRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"tp" + + "u.googleapis.com/AcceleratorType\"\242\001\n\033Lis" + + "tAcceleratorTypesRequest\022:\n\006parent\030\001 \001(\t" + + "B*\340A\002\372A$\022\"tpu.googleapis.com/Accelerator" + + "Type\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\022\016\n\006filter\030\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\215\001" + + "\n\034ListAcceleratorTypesResponse\022?\n\021accele" + + "rator_types\030\001 \003(\0132$.google.cloud.tpu.v2." + + "AcceleratorType\022\027\n\017next_page_token\030\002 \001(\t" + + "\022\023\n\013unreachable\030\003 \003(\t\"\242\001\n\016RuntimeVersion" + + "\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 \001(\t:q\352An\n!tp" + + "u.googleapis.com/RuntimeVersion\022Iproject" + + "s/{project}/locations/{location}/runtime" + + "Versions/{runtime_version}\"S\n\030GetRuntime" + + "VersionRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!tp" + + "u.googleapis.com/RuntimeVersion\"\240\001\n\032List" + + "RuntimeVersionsRequest\0229\n\006parent\030\001 \001(\tB)" + + "\340A\002\372A#\022!tpu.googleapis.com/RuntimeVersio" + + "n\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\022\016\n\006filter\030\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\212\001\n\033L" + + "istRuntimeVersionsResponse\022=\n\020runtime_ve" + + "rsions\030\001 \003(\0132#.google.cloud.tpu.v2.Runti" + + "meVersion\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013un" + + "reachable\030\003 \003(\t\"\326\001\n\021OperationMetadata\022/\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estamp\022,\n\010end_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004verb\030\004 \001" + + "(\t\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020cancel_requ" + + "ested\030\006 \001(\010\022\023\n\013api_version\030\007 \001(\t\"\305\002\n\007Sym" + + "ptom\022/\n\013create_time\030\001 \001(\0132\032.google.proto" + + "buf.Timestamp\022>\n\014symptom_type\030\002 \001(\0162(.go" + + "ogle.cloud.tpu.v2.Symptom.SymptomType\022\017\n" + + "\007details\030\003 \001(\t\022\021\n\tworker_id\030\004 \001(\t\"\244\001\n\013Sy" + + "mptomType\022\034\n\030SYMPTOM_TYPE_UNSPECIFIED\020\000\022" + + "\016\n\nLOW_MEMORY\020\001\022\021\n\rOUT_OF_MEMORY\020\002\022\025\n\021EX" + + "ECUTE_TIMED_OUT\020\003\022\023\n\017MESH_BUILD_FAIL\020\004\022\025" + + "\n\021HBM_OUT_OF_MEMORY\020\005\022\021\n\rPROJECT_ABUSE\020\006" + + "\"r\n\031GetGuestAttributesRequest\022-\n\004name\030\001 " + + "\001(\tB\037\340A\002\372A\031\n\027tpu.googleapis.com/Node\022\022\n\n" + + "query_path\030\002 \001(\t\022\022\n\nworker_ids\030\003 \003(\t\"\\\n\032" + + "GetGuestAttributesResponse\022>\n\020guest_attr" + + "ibutes\030\001 \003(\0132$.google.cloud.tpu.v2.Guest" + + "Attributes\"4\n\026ShieldedInstanceConfig\022\032\n\022" + + "enable_secure_boot\030\001 \001(\0102\370\022\n\003Tpu\022\226\001\n\tLis" + + "tNodes\022%.google.cloud.tpu.v2.ListNodesRe" + + "quest\032&.google.cloud.tpu.v2.ListNodesRes" + + "ponse\":\202\323\344\223\002+\022)/v2/{parent=projects/*/lo" + + "cations/*}/nodes\332A\006parent\022\203\001\n\007GetNode\022#." + + "google.cloud.tpu.v2.GetNodeRequest\032\031.goo" + + "gle.cloud.tpu.v2.Node\"8\202\323\344\223\002+\022)/v2/{name" + + "=projects/*/locations/*/nodes/*}\332A\004name\022" + + "\276\001\n\nCreateNode\022&.google.cloud.tpu.v2.Cre" + + "ateNodeRequest\032\035.google.longrunning.Oper" + + "ation\"i\202\323\344\223\0021\")/v2/{parent=projects/*/lo" + + "cations/*}/nodes:\004node\332A\023parent,node,nod" + + "e_id\312A\031\n\004Node\022\021OperationMetadata\022\272\001\n\nDel" + + "eteNode\022&.google.cloud.tpu.v2.DeleteNode" + + "Request\032\035.google.longrunning.Operation\"e" + + "\202\323\344\223\002+*)/v2/{name=projects/*/locations/*" + + "/nodes/*}\332A\004name\312A*\n\025google.protobuf.Emp" + + "ty\022\021OperationMetadata\022\246\001\n\010StopNode\022$.goo" + + "gle.cloud.tpu.v2.StopNodeRequest\032\035.googl" + + "e.longrunning.Operation\"U\202\323\344\223\0023\"./v2/{na" + + "me=projects/*/locations/*/nodes/*}:stop:" + + "\001*\312A\031\n\004Node\022\021OperationMetadata\022\251\001\n\tStart" + + "Node\022%.google.cloud.tpu.v2.StartNodeRequ" + + "est\032\035.google.longrunning.Operation\"V\202\323\344\223" + + "\0024\"//v2/{name=projects/*/locations/*/nod" + + "es/*}:start:\001*\312A\031\n\004Node\022\021OperationMetada" + + "ta\022\300\001\n\nUpdateNode\022&.google.cloud.tpu.v2." + + "UpdateNodeRequest\032\035.google.longrunning.O" + + "peration\"k\202\323\344\223\00262./v2/{node.name=project" + + "s/*/locations/*/nodes/*}:\004node\332A\020node,up" + + "date_mask\312A\031\n\004Node\022\021OperationMetadata\022\314\001" + + "\n\027GenerateServiceIdentity\0223.google.cloud" + + ".tpu.v2.GenerateServiceIdentityRequest\0324" + + ".google.cloud.tpu.v2.GenerateServiceIden" + + "tityResponse\"F\202\323\344\223\002@\";/v2/{parent=projec" + + "ts/*/locations/*}:generateServiceIdentit" + + "y:\001*\022\302\001\n\024ListAcceleratorTypes\0220.google.c" + + "loud.tpu.v2.ListAcceleratorTypesRequest\032" + + "1.google.cloud.tpu.v2.ListAcceleratorTyp" + + "esResponse\"E\202\323\344\223\0026\0224/v2/{parent=projects" + + "/*/locations/*}/acceleratorTypes\332A\006paren" + + "t\022\257\001\n\022GetAcceleratorType\022..google.cloud." + + "tpu.v2.GetAcceleratorTypeRequest\032$.googl" + + "e.cloud.tpu.v2.AcceleratorType\"C\202\323\344\223\0026\0224" + + "/v2/{name=projects/*/locations/*/acceler" + + "atorTypes/*}\332A\004name\022\276\001\n\023ListRuntimeVersi" + + "ons\022/.google.cloud.tpu.v2.ListRuntimeVer" + + "sionsRequest\0320.google.cloud.tpu.v2.ListR" + + "untimeVersionsResponse\"D\202\323\344\223\0025\0223/v2/{par" + + "ent=projects/*/locations/*}/runtimeVersi" + + "ons\332A\006parent\022\253\001\n\021GetRuntimeVersion\022-.goo" + + "gle.cloud.tpu.v2.GetRuntimeVersionReques" + + "t\032#.google.cloud.tpu.v2.RuntimeVersion\"B" + + "\202\323\344\223\0025\0223/v2/{name=projects/*/locations/*" + + "/runtimeVersions/*}\332A\004name\022\276\001\n\022GetGuestA" + + "ttributes\022..google.cloud.tpu.v2.GetGuest" + + "AttributesRequest\032/.google.cloud.tpu.v2." + + "GetGuestAttributesResponse\"G\202\323\344\223\002A\" + * Request for [CreateNode][google.cloud.tpu.v2.Tpu.CreateNode]. + * + * + * Protobuf type {@code google.cloud.tpu.v2.CreateNodeRequest} + */ +public final class CreateNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.CreateNodeRequest) + CreateNodeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateNodeRequest.newBuilder() to construct. + private CreateNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateNodeRequest() { + parent_ = ""; + nodeId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateNodeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_CreateNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_CreateNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.CreateNodeRequest.class, com.google.cloud.tpu.v2.CreateNodeRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object nodeId_; + /** + *
+   * The unqualified resource name.
+   * 
+ * + * string node_id = 2; + * @return The nodeId. + */ + @java.lang.Override + public java.lang.String getNodeId() { + java.lang.Object ref = nodeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeId_ = s; + return s; + } + } + /** + *
+   * The unqualified resource name.
+   * 
+ * + * string node_id = 2; + * @return The bytes for nodeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNodeIdBytes() { + java.lang.Object ref = nodeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_FIELD_NUMBER = 3; + private com.google.cloud.tpu.v2.Node node_; + /** + *
+   * Required. The node.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + @java.lang.Override + public boolean hasNode() { + return node_ != null; + } + /** + *
+   * Required. The node.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Node getNode() { + return node_ == null ? com.google.cloud.tpu.v2.Node.getDefaultInstance() : node_; + } + /** + *
+   * Required. The node.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.NodeOrBuilder getNodeOrBuilder() { + return getNode(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nodeId_); + } + if (node_ != null) { + output.writeMessage(3, getNode()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nodeId_); + } + if (node_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNode()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.CreateNodeRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.CreateNodeRequest other = (com.google.cloud.tpu.v2.CreateNodeRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getNodeId() + .equals(other.getNodeId())) return false; + if (hasNode() != other.hasNode()) return false; + if (hasNode()) { + if (!getNode() + .equals(other.getNode())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + NODE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeId().hashCode(); + if (hasNode()) { + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNode().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.CreateNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.CreateNodeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [CreateNode][google.cloud.tpu.v2.Tpu.CreateNode].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.CreateNodeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.CreateNodeRequest) + com.google.cloud.tpu.v2.CreateNodeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_CreateNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_CreateNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.CreateNodeRequest.class, com.google.cloud.tpu.v2.CreateNodeRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.CreateNodeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + nodeId_ = ""; + + if (nodeBuilder_ == null) { + node_ = null; + } else { + node_ = null; + nodeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_CreateNodeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.CreateNodeRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.CreateNodeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.CreateNodeRequest build() { + com.google.cloud.tpu.v2.CreateNodeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.CreateNodeRequest buildPartial() { + com.google.cloud.tpu.v2.CreateNodeRequest result = new com.google.cloud.tpu.v2.CreateNodeRequest(this); + result.parent_ = parent_; + result.nodeId_ = nodeId_; + if (nodeBuilder_ == null) { + result.node_ = node_; + } else { + result.node_ = nodeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.CreateNodeRequest) { + return mergeFrom((com.google.cloud.tpu.v2.CreateNodeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.CreateNodeRequest other) { + if (other == com.google.cloud.tpu.v2.CreateNodeRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getNodeId().isEmpty()) { + nodeId_ = other.nodeId_; + onChanged(); + } + if (other.hasNode()) { + mergeNode(other.getNode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + nodeId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + input.readMessage( + getNodeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object nodeId_ = ""; + /** + *
+     * The unqualified resource name.
+     * 
+ * + * string node_id = 2; + * @return The nodeId. + */ + public java.lang.String getNodeId() { + java.lang.Object ref = nodeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unqualified resource name.
+     * 
+ * + * string node_id = 2; + * @return The bytes for nodeId. + */ + public com.google.protobuf.ByteString + getNodeIdBytes() { + java.lang.Object ref = nodeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unqualified resource name.
+     * 
+ * + * string node_id = 2; + * @param value The nodeId to set. + * @return This builder for chaining. + */ + public Builder setNodeId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeId_ = value; + onChanged(); + return this; + } + /** + *
+     * The unqualified resource name.
+     * 
+ * + * string node_id = 2; + * @return This builder for chaining. + */ + public Builder clearNodeId() { + + nodeId_ = getDefaultInstance().getNodeId(); + onChanged(); + return this; + } + /** + *
+     * The unqualified resource name.
+     * 
+ * + * string node_id = 2; + * @param value The bytes for nodeId to set. + * @return This builder for chaining. + */ + public Builder setNodeIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2.Node node_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder> nodeBuilder_; + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + public boolean hasNode() { + return nodeBuilder_ != null || node_ != null; + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + public com.google.cloud.tpu.v2.Node getNode() { + if (nodeBuilder_ == null) { + return node_ == null ? com.google.cloud.tpu.v2.Node.getDefaultInstance() : node_; + } else { + return nodeBuilder_.getMessage(); + } + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNode(com.google.cloud.tpu.v2.Node value) { + if (nodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + node_ = value; + onChanged(); + } else { + nodeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNode( + com.google.cloud.tpu.v2.Node.Builder builderForValue) { + if (nodeBuilder_ == null) { + node_ = builderForValue.build(); + onChanged(); + } else { + nodeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNode(com.google.cloud.tpu.v2.Node value) { + if (nodeBuilder_ == null) { + if (node_ != null) { + node_ = + com.google.cloud.tpu.v2.Node.newBuilder(node_).mergeFrom(value).buildPartial(); + } else { + node_ = value; + } + onChanged(); + } else { + nodeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNode() { + if (nodeBuilder_ == null) { + node_ = null; + onChanged(); + } else { + node_ = null; + nodeBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2.Node.Builder getNodeBuilder() { + + onChanged(); + return getNodeFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2.NodeOrBuilder getNodeOrBuilder() { + if (nodeBuilder_ != null) { + return nodeBuilder_.getMessageOrBuilder(); + } else { + return node_ == null ? + com.google.cloud.tpu.v2.Node.getDefaultInstance() : node_; + } + } + /** + *
+     * Required. The node.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder> + getNodeFieldBuilder() { + if (nodeBuilder_ == null) { + nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder>( + getNode(), + getParentForChildren(), + isClean()); + node_ = null; + } + return nodeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.CreateNodeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.CreateNodeRequest) + private static final com.google.cloud.tpu.v2.CreateNodeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.CreateNodeRequest(); + } + + public static com.google.cloud.tpu.v2.CreateNodeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.CreateNodeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CreateNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CreateNodeRequestOrBuilder.java new file mode 100644 index 000000000000..a97c5d99a641 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/CreateNodeRequestOrBuilder.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface CreateNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.CreateNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The unqualified resource name.
+   * 
+ * + * string node_id = 2; + * @return The nodeId. + */ + java.lang.String getNodeId(); + /** + *
+   * The unqualified resource name.
+   * 
+ * + * string node_id = 2; + * @return The bytes for nodeId. + */ + com.google.protobuf.ByteString + getNodeIdBytes(); + + /** + *
+   * Required. The node.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + boolean hasNode(); + /** + *
+   * Required. The node.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + com.google.cloud.tpu.v2.Node getNode(); + /** + *
+   * Required. The node.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.tpu.v2.NodeOrBuilder getNodeOrBuilder(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequest.java new file mode 100644 index 000000000000..7c32cd72d636 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [DeleteNode][google.cloud.tpu.v2.Tpu.DeleteNode].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.DeleteNodeRequest} + */ +public final class DeleteNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.DeleteNodeRequest) + DeleteNodeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteNodeRequest.newBuilder() to construct. + private DeleteNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteNodeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteNodeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_DeleteNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_DeleteNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.DeleteNodeRequest.class, com.google.cloud.tpu.v2.DeleteNodeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.DeleteNodeRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.DeleteNodeRequest other = (com.google.cloud.tpu.v2.DeleteNodeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.DeleteNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.DeleteNodeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [DeleteNode][google.cloud.tpu.v2.Tpu.DeleteNode].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.DeleteNodeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.DeleteNodeRequest) + com.google.cloud.tpu.v2.DeleteNodeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_DeleteNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_DeleteNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.DeleteNodeRequest.class, com.google.cloud.tpu.v2.DeleteNodeRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.DeleteNodeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_DeleteNodeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.DeleteNodeRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.DeleteNodeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.DeleteNodeRequest build() { + com.google.cloud.tpu.v2.DeleteNodeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.DeleteNodeRequest buildPartial() { + com.google.cloud.tpu.v2.DeleteNodeRequest result = new com.google.cloud.tpu.v2.DeleteNodeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.DeleteNodeRequest) { + return mergeFrom((com.google.cloud.tpu.v2.DeleteNodeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.DeleteNodeRequest other) { + if (other == com.google.cloud.tpu.v2.DeleteNodeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.DeleteNodeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.DeleteNodeRequest) + private static final com.google.cloud.tpu.v2.DeleteNodeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.DeleteNodeRequest(); + } + + public static com.google.cloud.tpu.v2.DeleteNodeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.DeleteNodeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequestOrBuilder.java new file mode 100644 index 000000000000..6e8e7d845d26 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/DeleteNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface DeleteNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.DeleteNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequest.java new file mode 100644 index 000000000000..447886de0992 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GenerateServiceIdentityRequest} + */ +public final class GenerateServiceIdentityRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GenerateServiceIdentityRequest) + GenerateServiceIdentityRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GenerateServiceIdentityRequest.newBuilder() to construct. + private GenerateServiceIdentityRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GenerateServiceIdentityRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GenerateServiceIdentityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.class, com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GenerateServiceIdentityRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest other = (com.google.cloud.tpu.v2.GenerateServiceIdentityRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GenerateServiceIdentityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GenerateServiceIdentityRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GenerateServiceIdentityRequest) + com.google.cloud.tpu.v2.GenerateServiceIdentityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.class, com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityRequest build() { + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityRequest buildPartial() { + com.google.cloud.tpu.v2.GenerateServiceIdentityRequest result = new com.google.cloud.tpu.v2.GenerateServiceIdentityRequest(this); + result.parent_ = parent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GenerateServiceIdentityRequest) { + return mergeFrom((com.google.cloud.tpu.v2.GenerateServiceIdentityRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GenerateServiceIdentityRequest other) { + if (other == com.google.cloud.tpu.v2.GenerateServiceIdentityRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GenerateServiceIdentityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GenerateServiceIdentityRequest) + private static final com.google.cloud.tpu.v2.GenerateServiceIdentityRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GenerateServiceIdentityRequest(); + } + + public static com.google.cloud.tpu.v2.GenerateServiceIdentityRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateServiceIdentityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequestOrBuilder.java new file mode 100644 index 000000000000..08b2f2df4dab --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GenerateServiceIdentityRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GenerateServiceIdentityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponse.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponse.java new file mode 100644 index 000000000000..89f3e581ea95 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponse.java @@ -0,0 +1,639 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Response for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GenerateServiceIdentityResponse} + */ +public final class GenerateServiceIdentityResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GenerateServiceIdentityResponse) + GenerateServiceIdentityResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GenerateServiceIdentityResponse.newBuilder() to construct. + private GenerateServiceIdentityResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GenerateServiceIdentityResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GenerateServiceIdentityResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.class, com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.Builder.class); + } + + public static final int IDENTITY_FIELD_NUMBER = 1; + private com.google.cloud.tpu.v2.ServiceIdentity identity_; + /** + *
+   * ServiceIdentity that was created or retrieved.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @return Whether the identity field is set. + */ + @java.lang.Override + public boolean hasIdentity() { + return identity_ != null; + } + /** + *
+   * ServiceIdentity that was created or retrieved.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @return The identity. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceIdentity getIdentity() { + return identity_ == null ? com.google.cloud.tpu.v2.ServiceIdentity.getDefaultInstance() : identity_; + } + /** + *
+   * ServiceIdentity that was created or retrieved.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceIdentityOrBuilder getIdentityOrBuilder() { + return getIdentity(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (identity_ != null) { + output.writeMessage(1, getIdentity()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (identity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getIdentity()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GenerateServiceIdentityResponse)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GenerateServiceIdentityResponse other = (com.google.cloud.tpu.v2.GenerateServiceIdentityResponse) obj; + + if (hasIdentity() != other.hasIdentity()) return false; + if (hasIdentity()) { + if (!getIdentity() + .equals(other.getIdentity())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIdentity()) { + hash = (37 * hash) + IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getIdentity().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GenerateServiceIdentityResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GenerateServiceIdentityResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GenerateServiceIdentityResponse) + com.google.cloud.tpu.v2.GenerateServiceIdentityResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.class, com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (identityBuilder_ == null) { + identity_ = null; + } else { + identity_ = null; + identityBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GenerateServiceIdentityResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityResponse getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityResponse build() { + com.google.cloud.tpu.v2.GenerateServiceIdentityResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityResponse buildPartial() { + com.google.cloud.tpu.v2.GenerateServiceIdentityResponse result = new com.google.cloud.tpu.v2.GenerateServiceIdentityResponse(this); + if (identityBuilder_ == null) { + result.identity_ = identity_; + } else { + result.identity_ = identityBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GenerateServiceIdentityResponse) { + return mergeFrom((com.google.cloud.tpu.v2.GenerateServiceIdentityResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GenerateServiceIdentityResponse other) { + if (other == com.google.cloud.tpu.v2.GenerateServiceIdentityResponse.getDefaultInstance()) return this; + if (other.hasIdentity()) { + mergeIdentity(other.getIdentity()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getIdentityFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.tpu.v2.ServiceIdentity identity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ServiceIdentity, com.google.cloud.tpu.v2.ServiceIdentity.Builder, com.google.cloud.tpu.v2.ServiceIdentityOrBuilder> identityBuilder_; + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @return Whether the identity field is set. + */ + public boolean hasIdentity() { + return identityBuilder_ != null || identity_ != null; + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @return The identity. + */ + public com.google.cloud.tpu.v2.ServiceIdentity getIdentity() { + if (identityBuilder_ == null) { + return identity_ == null ? com.google.cloud.tpu.v2.ServiceIdentity.getDefaultInstance() : identity_; + } else { + return identityBuilder_.getMessage(); + } + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + public Builder setIdentity(com.google.cloud.tpu.v2.ServiceIdentity value) { + if (identityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identity_ = value; + onChanged(); + } else { + identityBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + public Builder setIdentity( + com.google.cloud.tpu.v2.ServiceIdentity.Builder builderForValue) { + if (identityBuilder_ == null) { + identity_ = builderForValue.build(); + onChanged(); + } else { + identityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + public Builder mergeIdentity(com.google.cloud.tpu.v2.ServiceIdentity value) { + if (identityBuilder_ == null) { + if (identity_ != null) { + identity_ = + com.google.cloud.tpu.v2.ServiceIdentity.newBuilder(identity_).mergeFrom(value).buildPartial(); + } else { + identity_ = value; + } + onChanged(); + } else { + identityBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + public Builder clearIdentity() { + if (identityBuilder_ == null) { + identity_ = null; + onChanged(); + } else { + identity_ = null; + identityBuilder_ = null; + } + + return this; + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + public com.google.cloud.tpu.v2.ServiceIdentity.Builder getIdentityBuilder() { + + onChanged(); + return getIdentityFieldBuilder().getBuilder(); + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + public com.google.cloud.tpu.v2.ServiceIdentityOrBuilder getIdentityOrBuilder() { + if (identityBuilder_ != null) { + return identityBuilder_.getMessageOrBuilder(); + } else { + return identity_ == null ? + com.google.cloud.tpu.v2.ServiceIdentity.getDefaultInstance() : identity_; + } + } + /** + *
+     * ServiceIdentity that was created or retrieved.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ServiceIdentity, com.google.cloud.tpu.v2.ServiceIdentity.Builder, com.google.cloud.tpu.v2.ServiceIdentityOrBuilder> + getIdentityFieldBuilder() { + if (identityBuilder_ == null) { + identityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ServiceIdentity, com.google.cloud.tpu.v2.ServiceIdentity.Builder, com.google.cloud.tpu.v2.ServiceIdentityOrBuilder>( + getIdentity(), + getParentForChildren(), + isClean()); + identity_ = null; + } + return identityBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GenerateServiceIdentityResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GenerateServiceIdentityResponse) + private static final com.google.cloud.tpu.v2.GenerateServiceIdentityResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GenerateServiceIdentityResponse(); + } + + public static com.google.cloud.tpu.v2.GenerateServiceIdentityResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateServiceIdentityResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GenerateServiceIdentityResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponseOrBuilder.java new file mode 100644 index 000000000000..ac9ad964b6dd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GenerateServiceIdentityResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GenerateServiceIdentityResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GenerateServiceIdentityResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ServiceIdentity that was created or retrieved.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @return Whether the identity field is set. + */ + boolean hasIdentity(); + /** + *
+   * ServiceIdentity that was created or retrieved.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @return The identity. + */ + com.google.cloud.tpu.v2.ServiceIdentity getIdentity(); + /** + *
+   * ServiceIdentity that was created or retrieved.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + com.google.cloud.tpu.v2.ServiceIdentityOrBuilder getIdentityOrBuilder(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequest.java new file mode 100644 index 000000000000..bce547fba80c --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [GetAcceleratorType][google.cloud.tpu.v2.Tpu.GetAcceleratorType].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetAcceleratorTypeRequest} + */ +public final class GetAcceleratorTypeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GetAcceleratorTypeRequest) + GetAcceleratorTypeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetAcceleratorTypeRequest.newBuilder() to construct. + private GetAcceleratorTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAcceleratorTypeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAcceleratorTypeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetAcceleratorTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetAcceleratorTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.class, com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GetAcceleratorTypeRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest other = (com.google.cloud.tpu.v2.GetAcceleratorTypeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GetAcceleratorTypeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [GetAcceleratorType][google.cloud.tpu.v2.Tpu.GetAcceleratorType].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetAcceleratorTypeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GetAcceleratorTypeRequest) + com.google.cloud.tpu.v2.GetAcceleratorTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetAcceleratorTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetAcceleratorTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.class, com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetAcceleratorTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetAcceleratorTypeRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetAcceleratorTypeRequest build() { + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetAcceleratorTypeRequest buildPartial() { + com.google.cloud.tpu.v2.GetAcceleratorTypeRequest result = new com.google.cloud.tpu.v2.GetAcceleratorTypeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GetAcceleratorTypeRequest) { + return mergeFrom((com.google.cloud.tpu.v2.GetAcceleratorTypeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GetAcceleratorTypeRequest other) { + if (other == com.google.cloud.tpu.v2.GetAcceleratorTypeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GetAcceleratorTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GetAcceleratorTypeRequest) + private static final com.google.cloud.tpu.v2.GetAcceleratorTypeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GetAcceleratorTypeRequest(); + } + + public static com.google.cloud.tpu.v2.GetAcceleratorTypeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAcceleratorTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetAcceleratorTypeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequestOrBuilder.java new file mode 100644 index 000000000000..0f8fc9127044 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetAcceleratorTypeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GetAcceleratorTypeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GetAcceleratorTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequest.java new file mode 100644 index 000000000000..4bdfdc99eef5 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequest.java @@ -0,0 +1,992 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetGuestAttributesRequest} + */ +public final class GetGuestAttributesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GetGuestAttributesRequest) + GetGuestAttributesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetGuestAttributesRequest.newBuilder() to construct. + private GetGuestAttributesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetGuestAttributesRequest() { + name_ = ""; + queryPath_ = ""; + workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetGuestAttributesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetGuestAttributesRequest.class, com.google.cloud.tpu.v2.GetGuestAttributesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object queryPath_; + /** + *
+   * The guest attributes path to be queried.
+   * 
+ * + * string query_path = 2; + * @return The queryPath. + */ + @java.lang.Override + public java.lang.String getQueryPath() { + java.lang.Object ref = queryPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryPath_ = s; + return s; + } + } + /** + *
+   * The guest attributes path to be queried.
+   * 
+ * + * string query_path = 2; + * @return The bytes for queryPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryPathBytes() { + java.lang.Object ref = queryPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queryPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WORKER_IDS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList workerIds_; + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @return A list containing the workerIds. + */ + public com.google.protobuf.ProtocolStringList + getWorkerIdsList() { + return workerIds_; + } + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @return The count of workerIds. + */ + public int getWorkerIdsCount() { + return workerIds_.size(); + } + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @param index The index of the element to return. + * @return The workerIds at the given index. + */ + public java.lang.String getWorkerIds(int index) { + return workerIds_.get(index); + } + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @param index The index of the value to return. + * @return The bytes of the workerIds at the given index. + */ + public com.google.protobuf.ByteString + getWorkerIdsBytes(int index) { + return workerIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, queryPath_); + } + for (int i = 0; i < workerIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, workerIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, queryPath_); + } + { + int dataSize = 0; + for (int i = 0; i < workerIds_.size(); i++) { + dataSize += computeStringSizeNoTag(workerIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getWorkerIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GetGuestAttributesRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GetGuestAttributesRequest other = (com.google.cloud.tpu.v2.GetGuestAttributesRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getQueryPath() + .equals(other.getQueryPath())) return false; + if (!getWorkerIdsList() + .equals(other.getWorkerIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + QUERY_PATH_FIELD_NUMBER; + hash = (53 * hash) + getQueryPath().hashCode(); + if (getWorkerIdsCount() > 0) { + hash = (37 * hash) + WORKER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getWorkerIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GetGuestAttributesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetGuestAttributesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GetGuestAttributesRequest) + com.google.cloud.tpu.v2.GetGuestAttributesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetGuestAttributesRequest.class, com.google.cloud.tpu.v2.GetGuestAttributesRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GetGuestAttributesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + queryPath_ = ""; + + workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GetGuestAttributesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesRequest build() { + com.google.cloud.tpu.v2.GetGuestAttributesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesRequest buildPartial() { + com.google.cloud.tpu.v2.GetGuestAttributesRequest result = new com.google.cloud.tpu.v2.GetGuestAttributesRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.queryPath_ = queryPath_; + if (((bitField0_ & 0x00000001) != 0)) { + workerIds_ = workerIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.workerIds_ = workerIds_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GetGuestAttributesRequest) { + return mergeFrom((com.google.cloud.tpu.v2.GetGuestAttributesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GetGuestAttributesRequest other) { + if (other == com.google.cloud.tpu.v2.GetGuestAttributesRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getQueryPath().isEmpty()) { + queryPath_ = other.queryPath_; + onChanged(); + } + if (!other.workerIds_.isEmpty()) { + if (workerIds_.isEmpty()) { + workerIds_ = other.workerIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWorkerIdsIsMutable(); + workerIds_.addAll(other.workerIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + queryPath_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureWorkerIdsIsMutable(); + workerIds_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object queryPath_ = ""; + /** + *
+     * The guest attributes path to be queried.
+     * 
+ * + * string query_path = 2; + * @return The queryPath. + */ + public java.lang.String getQueryPath() { + java.lang.Object ref = queryPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The guest attributes path to be queried.
+     * 
+ * + * string query_path = 2; + * @return The bytes for queryPath. + */ + public com.google.protobuf.ByteString + getQueryPathBytes() { + java.lang.Object ref = queryPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queryPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The guest attributes path to be queried.
+     * 
+ * + * string query_path = 2; + * @param value The queryPath to set. + * @return This builder for chaining. + */ + public Builder setQueryPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + queryPath_ = value; + onChanged(); + return this; + } + /** + *
+     * The guest attributes path to be queried.
+     * 
+ * + * string query_path = 2; + * @return This builder for chaining. + */ + public Builder clearQueryPath() { + + queryPath_ = getDefaultInstance().getQueryPath(); + onChanged(); + return this; + } + /** + *
+     * The guest attributes path to be queried.
+     * 
+ * + * string query_path = 2; + * @param value The bytes for queryPath to set. + * @return This builder for chaining. + */ + public Builder setQueryPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + queryPath_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureWorkerIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + workerIds_ = new com.google.protobuf.LazyStringArrayList(workerIds_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @return A list containing the workerIds. + */ + public com.google.protobuf.ProtocolStringList + getWorkerIdsList() { + return workerIds_.getUnmodifiableView(); + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @return The count of workerIds. + */ + public int getWorkerIdsCount() { + return workerIds_.size(); + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @param index The index of the element to return. + * @return The workerIds at the given index. + */ + public java.lang.String getWorkerIds(int index) { + return workerIds_.get(index); + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @param index The index of the value to return. + * @return The bytes of the workerIds at the given index. + */ + public com.google.protobuf.ByteString + getWorkerIdsBytes(int index) { + return workerIds_.getByteString(index); + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @param index The index to set the value at. + * @param value The workerIds to set. + * @return This builder for chaining. + */ + public Builder setWorkerIds( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerIdsIsMutable(); + workerIds_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @param value The workerIds to add. + * @return This builder for chaining. + */ + public Builder addWorkerIds( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerIdsIsMutable(); + workerIds_.add(value); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @param values The workerIds to add. + * @return This builder for chaining. + */ + public Builder addAllWorkerIds( + java.lang.Iterable values) { + ensureWorkerIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, workerIds_); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @return This builder for chaining. + */ + public Builder clearWorkerIds() { + workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+     * returned.
+     * 
+ * + * repeated string worker_ids = 3; + * @param value The bytes of the workerIds to add. + * @return This builder for chaining. + */ + public Builder addWorkerIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWorkerIdsIsMutable(); + workerIds_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GetGuestAttributesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GetGuestAttributesRequest) + private static final com.google.cloud.tpu.v2.GetGuestAttributesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GetGuestAttributesRequest(); + } + + public static com.google.cloud.tpu.v2.GetGuestAttributesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGuestAttributesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequestOrBuilder.java new file mode 100644 index 000000000000..44bbc25641b8 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesRequestOrBuilder.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GetGuestAttributesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GetGuestAttributesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The guest attributes path to be queried.
+   * 
+ * + * string query_path = 2; + * @return The queryPath. + */ + java.lang.String getQueryPath(); + /** + *
+   * The guest attributes path to be queried.
+   * 
+ * + * string query_path = 2; + * @return The bytes for queryPath. + */ + com.google.protobuf.ByteString + getQueryPathBytes(); + + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @return A list containing the workerIds. + */ + java.util.List + getWorkerIdsList(); + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @return The count of workerIds. + */ + int getWorkerIdsCount(); + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @param index The index of the element to return. + * @return The workerIds at the given index. + */ + java.lang.String getWorkerIds(int index); + /** + *
+   * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
+   * returned.
+   * 
+ * + * repeated string worker_ids = 3; + * @param index The index of the value to return. + * @return The bytes of the workerIds at the given index. + */ + com.google.protobuf.ByteString + getWorkerIdsBytes(int index); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponse.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponse.java new file mode 100644 index 000000000000..080f0d24b494 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponse.java @@ -0,0 +1,852 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Response for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetGuestAttributesResponse} + */ +public final class GetGuestAttributesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GetGuestAttributesResponse) + GetGuestAttributesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetGuestAttributesResponse.newBuilder() to construct. + private GetGuestAttributesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetGuestAttributesResponse() { + guestAttributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetGuestAttributesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetGuestAttributesResponse.class, com.google.cloud.tpu.v2.GetGuestAttributesResponse.Builder.class); + } + + public static final int GUEST_ATTRIBUTES_FIELD_NUMBER = 1; + private java.util.List guestAttributes_; + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + @java.lang.Override + public java.util.List getGuestAttributesList() { + return guestAttributes_; + } + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + @java.lang.Override + public java.util.List + getGuestAttributesOrBuilderList() { + return guestAttributes_; + } + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + @java.lang.Override + public int getGuestAttributesCount() { + return guestAttributes_.size(); + } + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributes getGuestAttributes(int index) { + return guestAttributes_.get(index); + } + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesOrBuilder getGuestAttributesOrBuilder( + int index) { + return guestAttributes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < guestAttributes_.size(); i++) { + output.writeMessage(1, guestAttributes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < guestAttributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, guestAttributes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GetGuestAttributesResponse)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GetGuestAttributesResponse other = (com.google.cloud.tpu.v2.GetGuestAttributesResponse) obj; + + if (!getGuestAttributesList() + .equals(other.getGuestAttributesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGuestAttributesCount() > 0) { + hash = (37 * hash) + GUEST_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getGuestAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GetGuestAttributesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetGuestAttributesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GetGuestAttributesResponse) + com.google.cloud.tpu.v2.GetGuestAttributesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetGuestAttributesResponse.class, com.google.cloud.tpu.v2.GetGuestAttributesResponse.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GetGuestAttributesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (guestAttributesBuilder_ == null) { + guestAttributes_ = java.util.Collections.emptyList(); + } else { + guestAttributes_ = null; + guestAttributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetGuestAttributesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesResponse getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GetGuestAttributesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesResponse build() { + com.google.cloud.tpu.v2.GetGuestAttributesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesResponse buildPartial() { + com.google.cloud.tpu.v2.GetGuestAttributesResponse result = new com.google.cloud.tpu.v2.GetGuestAttributesResponse(this); + int from_bitField0_ = bitField0_; + if (guestAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + guestAttributes_ = java.util.Collections.unmodifiableList(guestAttributes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.guestAttributes_ = guestAttributes_; + } else { + result.guestAttributes_ = guestAttributesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GetGuestAttributesResponse) { + return mergeFrom((com.google.cloud.tpu.v2.GetGuestAttributesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GetGuestAttributesResponse other) { + if (other == com.google.cloud.tpu.v2.GetGuestAttributesResponse.getDefaultInstance()) return this; + if (guestAttributesBuilder_ == null) { + if (!other.guestAttributes_.isEmpty()) { + if (guestAttributes_.isEmpty()) { + guestAttributes_ = other.guestAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGuestAttributesIsMutable(); + guestAttributes_.addAll(other.guestAttributes_); + } + onChanged(); + } + } else { + if (!other.guestAttributes_.isEmpty()) { + if (guestAttributesBuilder_.isEmpty()) { + guestAttributesBuilder_.dispose(); + guestAttributesBuilder_ = null; + guestAttributes_ = other.guestAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + guestAttributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGuestAttributesFieldBuilder() : null; + } else { + guestAttributesBuilder_.addAllMessages(other.guestAttributes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.tpu.v2.GuestAttributes m = + input.readMessage( + com.google.cloud.tpu.v2.GuestAttributes.parser(), + extensionRegistry); + if (guestAttributesBuilder_ == null) { + ensureGuestAttributesIsMutable(); + guestAttributes_.add(m); + } else { + guestAttributesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List guestAttributes_ = + java.util.Collections.emptyList(); + private void ensureGuestAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + guestAttributes_ = new java.util.ArrayList(guestAttributes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributes, com.google.cloud.tpu.v2.GuestAttributes.Builder, com.google.cloud.tpu.v2.GuestAttributesOrBuilder> guestAttributesBuilder_; + + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public java.util.List getGuestAttributesList() { + if (guestAttributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestAttributes_); + } else { + return guestAttributesBuilder_.getMessageList(); + } + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public int getGuestAttributesCount() { + if (guestAttributesBuilder_ == null) { + return guestAttributes_.size(); + } else { + return guestAttributesBuilder_.getCount(); + } + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributes getGuestAttributes(int index) { + if (guestAttributesBuilder_ == null) { + return guestAttributes_.get(index); + } else { + return guestAttributesBuilder_.getMessage(index); + } + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder setGuestAttributes( + int index, com.google.cloud.tpu.v2.GuestAttributes value) { + if (guestAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAttributesIsMutable(); + guestAttributes_.set(index, value); + onChanged(); + } else { + guestAttributesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder setGuestAttributes( + int index, com.google.cloud.tpu.v2.GuestAttributes.Builder builderForValue) { + if (guestAttributesBuilder_ == null) { + ensureGuestAttributesIsMutable(); + guestAttributes_.set(index, builderForValue.build()); + onChanged(); + } else { + guestAttributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder addGuestAttributes(com.google.cloud.tpu.v2.GuestAttributes value) { + if (guestAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAttributesIsMutable(); + guestAttributes_.add(value); + onChanged(); + } else { + guestAttributesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder addGuestAttributes( + int index, com.google.cloud.tpu.v2.GuestAttributes value) { + if (guestAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAttributesIsMutable(); + guestAttributes_.add(index, value); + onChanged(); + } else { + guestAttributesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder addGuestAttributes( + com.google.cloud.tpu.v2.GuestAttributes.Builder builderForValue) { + if (guestAttributesBuilder_ == null) { + ensureGuestAttributesIsMutable(); + guestAttributes_.add(builderForValue.build()); + onChanged(); + } else { + guestAttributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder addGuestAttributes( + int index, com.google.cloud.tpu.v2.GuestAttributes.Builder builderForValue) { + if (guestAttributesBuilder_ == null) { + ensureGuestAttributesIsMutable(); + guestAttributes_.add(index, builderForValue.build()); + onChanged(); + } else { + guestAttributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder addAllGuestAttributes( + java.lang.Iterable values) { + if (guestAttributesBuilder_ == null) { + ensureGuestAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, guestAttributes_); + onChanged(); + } else { + guestAttributesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder clearGuestAttributes() { + if (guestAttributesBuilder_ == null) { + guestAttributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + guestAttributesBuilder_.clear(); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public Builder removeGuestAttributes(int index) { + if (guestAttributesBuilder_ == null) { + ensureGuestAttributesIsMutable(); + guestAttributes_.remove(index); + onChanged(); + } else { + guestAttributesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributes.Builder getGuestAttributesBuilder( + int index) { + return getGuestAttributesFieldBuilder().getBuilder(index); + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributesOrBuilder getGuestAttributesOrBuilder( + int index) { + if (guestAttributesBuilder_ == null) { + return guestAttributes_.get(index); } else { + return guestAttributesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public java.util.List + getGuestAttributesOrBuilderList() { + if (guestAttributesBuilder_ != null) { + return guestAttributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestAttributes_); + } + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributes.Builder addGuestAttributesBuilder() { + return getGuestAttributesFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.GuestAttributes.getDefaultInstance()); + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributes.Builder addGuestAttributesBuilder( + int index) { + return getGuestAttributesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.GuestAttributes.getDefaultInstance()); + } + /** + *
+     * The guest attributes for the TPU workers.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + public java.util.List + getGuestAttributesBuilderList() { + return getGuestAttributesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributes, com.google.cloud.tpu.v2.GuestAttributes.Builder, com.google.cloud.tpu.v2.GuestAttributesOrBuilder> + getGuestAttributesFieldBuilder() { + if (guestAttributesBuilder_ == null) { + guestAttributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributes, com.google.cloud.tpu.v2.GuestAttributes.Builder, com.google.cloud.tpu.v2.GuestAttributesOrBuilder>( + guestAttributes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + guestAttributes_ = null; + } + return guestAttributesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GetGuestAttributesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GetGuestAttributesResponse) + private static final com.google.cloud.tpu.v2.GetGuestAttributesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GetGuestAttributesResponse(); + } + + public static com.google.cloud.tpu.v2.GetGuestAttributesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGuestAttributesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetGuestAttributesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponseOrBuilder.java new file mode 100644 index 000000000000..afa7ad329188 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetGuestAttributesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GetGuestAttributesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GetGuestAttributesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + java.util.List + getGuestAttributesList(); + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + com.google.cloud.tpu.v2.GuestAttributes getGuestAttributes(int index); + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + int getGuestAttributesCount(); + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + java.util.List + getGuestAttributesOrBuilderList(); + /** + *
+   * The guest attributes for the TPU workers.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + com.google.cloud.tpu.v2.GuestAttributesOrBuilder getGuestAttributesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequest.java new file mode 100644 index 000000000000..b6e746766547 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [GetNode][google.cloud.tpu.v2.Tpu.GetNode].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetNodeRequest} + */ +public final class GetNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GetNodeRequest) + GetNodeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetNodeRequest.newBuilder() to construct. + private GetNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNodeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNodeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetNodeRequest.class, com.google.cloud.tpu.v2.GetNodeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GetNodeRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GetNodeRequest other = (com.google.cloud.tpu.v2.GetNodeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GetNodeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [GetNode][google.cloud.tpu.v2.Tpu.GetNode].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetNodeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GetNodeRequest) + com.google.cloud.tpu.v2.GetNodeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetNodeRequest.class, com.google.cloud.tpu.v2.GetNodeRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GetNodeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetNodeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetNodeRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GetNodeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetNodeRequest build() { + com.google.cloud.tpu.v2.GetNodeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetNodeRequest buildPartial() { + com.google.cloud.tpu.v2.GetNodeRequest result = new com.google.cloud.tpu.v2.GetNodeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GetNodeRequest) { + return mergeFrom((com.google.cloud.tpu.v2.GetNodeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GetNodeRequest other) { + if (other == com.google.cloud.tpu.v2.GetNodeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GetNodeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GetNodeRequest) + private static final com.google.cloud.tpu.v2.GetNodeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GetNodeRequest(); + } + + public static com.google.cloud.tpu.v2.GetNodeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetNodeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequestOrBuilder.java new file mode 100644 index 000000000000..6bae23e0b880 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GetNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GetNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequest.java new file mode 100644 index 000000000000..805545e30ac8 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [GetRuntimeVersion][google.cloud.tpu.v2.Tpu.GetRuntimeVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetRuntimeVersionRequest} + */ +public final class GetRuntimeVersionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GetRuntimeVersionRequest) + GetRuntimeVersionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetRuntimeVersionRequest.newBuilder() to construct. + private GetRuntimeVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRuntimeVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRuntimeVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetRuntimeVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetRuntimeVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetRuntimeVersionRequest.class, com.google.cloud.tpu.v2.GetRuntimeVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GetRuntimeVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GetRuntimeVersionRequest other = (com.google.cloud.tpu.v2.GetRuntimeVersionRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GetRuntimeVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [GetRuntimeVersion][google.cloud.tpu.v2.Tpu.GetRuntimeVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GetRuntimeVersionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GetRuntimeVersionRequest) + com.google.cloud.tpu.v2.GetRuntimeVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetRuntimeVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetRuntimeVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GetRuntimeVersionRequest.class, com.google.cloud.tpu.v2.GetRuntimeVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GetRuntimeVersionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GetRuntimeVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetRuntimeVersionRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GetRuntimeVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetRuntimeVersionRequest build() { + com.google.cloud.tpu.v2.GetRuntimeVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetRuntimeVersionRequest buildPartial() { + com.google.cloud.tpu.v2.GetRuntimeVersionRequest result = new com.google.cloud.tpu.v2.GetRuntimeVersionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GetRuntimeVersionRequest) { + return mergeFrom((com.google.cloud.tpu.v2.GetRuntimeVersionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GetRuntimeVersionRequest other) { + if (other == com.google.cloud.tpu.v2.GetRuntimeVersionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GetRuntimeVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GetRuntimeVersionRequest) + private static final com.google.cloud.tpu.v2.GetRuntimeVersionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GetRuntimeVersionRequest(); + } + + public static com.google.cloud.tpu.v2.GetRuntimeVersionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRuntimeVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GetRuntimeVersionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequestOrBuilder.java new file mode 100644 index 000000000000..820c8b99c5cc --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GetRuntimeVersionRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GetRuntimeVersionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GetRuntimeVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributes.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributes.java new file mode 100644 index 000000000000..05f9ed11afa2 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributes.java @@ -0,0 +1,818 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A guest attributes.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GuestAttributes} + */ +public final class GuestAttributes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GuestAttributes) + GuestAttributesOrBuilder { +private static final long serialVersionUID = 0L; + // Use GuestAttributes.newBuilder() to construct. + private GuestAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GuestAttributes() { + queryPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GuestAttributes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GuestAttributes.class, com.google.cloud.tpu.v2.GuestAttributes.Builder.class); + } + + public static final int QUERY_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object queryPath_; + /** + *
+   * The path to be queried. This can be the default namespace ('/') or a
+   * nested namespace ('/\<namespace\>/') or a specified key
+   * ('/\<namespace\>/\<key\>')
+   * 
+ * + * string query_path = 1; + * @return The queryPath. + */ + @java.lang.Override + public java.lang.String getQueryPath() { + java.lang.Object ref = queryPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryPath_ = s; + return s; + } + } + /** + *
+   * The path to be queried. This can be the default namespace ('/') or a
+   * nested namespace ('/\<namespace\>/') or a specified key
+   * ('/\<namespace\>/\<key\>')
+   * 
+ * + * string query_path = 1; + * @return The bytes for queryPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryPathBytes() { + java.lang.Object ref = queryPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queryPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_VALUE_FIELD_NUMBER = 2; + private com.google.cloud.tpu.v2.GuestAttributesValue queryValue_; + /** + *
+   * The value of the requested queried path.
+   * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @return Whether the queryValue field is set. + */ + @java.lang.Override + public boolean hasQueryValue() { + return queryValue_ != null; + } + /** + *
+   * The value of the requested queried path.
+   * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @return The queryValue. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesValue getQueryValue() { + return queryValue_ == null ? com.google.cloud.tpu.v2.GuestAttributesValue.getDefaultInstance() : queryValue_; + } + /** + *
+   * The value of the requested queried path.
+   * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesValueOrBuilder getQueryValueOrBuilder() { + return getQueryValue(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryPath_); + } + if (queryValue_ != null) { + output.writeMessage(2, getQueryValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryPath_); + } + if (queryValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getQueryValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GuestAttributes)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GuestAttributes other = (com.google.cloud.tpu.v2.GuestAttributes) obj; + + if (!getQueryPath() + .equals(other.getQueryPath())) return false; + if (hasQueryValue() != other.hasQueryValue()) return false; + if (hasQueryValue()) { + if (!getQueryValue() + .equals(other.getQueryValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUERY_PATH_FIELD_NUMBER; + hash = (53 * hash) + getQueryPath().hashCode(); + if (hasQueryValue()) { + hash = (37 * hash) + QUERY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getQueryValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GuestAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A guest attributes.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GuestAttributes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GuestAttributes) + com.google.cloud.tpu.v2.GuestAttributesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GuestAttributes.class, com.google.cloud.tpu.v2.GuestAttributes.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GuestAttributes.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + queryPath_ = ""; + + if (queryValueBuilder_ == null) { + queryValue_ = null; + } else { + queryValue_ = null; + queryValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributes_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributes getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GuestAttributes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributes build() { + com.google.cloud.tpu.v2.GuestAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributes buildPartial() { + com.google.cloud.tpu.v2.GuestAttributes result = new com.google.cloud.tpu.v2.GuestAttributes(this); + result.queryPath_ = queryPath_; + if (queryValueBuilder_ == null) { + result.queryValue_ = queryValue_; + } else { + result.queryValue_ = queryValueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GuestAttributes) { + return mergeFrom((com.google.cloud.tpu.v2.GuestAttributes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GuestAttributes other) { + if (other == com.google.cloud.tpu.v2.GuestAttributes.getDefaultInstance()) return this; + if (!other.getQueryPath().isEmpty()) { + queryPath_ = other.queryPath_; + onChanged(); + } + if (other.hasQueryValue()) { + mergeQueryValue(other.getQueryValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + queryPath_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + input.readMessage( + getQueryValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object queryPath_ = ""; + /** + *
+     * The path to be queried. This can be the default namespace ('/') or a
+     * nested namespace ('/\<namespace\>/') or a specified key
+     * ('/\<namespace\>/\<key\>')
+     * 
+ * + * string query_path = 1; + * @return The queryPath. + */ + public java.lang.String getQueryPath() { + java.lang.Object ref = queryPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The path to be queried. This can be the default namespace ('/') or a
+     * nested namespace ('/\<namespace\>/') or a specified key
+     * ('/\<namespace\>/\<key\>')
+     * 
+ * + * string query_path = 1; + * @return The bytes for queryPath. + */ + public com.google.protobuf.ByteString + getQueryPathBytes() { + java.lang.Object ref = queryPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queryPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The path to be queried. This can be the default namespace ('/') or a
+     * nested namespace ('/\<namespace\>/') or a specified key
+     * ('/\<namespace\>/\<key\>')
+     * 
+ * + * string query_path = 1; + * @param value The queryPath to set. + * @return This builder for chaining. + */ + public Builder setQueryPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + queryPath_ = value; + onChanged(); + return this; + } + /** + *
+     * The path to be queried. This can be the default namespace ('/') or a
+     * nested namespace ('/\<namespace\>/') or a specified key
+     * ('/\<namespace\>/\<key\>')
+     * 
+ * + * string query_path = 1; + * @return This builder for chaining. + */ + public Builder clearQueryPath() { + + queryPath_ = getDefaultInstance().getQueryPath(); + onChanged(); + return this; + } + /** + *
+     * The path to be queried. This can be the default namespace ('/') or a
+     * nested namespace ('/\<namespace\>/') or a specified key
+     * ('/\<namespace\>/\<key\>')
+     * 
+ * + * string query_path = 1; + * @param value The bytes for queryPath to set. + * @return This builder for chaining. + */ + public Builder setQueryPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + queryPath_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2.GuestAttributesValue queryValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributesValue, com.google.cloud.tpu.v2.GuestAttributesValue.Builder, com.google.cloud.tpu.v2.GuestAttributesValueOrBuilder> queryValueBuilder_; + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @return Whether the queryValue field is set. + */ + public boolean hasQueryValue() { + return queryValueBuilder_ != null || queryValue_ != null; + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @return The queryValue. + */ + public com.google.cloud.tpu.v2.GuestAttributesValue getQueryValue() { + if (queryValueBuilder_ == null) { + return queryValue_ == null ? com.google.cloud.tpu.v2.GuestAttributesValue.getDefaultInstance() : queryValue_; + } else { + return queryValueBuilder_.getMessage(); + } + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + public Builder setQueryValue(com.google.cloud.tpu.v2.GuestAttributesValue value) { + if (queryValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryValue_ = value; + onChanged(); + } else { + queryValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + public Builder setQueryValue( + com.google.cloud.tpu.v2.GuestAttributesValue.Builder builderForValue) { + if (queryValueBuilder_ == null) { + queryValue_ = builderForValue.build(); + onChanged(); + } else { + queryValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + public Builder mergeQueryValue(com.google.cloud.tpu.v2.GuestAttributesValue value) { + if (queryValueBuilder_ == null) { + if (queryValue_ != null) { + queryValue_ = + com.google.cloud.tpu.v2.GuestAttributesValue.newBuilder(queryValue_).mergeFrom(value).buildPartial(); + } else { + queryValue_ = value; + } + onChanged(); + } else { + queryValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + public Builder clearQueryValue() { + if (queryValueBuilder_ == null) { + queryValue_ = null; + onChanged(); + } else { + queryValue_ = null; + queryValueBuilder_ = null; + } + + return this; + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + public com.google.cloud.tpu.v2.GuestAttributesValue.Builder getQueryValueBuilder() { + + onChanged(); + return getQueryValueFieldBuilder().getBuilder(); + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + public com.google.cloud.tpu.v2.GuestAttributesValueOrBuilder getQueryValueOrBuilder() { + if (queryValueBuilder_ != null) { + return queryValueBuilder_.getMessageOrBuilder(); + } else { + return queryValue_ == null ? + com.google.cloud.tpu.v2.GuestAttributesValue.getDefaultInstance() : queryValue_; + } + } + /** + *
+     * The value of the requested queried path.
+     * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributesValue, com.google.cloud.tpu.v2.GuestAttributesValue.Builder, com.google.cloud.tpu.v2.GuestAttributesValueOrBuilder> + getQueryValueFieldBuilder() { + if (queryValueBuilder_ == null) { + queryValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributesValue, com.google.cloud.tpu.v2.GuestAttributesValue.Builder, com.google.cloud.tpu.v2.GuestAttributesValueOrBuilder>( + getQueryValue(), + getParentForChildren(), + isClean()); + queryValue_ = null; + } + return queryValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GuestAttributes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GuestAttributes) + private static final com.google.cloud.tpu.v2.GuestAttributes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GuestAttributes(); + } + + public static com.google.cloud.tpu.v2.GuestAttributes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntry.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntry.java new file mode 100644 index 000000000000..d00e6eb7eb3e --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntry.java @@ -0,0 +1,904 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A guest attributes namespace/key/value entry.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GuestAttributesEntry} + */ +public final class GuestAttributesEntry extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GuestAttributesEntry) + GuestAttributesEntryOrBuilder { +private static final long serialVersionUID = 0L; + // Use GuestAttributesEntry.newBuilder() to construct. + private GuestAttributesEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GuestAttributesEntry() { + namespace_ = ""; + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GuestAttributesEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GuestAttributesEntry.class, com.google.cloud.tpu.v2.GuestAttributesEntry.Builder.class); + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + private volatile java.lang.Object namespace_; + /** + *
+   * Namespace for the guest attribute entry.
+   * 
+ * + * string namespace = 1; + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } + } + /** + *
+   * Namespace for the guest attribute entry.
+   * 
+ * + * string namespace = 1; + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object key_; + /** + *
+   * Key for the guest attribute entry.
+   * 
+ * + * string key = 2; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+   * Key for the guest attribute entry.
+   * 
+ * + * string key = 2; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 3; + private volatile java.lang.Object value_; + /** + *
+   * Value for the guest attribute entry.
+   * 
+ * + * string value = 3; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value for the guest attribute entry.
+   * 
+ * + * string value = 3; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GuestAttributesEntry)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GuestAttributesEntry other = (com.google.cloud.tpu.v2.GuestAttributesEntry) obj; + + if (!getNamespace() + .equals(other.getNamespace())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributesEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GuestAttributesEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A guest attributes namespace/key/value entry.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GuestAttributesEntry} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GuestAttributesEntry) + com.google.cloud.tpu.v2.GuestAttributesEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GuestAttributesEntry.class, com.google.cloud.tpu.v2.GuestAttributesEntry.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GuestAttributesEntry.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + namespace_ = ""; + + key_ = ""; + + value_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesEntry getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GuestAttributesEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesEntry build() { + com.google.cloud.tpu.v2.GuestAttributesEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesEntry buildPartial() { + com.google.cloud.tpu.v2.GuestAttributesEntry result = new com.google.cloud.tpu.v2.GuestAttributesEntry(this); + result.namespace_ = namespace_; + result.key_ = key_; + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GuestAttributesEntry) { + return mergeFrom((com.google.cloud.tpu.v2.GuestAttributesEntry)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GuestAttributesEntry other) { + if (other == com.google.cloud.tpu.v2.GuestAttributesEntry.getDefaultInstance()) return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + namespace_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + key_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + value_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object namespace_ = ""; + /** + *
+     * Namespace for the guest attribute entry.
+     * 
+ * + * string namespace = 1; + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Namespace for the guest attribute entry.
+     * 
+ * + * string namespace = 1; + * @return The bytes for namespace. + */ + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Namespace for the guest attribute entry.
+     * 
+ * + * string namespace = 1; + * @param value The namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespace( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + namespace_ = value; + onChanged(); + return this; + } + /** + *
+     * Namespace for the guest attribute entry.
+     * 
+ * + * string namespace = 1; + * @return This builder for chaining. + */ + public Builder clearNamespace() { + + namespace_ = getDefaultInstance().getNamespace(); + onChanged(); + return this; + } + /** + *
+     * Namespace for the guest attribute entry.
+     * 
+ * + * string namespace = 1; + * @param value The bytes for namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespaceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + namespace_ = value; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+     * Key for the guest attribute entry.
+     * 
+ * + * string key = 2; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Key for the guest attribute entry.
+     * 
+ * + * string key = 2; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Key for the guest attribute entry.
+     * 
+ * + * string key = 2; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+     * Key for the guest attribute entry.
+     * 
+ * + * string key = 2; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + *
+     * Key for the guest attribute entry.
+     * 
+ * + * string key = 2; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value for the guest attribute entry.
+     * 
+ * + * string value = 3; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value for the guest attribute entry.
+     * 
+ * + * string value = 3; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value for the guest attribute entry.
+     * 
+ * + * string value = 3; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value for the guest attribute entry.
+     * 
+ * + * string value = 3; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+     * Value for the guest attribute entry.
+     * 
+ * + * string value = 3; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GuestAttributesEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GuestAttributesEntry) + private static final com.google.cloud.tpu.v2.GuestAttributesEntry DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GuestAttributesEntry(); + } + + public static com.google.cloud.tpu.v2.GuestAttributesEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestAttributesEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntryOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntryOrBuilder.java new file mode 100644 index 000000000000..bb3037857cb7 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesEntryOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GuestAttributesEntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GuestAttributesEntry) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Namespace for the guest attribute entry.
+   * 
+ * + * string namespace = 1; + * @return The namespace. + */ + java.lang.String getNamespace(); + /** + *
+   * Namespace for the guest attribute entry.
+   * 
+ * + * string namespace = 1; + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString + getNamespaceBytes(); + + /** + *
+   * Key for the guest attribute entry.
+   * 
+ * + * string key = 2; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+   * Key for the guest attribute entry.
+   * 
+ * + * string key = 2; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+   * Value for the guest attribute entry.
+   * 
+ * + * string value = 3; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value for the guest attribute entry.
+   * 
+ * + * string value = 3; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesOrBuilder.java new file mode 100644 index 000000000000..fab75582bff6 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GuestAttributesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GuestAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The path to be queried. This can be the default namespace ('/') or a
+   * nested namespace ('/\<namespace\>/') or a specified key
+   * ('/\<namespace\>/\<key\>')
+   * 
+ * + * string query_path = 1; + * @return The queryPath. + */ + java.lang.String getQueryPath(); + /** + *
+   * The path to be queried. This can be the default namespace ('/') or a
+   * nested namespace ('/\<namespace\>/') or a specified key
+   * ('/\<namespace\>/\<key\>')
+   * 
+ * + * string query_path = 1; + * @return The bytes for queryPath. + */ + com.google.protobuf.ByteString + getQueryPathBytes(); + + /** + *
+   * The value of the requested queried path.
+   * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @return Whether the queryValue field is set. + */ + boolean hasQueryValue(); + /** + *
+   * The value of the requested queried path.
+   * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @return The queryValue. + */ + com.google.cloud.tpu.v2.GuestAttributesValue getQueryValue(); + /** + *
+   * The value of the requested queried path.
+   * 
+ * + * .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + com.google.cloud.tpu.v2.GuestAttributesValueOrBuilder getQueryValueOrBuilder(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValue.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValue.java new file mode 100644 index 000000000000..985aa2058120 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValue.java @@ -0,0 +1,852 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Array of guest attribute namespace/key/value tuples.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GuestAttributesValue} + */ +public final class GuestAttributesValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.GuestAttributesValue) + GuestAttributesValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use GuestAttributesValue.newBuilder() to construct. + private GuestAttributesValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GuestAttributesValue() { + items_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GuestAttributesValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GuestAttributesValue.class, com.google.cloud.tpu.v2.GuestAttributesValue.Builder.class); + } + + public static final int ITEMS_FIELD_NUMBER = 1; + private java.util.List items_; + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + @java.lang.Override + public java.util.List getItemsList() { + return items_; + } + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + @java.lang.Override + public java.util.List + getItemsOrBuilderList() { + return items_; + } + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + @java.lang.Override + public int getItemsCount() { + return items_.size(); + } + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesEntry getItems(int index) { + return items_.get(index); + } + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesEntryOrBuilder getItemsOrBuilder( + int index) { + return items_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < items_.size(); i++) { + output.writeMessage(1, items_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, items_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.GuestAttributesValue)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.GuestAttributesValue other = (com.google.cloud.tpu.v2.GuestAttributesValue) obj; + + if (!getItemsList() + .equals(other.getItemsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.GuestAttributesValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.GuestAttributesValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Array of guest attribute namespace/key/value tuples.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.GuestAttributesValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.GuestAttributesValue) + com.google.cloud.tpu.v2.GuestAttributesValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.GuestAttributesValue.class, com.google.cloud.tpu.v2.GuestAttributesValue.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.GuestAttributesValue.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + } else { + items_ = null; + itemsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_GuestAttributesValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesValue getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.GuestAttributesValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesValue build() { + com.google.cloud.tpu.v2.GuestAttributesValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesValue buildPartial() { + com.google.cloud.tpu.v2.GuestAttributesValue result = new com.google.cloud.tpu.v2.GuestAttributesValue(this); + int from_bitField0_ = bitField0_; + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.GuestAttributesValue) { + return mergeFrom((com.google.cloud.tpu.v2.GuestAttributesValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.GuestAttributesValue other) { + if (other == com.google.cloud.tpu.v2.GuestAttributesValue.getDefaultInstance()) return this; + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getItemsFieldBuilder() : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.tpu.v2.GuestAttributesEntry m = + input.readMessage( + com.google.cloud.tpu.v2.GuestAttributesEntry.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List items_ = + java.util.Collections.emptyList(); + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + items_ = new java.util.ArrayList(items_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributesEntry, com.google.cloud.tpu.v2.GuestAttributesEntry.Builder, com.google.cloud.tpu.v2.GuestAttributesEntryOrBuilder> itemsBuilder_; + + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public java.util.List getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributesEntry getItems(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder setItems( + int index, com.google.cloud.tpu.v2.GuestAttributesEntry value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder setItems( + int index, com.google.cloud.tpu.v2.GuestAttributesEntry.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder addItems(com.google.cloud.tpu.v2.GuestAttributesEntry value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder addItems( + int index, com.google.cloud.tpu.v2.GuestAttributesEntry value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder addItems( + com.google.cloud.tpu.v2.GuestAttributesEntry.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder addItems( + int index, com.google.cloud.tpu.v2.GuestAttributesEntry.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder addAllItems( + java.lang.Iterable values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributesEntry.Builder getItemsBuilder( + int index) { + return getItemsFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributesEntryOrBuilder getItemsOrBuilder( + int index) { + if (itemsBuilder_ == null) { + return items_.get(index); } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public java.util.List + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributesEntry.Builder addItemsBuilder() { + return getItemsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.GuestAttributesEntry.getDefaultInstance()); + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public com.google.cloud.tpu.v2.GuestAttributesEntry.Builder addItemsBuilder( + int index) { + return getItemsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.GuestAttributesEntry.getDefaultInstance()); + } + /** + *
+     * The list of guest attributes entries.
+     * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + public java.util.List + getItemsBuilderList() { + return getItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributesEntry, com.google.cloud.tpu.v2.GuestAttributesEntry.Builder, com.google.cloud.tpu.v2.GuestAttributesEntryOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.GuestAttributesEntry, com.google.cloud.tpu.v2.GuestAttributesEntry.Builder, com.google.cloud.tpu.v2.GuestAttributesEntryOrBuilder>( + items_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + items_ = null; + } + return itemsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.GuestAttributesValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.GuestAttributesValue) + private static final com.google.cloud.tpu.v2.GuestAttributesValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.GuestAttributesValue(); + } + + public static com.google.cloud.tpu.v2.GuestAttributesValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestAttributesValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.GuestAttributesValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValueOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValueOrBuilder.java new file mode 100644 index 000000000000..cae80b862b1d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/GuestAttributesValueOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface GuestAttributesValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.GuestAttributesValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + java.util.List + getItemsList(); + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + com.google.cloud.tpu.v2.GuestAttributesEntry getItems(int index); + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + int getItemsCount(); + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + java.util.List + getItemsOrBuilderList(); + /** + *
+   * The list of guest attributes entries.
+   * 
+ * + * repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + com.google.cloud.tpu.v2.GuestAttributesEntryOrBuilder getItemsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequest.java new file mode 100644 index 000000000000..74c4a0b10262 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequest.java @@ -0,0 +1,1149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListAcceleratorTypesRequest} + */ +public final class ListAcceleratorTypesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ListAcceleratorTypesRequest) + ListAcceleratorTypesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAcceleratorTypesRequest.newBuilder() to construct. + private ListAcceleratorTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAcceleratorTypesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAcceleratorTypesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.class, com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + private volatile java.lang.Object filter_; + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ListAcceleratorTypesRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest other = (com.google.cloud.tpu.v2.ListAcceleratorTypesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ListAcceleratorTypesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListAcceleratorTypesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ListAcceleratorTypesRequest) + com.google.cloud.tpu.v2.ListAcceleratorTypesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.class, com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesRequest build() { + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesRequest buildPartial() { + com.google.cloud.tpu.v2.ListAcceleratorTypesRequest result = new com.google.cloud.tpu.v2.ListAcceleratorTypesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ListAcceleratorTypesRequest) { + return mergeFrom((com.google.cloud.tpu.v2.ListAcceleratorTypesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ListAcceleratorTypesRequest other) { + if (other == com.google.cloud.tpu.v2.ListAcceleratorTypesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ListAcceleratorTypesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ListAcceleratorTypesRequest) + private static final com.google.cloud.tpu.v2.ListAcceleratorTypesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ListAcceleratorTypesRequest(); + } + + public static com.google.cloud.tpu.v2.ListAcceleratorTypesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAcceleratorTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequestOrBuilder.java new file mode 100644 index 000000000000..7a66cbd04c02 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesRequestOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ListAcceleratorTypesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ListAcceleratorTypesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponse.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponse.java new file mode 100644 index 000000000000..a3dfac70421e --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponse.java @@ -0,0 +1,1255 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Response for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListAcceleratorTypesResponse} + */ +public final class ListAcceleratorTypesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ListAcceleratorTypesResponse) + ListAcceleratorTypesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAcceleratorTypesResponse.newBuilder() to construct. + private ListAcceleratorTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAcceleratorTypesResponse() { + acceleratorTypes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAcceleratorTypesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.class, com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.Builder.class); + } + + public static final int ACCELERATOR_TYPES_FIELD_NUMBER = 1; + private java.util.List acceleratorTypes_; + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + @java.lang.Override + public java.util.List getAcceleratorTypesList() { + return acceleratorTypes_; + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + @java.lang.Override + public java.util.List + getAcceleratorTypesOrBuilderList() { + return acceleratorTypes_; + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + @java.lang.Override + public int getAcceleratorTypesCount() { + return acceleratorTypes_.size(); + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.AcceleratorType getAcceleratorTypes(int index) { + return acceleratorTypes_.get(index); + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( + int index) { + return acceleratorTypes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < acceleratorTypes_.size(); i++) { + output.writeMessage(1, acceleratorTypes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < acceleratorTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, acceleratorTypes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ListAcceleratorTypesResponse)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ListAcceleratorTypesResponse other = (com.google.cloud.tpu.v2.ListAcceleratorTypesResponse) obj; + + if (!getAcceleratorTypesList() + .equals(other.getAcceleratorTypesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAcceleratorTypesCount() > 0) { + hash = (37 * hash) + ACCELERATOR_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorTypesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ListAcceleratorTypesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListAcceleratorTypesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ListAcceleratorTypesResponse) + com.google.cloud.tpu.v2.ListAcceleratorTypesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.class, com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (acceleratorTypesBuilder_ == null) { + acceleratorTypes_ = java.util.Collections.emptyList(); + } else { + acceleratorTypes_ = null; + acceleratorTypesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListAcceleratorTypesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesResponse getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesResponse build() { + com.google.cloud.tpu.v2.ListAcceleratorTypesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesResponse buildPartial() { + com.google.cloud.tpu.v2.ListAcceleratorTypesResponse result = new com.google.cloud.tpu.v2.ListAcceleratorTypesResponse(this); + int from_bitField0_ = bitField0_; + if (acceleratorTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + acceleratorTypes_ = java.util.Collections.unmodifiableList(acceleratorTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.acceleratorTypes_ = acceleratorTypes_; + } else { + result.acceleratorTypes_ = acceleratorTypesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ListAcceleratorTypesResponse) { + return mergeFrom((com.google.cloud.tpu.v2.ListAcceleratorTypesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ListAcceleratorTypesResponse other) { + if (other == com.google.cloud.tpu.v2.ListAcceleratorTypesResponse.getDefaultInstance()) return this; + if (acceleratorTypesBuilder_ == null) { + if (!other.acceleratorTypes_.isEmpty()) { + if (acceleratorTypes_.isEmpty()) { + acceleratorTypes_ = other.acceleratorTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.addAll(other.acceleratorTypes_); + } + onChanged(); + } + } else { + if (!other.acceleratorTypes_.isEmpty()) { + if (acceleratorTypesBuilder_.isEmpty()) { + acceleratorTypesBuilder_.dispose(); + acceleratorTypesBuilder_ = null; + acceleratorTypes_ = other.acceleratorTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + acceleratorTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAcceleratorTypesFieldBuilder() : null; + } else { + acceleratorTypesBuilder_.addAllMessages(other.acceleratorTypes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.tpu.v2.AcceleratorType m = + input.readMessage( + com.google.cloud.tpu.v2.AcceleratorType.parser(), + extensionRegistry); + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(m); + } else { + acceleratorTypesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List acceleratorTypes_ = + java.util.Collections.emptyList(); + private void ensureAcceleratorTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + acceleratorTypes_ = new java.util.ArrayList(acceleratorTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.AcceleratorType, com.google.cloud.tpu.v2.AcceleratorType.Builder, com.google.cloud.tpu.v2.AcceleratorTypeOrBuilder> acceleratorTypesBuilder_; + + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public java.util.List getAcceleratorTypesList() { + if (acceleratorTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(acceleratorTypes_); + } else { + return acceleratorTypesBuilder_.getMessageList(); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public int getAcceleratorTypesCount() { + if (acceleratorTypesBuilder_ == null) { + return acceleratorTypes_.size(); + } else { + return acceleratorTypesBuilder_.getCount(); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public com.google.cloud.tpu.v2.AcceleratorType getAcceleratorTypes(int index) { + if (acceleratorTypesBuilder_ == null) { + return acceleratorTypes_.get(index); + } else { + return acceleratorTypesBuilder_.getMessage(index); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder setAcceleratorTypes( + int index, com.google.cloud.tpu.v2.AcceleratorType value) { + if (acceleratorTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.set(index, value); + onChanged(); + } else { + acceleratorTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder setAcceleratorTypes( + int index, com.google.cloud.tpu.v2.AcceleratorType.Builder builderForValue) { + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + acceleratorTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder addAcceleratorTypes(com.google.cloud.tpu.v2.AcceleratorType value) { + if (acceleratorTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(value); + onChanged(); + } else { + acceleratorTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder addAcceleratorTypes( + int index, com.google.cloud.tpu.v2.AcceleratorType value) { + if (acceleratorTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(index, value); + onChanged(); + } else { + acceleratorTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder addAcceleratorTypes( + com.google.cloud.tpu.v2.AcceleratorType.Builder builderForValue) { + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(builderForValue.build()); + onChanged(); + } else { + acceleratorTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder addAcceleratorTypes( + int index, com.google.cloud.tpu.v2.AcceleratorType.Builder builderForValue) { + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + acceleratorTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder addAllAcceleratorTypes( + java.lang.Iterable values) { + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, acceleratorTypes_); + onChanged(); + } else { + acceleratorTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder clearAcceleratorTypes() { + if (acceleratorTypesBuilder_ == null) { + acceleratorTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + acceleratorTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public Builder removeAcceleratorTypes(int index) { + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.remove(index); + onChanged(); + } else { + acceleratorTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public com.google.cloud.tpu.v2.AcceleratorType.Builder getAcceleratorTypesBuilder( + int index) { + return getAcceleratorTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public com.google.cloud.tpu.v2.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( + int index) { + if (acceleratorTypesBuilder_ == null) { + return acceleratorTypes_.get(index); } else { + return acceleratorTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public java.util.List + getAcceleratorTypesOrBuilderList() { + if (acceleratorTypesBuilder_ != null) { + return acceleratorTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(acceleratorTypes_); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public com.google.cloud.tpu.v2.AcceleratorType.Builder addAcceleratorTypesBuilder() { + return getAcceleratorTypesFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.AcceleratorType.getDefaultInstance()); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public com.google.cloud.tpu.v2.AcceleratorType.Builder addAcceleratorTypesBuilder( + int index) { + return getAcceleratorTypesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.AcceleratorType.getDefaultInstance()); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + public java.util.List + getAcceleratorTypesBuilderList() { + return getAcceleratorTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.AcceleratorType, com.google.cloud.tpu.v2.AcceleratorType.Builder, com.google.cloud.tpu.v2.AcceleratorTypeOrBuilder> + getAcceleratorTypesFieldBuilder() { + if (acceleratorTypesBuilder_ == null) { + acceleratorTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.AcceleratorType, com.google.cloud.tpu.v2.AcceleratorType.Builder, com.google.cloud.tpu.v2.AcceleratorTypeOrBuilder>( + acceleratorTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + acceleratorTypes_ = null; + } + return acceleratorTypesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ListAcceleratorTypesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ListAcceleratorTypesResponse) + private static final com.google.cloud.tpu.v2.ListAcceleratorTypesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ListAcceleratorTypesResponse(); + } + + public static com.google.cloud.tpu.v2.ListAcceleratorTypesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAcceleratorTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListAcceleratorTypesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponseOrBuilder.java new file mode 100644 index 000000000000..fe3ae29a5f41 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListAcceleratorTypesResponseOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ListAcceleratorTypesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ListAcceleratorTypesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + java.util.List + getAcceleratorTypesList(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + com.google.cloud.tpu.v2.AcceleratorType getAcceleratorTypes(int index); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + int getAcceleratorTypesCount(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + java.util.List + getAcceleratorTypesOrBuilderList(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + com.google.cloud.tpu.v2.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( + int index); + + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequest.java new file mode 100644 index 000000000000..0e3ae8518b37 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequest.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListNodesRequest} + */ +public final class ListNodesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ListNodesRequest) + ListNodesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNodesRequest.newBuilder() to construct. + private ListNodesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNodesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNodesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListNodesRequest.class, com.google.cloud.tpu.v2.ListNodesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ListNodesRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ListNodesRequest other = (com.google.cloud.tpu.v2.ListNodesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListNodesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ListNodesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListNodesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ListNodesRequest) + com.google.cloud.tpu.v2.ListNodesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListNodesRequest.class, com.google.cloud.tpu.v2.ListNodesRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ListNodesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ListNodesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesRequest build() { + com.google.cloud.tpu.v2.ListNodesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesRequest buildPartial() { + com.google.cloud.tpu.v2.ListNodesRequest result = new com.google.cloud.tpu.v2.ListNodesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ListNodesRequest) { + return mergeFrom((com.google.cloud.tpu.v2.ListNodesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ListNodesRequest other) { + if (other == com.google.cloud.tpu.v2.ListNodesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ListNodesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ListNodesRequest) + private static final com.google.cloud.tpu.v2.ListNodesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ListNodesRequest(); + } + + public static com.google.cloud.tpu.v2.ListNodesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNodesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequestOrBuilder.java new file mode 100644 index 000000000000..0db2dea1af0a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesRequestOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ListNodesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ListNodesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponse.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponse.java new file mode 100644 index 000000000000..31abf8cb6992 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponse.java @@ -0,0 +1,1255 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Response for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListNodesResponse} + */ +public final class ListNodesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ListNodesResponse) + ListNodesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNodesResponse.newBuilder() to construct. + private ListNodesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNodesResponse() { + nodes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNodesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListNodesResponse.class, com.google.cloud.tpu.v2.ListNodesResponse.Builder.class); + } + + public static final int NODES_FIELD_NUMBER = 1; + private java.util.List nodes_; + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + @java.lang.Override + public java.util.List getNodesList() { + return nodes_; + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + @java.lang.Override + public java.util.List + getNodesOrBuilderList() { + return nodes_; + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + @java.lang.Override + public int getNodesCount() { + return nodes_.size(); + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Node getNodes(int index) { + return nodes_.get(index); + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.NodeOrBuilder getNodesOrBuilder( + int index) { + return nodes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < nodes_.size(); i++) { + output.writeMessage(1, nodes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, nodes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ListNodesResponse)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ListNodesResponse other = (com.google.cloud.tpu.v2.ListNodesResponse) obj; + + if (!getNodesList() + .equals(other.getNodesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodesCount() > 0) { + hash = (37 * hash) + NODES_FIELD_NUMBER; + hash = (53 * hash) + getNodesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListNodesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ListNodesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListNodesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ListNodesResponse) + com.google.cloud.tpu.v2.ListNodesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListNodesResponse.class, com.google.cloud.tpu.v2.ListNodesResponse.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ListNodesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + } else { + nodes_ = null; + nodesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListNodesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesResponse getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ListNodesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesResponse build() { + com.google.cloud.tpu.v2.ListNodesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesResponse buildPartial() { + com.google.cloud.tpu.v2.ListNodesResponse result = new com.google.cloud.tpu.v2.ListNodesResponse(this); + int from_bitField0_ = bitField0_; + if (nodesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodes_ = nodes_; + } else { + result.nodes_ = nodesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ListNodesResponse) { + return mergeFrom((com.google.cloud.tpu.v2.ListNodesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ListNodesResponse other) { + if (other == com.google.cloud.tpu.v2.ListNodesResponse.getDefaultInstance()) return this; + if (nodesBuilder_ == null) { + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + } else { + if (!other.nodes_.isEmpty()) { + if (nodesBuilder_.isEmpty()) { + nodesBuilder_.dispose(); + nodesBuilder_ = null; + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodesFieldBuilder() : null; + } else { + nodesBuilder_.addAllMessages(other.nodes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.tpu.v2.Node m = + input.readMessage( + com.google.cloud.tpu.v2.Node.parser(), + extensionRegistry); + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(m); + } else { + nodesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List nodes_ = + java.util.Collections.emptyList(); + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodes_ = new java.util.ArrayList(nodes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder> nodesBuilder_; + + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); + } else { + return nodesBuilder_.getCount(); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public com.google.cloud.tpu.v2.Node getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessage(index); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder setNodes( + int index, com.google.cloud.tpu.v2.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + } else { + nodesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder setNodes( + int index, com.google.cloud.tpu.v2.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder addNodes(com.google.cloud.tpu.v2.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder addNodes( + int index, com.google.cloud.tpu.v2.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); + } else { + nodesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder addNodes( + com.google.cloud.tpu.v2.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder addNodes( + int index, com.google.cloud.tpu.v2.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodesBuilder_.clear(); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public com.google.cloud.tpu.v2.Node.Builder getNodesBuilder( + int index) { + return getNodesFieldBuilder().getBuilder(index); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public com.google.cloud.tpu.v2.NodeOrBuilder getNodesOrBuilder( + int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); } else { + return nodesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public com.google.cloud.tpu.v2.Node.Builder addNodesBuilder() { + return getNodesFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.Node.getDefaultInstance()); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public com.google.cloud.tpu.v2.Node.Builder addNodesBuilder( + int index) { + return getNodesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.Node.getDefaultInstance()); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + public java.util.List + getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder>( + nodes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nodes_ = null; + } + return nodesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ListNodesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ListNodesResponse) + private static final com.google.cloud.tpu.v2.ListNodesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ListNodesResponse(); + } + + public static com.google.cloud.tpu.v2.ListNodesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNodesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListNodesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponseOrBuilder.java new file mode 100644 index 000000000000..181e3d7fab71 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListNodesResponseOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ListNodesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ListNodesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + java.util.List + getNodesList(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + com.google.cloud.tpu.v2.Node getNodes(int index); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + int getNodesCount(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + java.util.List + getNodesOrBuilderList(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + com.google.cloud.tpu.v2.NodeOrBuilder getNodesOrBuilder( + int index); + + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequest.java new file mode 100644 index 000000000000..2e48ffbfa327 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequest.java @@ -0,0 +1,1149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListRuntimeVersionsRequest} + */ +public final class ListRuntimeVersionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ListRuntimeVersionsRequest) + ListRuntimeVersionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListRuntimeVersionsRequest.newBuilder() to construct. + private ListRuntimeVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListRuntimeVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListRuntimeVersionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.class, com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + private volatile java.lang.Object filter_; + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ListRuntimeVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest other = (com.google.cloud.tpu.v2.ListRuntimeVersionsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ListRuntimeVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListRuntimeVersionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ListRuntimeVersionsRequest) + com.google.cloud.tpu.v2.ListRuntimeVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.class, com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsRequest build() { + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsRequest buildPartial() { + com.google.cloud.tpu.v2.ListRuntimeVersionsRequest result = new com.google.cloud.tpu.v2.ListRuntimeVersionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ListRuntimeVersionsRequest) { + return mergeFrom((com.google.cloud.tpu.v2.ListRuntimeVersionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ListRuntimeVersionsRequest other) { + if (other == com.google.cloud.tpu.v2.ListRuntimeVersionsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Sort results.
+     * 
+ * + * string order_by = 6; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ListRuntimeVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ListRuntimeVersionsRequest) + private static final com.google.cloud.tpu.v2.ListRuntimeVersionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ListRuntimeVersionsRequest(); + } + + public static com.google.cloud.tpu.v2.ListRuntimeVersionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuntimeVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequestOrBuilder.java new file mode 100644 index 000000000000..546dcebb3803 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsRequestOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ListRuntimeVersionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ListRuntimeVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Sort results.
+   * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponse.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponse.java new file mode 100644 index 000000000000..3ad210342788 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponse.java @@ -0,0 +1,1255 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Response for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListRuntimeVersionsResponse} + */ +public final class ListRuntimeVersionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ListRuntimeVersionsResponse) + ListRuntimeVersionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListRuntimeVersionsResponse.newBuilder() to construct. + private ListRuntimeVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListRuntimeVersionsResponse() { + runtimeVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListRuntimeVersionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.class, com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.Builder.class); + } + + public static final int RUNTIME_VERSIONS_FIELD_NUMBER = 1; + private java.util.List runtimeVersions_; + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + @java.lang.Override + public java.util.List getRuntimeVersionsList() { + return runtimeVersions_; + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + @java.lang.Override + public java.util.List + getRuntimeVersionsOrBuilderList() { + return runtimeVersions_; + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + @java.lang.Override + public int getRuntimeVersionsCount() { + return runtimeVersions_.size(); + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.RuntimeVersion getRuntimeVersions(int index) { + return runtimeVersions_.get(index); + } + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.RuntimeVersionOrBuilder getRuntimeVersionsOrBuilder( + int index) { + return runtimeVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < runtimeVersions_.size(); i++) { + output.writeMessage(1, runtimeVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < runtimeVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, runtimeVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ListRuntimeVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ListRuntimeVersionsResponse other = (com.google.cloud.tpu.v2.ListRuntimeVersionsResponse) obj; + + if (!getRuntimeVersionsList() + .equals(other.getRuntimeVersionsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRuntimeVersionsCount() > 0) { + hash = (37 * hash) + RUNTIME_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ListRuntimeVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ListRuntimeVersionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ListRuntimeVersionsResponse) + com.google.cloud.tpu.v2.ListRuntimeVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.class, com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (runtimeVersionsBuilder_ == null) { + runtimeVersions_ = java.util.Collections.emptyList(); + } else { + runtimeVersions_ = null; + runtimeVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ListRuntimeVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsResponse getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsResponse build() { + com.google.cloud.tpu.v2.ListRuntimeVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsResponse buildPartial() { + com.google.cloud.tpu.v2.ListRuntimeVersionsResponse result = new com.google.cloud.tpu.v2.ListRuntimeVersionsResponse(this); + int from_bitField0_ = bitField0_; + if (runtimeVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + runtimeVersions_ = java.util.Collections.unmodifiableList(runtimeVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.runtimeVersions_ = runtimeVersions_; + } else { + result.runtimeVersions_ = runtimeVersionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ListRuntimeVersionsResponse) { + return mergeFrom((com.google.cloud.tpu.v2.ListRuntimeVersionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ListRuntimeVersionsResponse other) { + if (other == com.google.cloud.tpu.v2.ListRuntimeVersionsResponse.getDefaultInstance()) return this; + if (runtimeVersionsBuilder_ == null) { + if (!other.runtimeVersions_.isEmpty()) { + if (runtimeVersions_.isEmpty()) { + runtimeVersions_ = other.runtimeVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.addAll(other.runtimeVersions_); + } + onChanged(); + } + } else { + if (!other.runtimeVersions_.isEmpty()) { + if (runtimeVersionsBuilder_.isEmpty()) { + runtimeVersionsBuilder_.dispose(); + runtimeVersionsBuilder_ = null; + runtimeVersions_ = other.runtimeVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + runtimeVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRuntimeVersionsFieldBuilder() : null; + } else { + runtimeVersionsBuilder_.addAllMessages(other.runtimeVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.tpu.v2.RuntimeVersion m = + input.readMessage( + com.google.cloud.tpu.v2.RuntimeVersion.parser(), + extensionRegistry); + if (runtimeVersionsBuilder_ == null) { + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.add(m); + } else { + runtimeVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List runtimeVersions_ = + java.util.Collections.emptyList(); + private void ensureRuntimeVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + runtimeVersions_ = new java.util.ArrayList(runtimeVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.RuntimeVersion, com.google.cloud.tpu.v2.RuntimeVersion.Builder, com.google.cloud.tpu.v2.RuntimeVersionOrBuilder> runtimeVersionsBuilder_; + + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public java.util.List getRuntimeVersionsList() { + if (runtimeVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(runtimeVersions_); + } else { + return runtimeVersionsBuilder_.getMessageList(); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public int getRuntimeVersionsCount() { + if (runtimeVersionsBuilder_ == null) { + return runtimeVersions_.size(); + } else { + return runtimeVersionsBuilder_.getCount(); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public com.google.cloud.tpu.v2.RuntimeVersion getRuntimeVersions(int index) { + if (runtimeVersionsBuilder_ == null) { + return runtimeVersions_.get(index); + } else { + return runtimeVersionsBuilder_.getMessage(index); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder setRuntimeVersions( + int index, com.google.cloud.tpu.v2.RuntimeVersion value) { + if (runtimeVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.set(index, value); + onChanged(); + } else { + runtimeVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder setRuntimeVersions( + int index, com.google.cloud.tpu.v2.RuntimeVersion.Builder builderForValue) { + if (runtimeVersionsBuilder_ == null) { + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + runtimeVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder addRuntimeVersions(com.google.cloud.tpu.v2.RuntimeVersion value) { + if (runtimeVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.add(value); + onChanged(); + } else { + runtimeVersionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder addRuntimeVersions( + int index, com.google.cloud.tpu.v2.RuntimeVersion value) { + if (runtimeVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.add(index, value); + onChanged(); + } else { + runtimeVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder addRuntimeVersions( + com.google.cloud.tpu.v2.RuntimeVersion.Builder builderForValue) { + if (runtimeVersionsBuilder_ == null) { + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.add(builderForValue.build()); + onChanged(); + } else { + runtimeVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder addRuntimeVersions( + int index, com.google.cloud.tpu.v2.RuntimeVersion.Builder builderForValue) { + if (runtimeVersionsBuilder_ == null) { + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + runtimeVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder addAllRuntimeVersions( + java.lang.Iterable values) { + if (runtimeVersionsBuilder_ == null) { + ensureRuntimeVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, runtimeVersions_); + onChanged(); + } else { + runtimeVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder clearRuntimeVersions() { + if (runtimeVersionsBuilder_ == null) { + runtimeVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + runtimeVersionsBuilder_.clear(); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public Builder removeRuntimeVersions(int index) { + if (runtimeVersionsBuilder_ == null) { + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.remove(index); + onChanged(); + } else { + runtimeVersionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public com.google.cloud.tpu.v2.RuntimeVersion.Builder getRuntimeVersionsBuilder( + int index) { + return getRuntimeVersionsFieldBuilder().getBuilder(index); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public com.google.cloud.tpu.v2.RuntimeVersionOrBuilder getRuntimeVersionsOrBuilder( + int index) { + if (runtimeVersionsBuilder_ == null) { + return runtimeVersions_.get(index); } else { + return runtimeVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public java.util.List + getRuntimeVersionsOrBuilderList() { + if (runtimeVersionsBuilder_ != null) { + return runtimeVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(runtimeVersions_); + } + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public com.google.cloud.tpu.v2.RuntimeVersion.Builder addRuntimeVersionsBuilder() { + return getRuntimeVersionsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.RuntimeVersion.getDefaultInstance()); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public com.google.cloud.tpu.v2.RuntimeVersion.Builder addRuntimeVersionsBuilder( + int index) { + return getRuntimeVersionsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.RuntimeVersion.getDefaultInstance()); + } + /** + *
+     * The listed nodes.
+     * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + public java.util.List + getRuntimeVersionsBuilderList() { + return getRuntimeVersionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.RuntimeVersion, com.google.cloud.tpu.v2.RuntimeVersion.Builder, com.google.cloud.tpu.v2.RuntimeVersionOrBuilder> + getRuntimeVersionsFieldBuilder() { + if (runtimeVersionsBuilder_ == null) { + runtimeVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.RuntimeVersion, com.google.cloud.tpu.v2.RuntimeVersion.Builder, com.google.cloud.tpu.v2.RuntimeVersionOrBuilder>( + runtimeVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + runtimeVersions_ = null; + } + return runtimeVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ListRuntimeVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ListRuntimeVersionsResponse) + private static final com.google.cloud.tpu.v2.ListRuntimeVersionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ListRuntimeVersionsResponse(); + } + + public static com.google.cloud.tpu.v2.ListRuntimeVersionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuntimeVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ListRuntimeVersionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponseOrBuilder.java new file mode 100644 index 000000000000..2e32e1a34fc1 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ListRuntimeVersionsResponseOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ListRuntimeVersionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ListRuntimeVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + java.util.List + getRuntimeVersionsList(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + com.google.cloud.tpu.v2.RuntimeVersion getRuntimeVersions(int index); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + int getRuntimeVersionsCount(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + java.util.List + getRuntimeVersionsOrBuilderList(); + /** + *
+   * The listed nodes.
+   * 
+ * + * repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + com.google.cloud.tpu.v2.RuntimeVersionOrBuilder getRuntimeVersionsOrBuilder( + int index); + + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/LocationName.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/LocationName.java new file mode 100644 index 000000000000..a1f5c77ac0b6 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfig.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfig.java new file mode 100644 index 000000000000..61d3f71f546f --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfig.java @@ -0,0 +1,938 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Network related configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.NetworkConfig} + */ +public final class NetworkConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.NetworkConfig) + NetworkConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NetworkConfig() { + network_ = ""; + subnetwork_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NetworkConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.NetworkConfig.class, com.google.cloud.tpu.v2.NetworkConfig.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + private volatile java.lang.Object network_; + /** + *
+   * The name of the network for the TPU node. It must be a preexisting Google
+   * Compute Engine network. If none is provided, "default" will be used.
+   * 
+ * + * string network = 1; + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + *
+   * The name of the network for the TPU node. It must be a preexisting Google
+   * Compute Engine network. If none is provided, "default" will be used.
+   * 
+ * + * string network = 1; + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNETWORK_FIELD_NUMBER = 2; + private volatile java.lang.Object subnetwork_; + /** + *
+   * The name of the subnetwork for the TPU node. It must be a preexisting
+   * Google Compute Engine subnetwork. If none is provided, "default" will be
+   * used.
+   * 
+ * + * string subnetwork = 2; + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } + } + /** + *
+   * The name of the subnetwork for the TPU node. It must be a preexisting
+   * Google Compute Engine subnetwork. If none is provided, "default" will be
+   * used.
+   * 
+ * + * string subnetwork = 2; + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_EXTERNAL_IPS_FIELD_NUMBER = 3; + private boolean enableExternalIps_; + /** + *
+   * Indicates that external IP addresses would be associated with the TPU
+   * workers. If set to false, the specified subnetwork or network should have
+   * Private Google Access enabled.
+   * 
+ * + * bool enable_external_ips = 3; + * @return The enableExternalIps. + */ + @java.lang.Override + public boolean getEnableExternalIps() { + return enableExternalIps_; + } + + public static final int CAN_IP_FORWARD_FIELD_NUMBER = 4; + private boolean canIpForward_; + /** + *
+   * Allows the TPU node to send and receive packets with non-matching
+   * destination or source IPs. This is required if you plan to use the TPU
+   * workers to forward routes.
+   * 
+ * + * bool can_ip_forward = 4; + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subnetwork_); + } + if (enableExternalIps_ != false) { + output.writeBool(3, enableExternalIps_); + } + if (canIpForward_ != false) { + output.writeBool(4, canIpForward_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subnetwork_); + } + if (enableExternalIps_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enableExternalIps_); + } + if (canIpForward_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, canIpForward_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.NetworkConfig other = (com.google.cloud.tpu.v2.NetworkConfig) obj; + + if (!getNetwork() + .equals(other.getNetwork())) return false; + if (!getSubnetwork() + .equals(other.getSubnetwork())) return false; + if (getEnableExternalIps() + != other.getEnableExternalIps()) return false; + if (getCanIpForward() + != other.getCanIpForward()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + hash = (37 * hash) + ENABLE_EXTERNAL_IPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableExternalIps()); + hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCanIpForward()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.NetworkConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Network related configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.NetworkConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.NetworkConfig) + com.google.cloud.tpu.v2.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.NetworkConfig.class, com.google.cloud.tpu.v2.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.NetworkConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + network_ = ""; + + subnetwork_ = ""; + + enableExternalIps_ = false; + + canIpForward_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkConfig getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkConfig build() { + com.google.cloud.tpu.v2.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkConfig buildPartial() { + com.google.cloud.tpu.v2.NetworkConfig result = new com.google.cloud.tpu.v2.NetworkConfig(this); + result.network_ = network_; + result.subnetwork_ = subnetwork_; + result.enableExternalIps_ = enableExternalIps_; + result.canIpForward_ = canIpForward_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.NetworkConfig) { + return mergeFrom((com.google.cloud.tpu.v2.NetworkConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.NetworkConfig other) { + if (other == com.google.cloud.tpu.v2.NetworkConfig.getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getSubnetwork().isEmpty()) { + subnetwork_ = other.subnetwork_; + onChanged(); + } + if (other.getEnableExternalIps() != false) { + setEnableExternalIps(other.getEnableExternalIps()); + } + if (other.getCanIpForward() != false) { + setCanIpForward(other.getCanIpForward()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + network_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + subnetwork_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + enableExternalIps_ = input.readBool(); + + break; + } // case 24 + case 32: { + canIpForward_ = input.readBool(); + + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object network_ = ""; + /** + *
+     * The name of the network for the TPU node. It must be a preexisting Google
+     * Compute Engine network. If none is provided, "default" will be used.
+     * 
+ * + * string network = 1; + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the network for the TPU node. It must be a preexisting Google
+     * Compute Engine network. If none is provided, "default" will be used.
+     * 
+ * + * string network = 1; + * @return The bytes for network. + */ + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the network for the TPU node. It must be a preexisting Google
+     * Compute Engine network. If none is provided, "default" will be used.
+     * 
+ * + * string network = 1; + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the network for the TPU node. It must be a preexisting Google
+     * Compute Engine network. If none is provided, "default" will be used.
+     * 
+ * + * string network = 1; + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + *
+     * The name of the network for the TPU node. It must be a preexisting Google
+     * Compute Engine network. If none is provided, "default" will be used.
+     * 
+ * + * string network = 1; + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object subnetwork_ = ""; + /** + *
+     * The name of the subnetwork for the TPU node. It must be a preexisting
+     * Google Compute Engine subnetwork. If none is provided, "default" will be
+     * used.
+     * 
+ * + * string subnetwork = 2; + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the subnetwork for the TPU node. It must be a preexisting
+     * Google Compute Engine subnetwork. If none is provided, "default" will be
+     * used.
+     * 
+ * + * string subnetwork = 2; + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the subnetwork for the TPU node. It must be a preexisting
+     * Google Compute Engine subnetwork. If none is provided, "default" will be
+     * used.
+     * 
+ * + * string subnetwork = 2; + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetwork_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the subnetwork for the TPU node. It must be a preexisting
+     * Google Compute Engine subnetwork. If none is provided, "default" will be
+     * used.
+     * 
+ * + * string subnetwork = 2; + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + + subnetwork_ = getDefaultInstance().getSubnetwork(); + onChanged(); + return this; + } + /** + *
+     * The name of the subnetwork for the TPU node. It must be a preexisting
+     * Google Compute Engine subnetwork. If none is provided, "default" will be
+     * used.
+     * 
+ * + * string subnetwork = 2; + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetwork_ = value; + onChanged(); + return this; + } + + private boolean enableExternalIps_ ; + /** + *
+     * Indicates that external IP addresses would be associated with the TPU
+     * workers. If set to false, the specified subnetwork or network should have
+     * Private Google Access enabled.
+     * 
+ * + * bool enable_external_ips = 3; + * @return The enableExternalIps. + */ + @java.lang.Override + public boolean getEnableExternalIps() { + return enableExternalIps_; + } + /** + *
+     * Indicates that external IP addresses would be associated with the TPU
+     * workers. If set to false, the specified subnetwork or network should have
+     * Private Google Access enabled.
+     * 
+ * + * bool enable_external_ips = 3; + * @param value The enableExternalIps to set. + * @return This builder for chaining. + */ + public Builder setEnableExternalIps(boolean value) { + + enableExternalIps_ = value; + onChanged(); + return this; + } + /** + *
+     * Indicates that external IP addresses would be associated with the TPU
+     * workers. If set to false, the specified subnetwork or network should have
+     * Private Google Access enabled.
+     * 
+ * + * bool enable_external_ips = 3; + * @return This builder for chaining. + */ + public Builder clearEnableExternalIps() { + + enableExternalIps_ = false; + onChanged(); + return this; + } + + private boolean canIpForward_ ; + /** + *
+     * Allows the TPU node to send and receive packets with non-matching
+     * destination or source IPs. This is required if you plan to use the TPU
+     * workers to forward routes.
+     * 
+ * + * bool can_ip_forward = 4; + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + /** + *
+     * Allows the TPU node to send and receive packets with non-matching
+     * destination or source IPs. This is required if you plan to use the TPU
+     * workers to forward routes.
+     * 
+ * + * bool can_ip_forward = 4; + * @param value The canIpForward to set. + * @return This builder for chaining. + */ + public Builder setCanIpForward(boolean value) { + + canIpForward_ = value; + onChanged(); + return this; + } + /** + *
+     * Allows the TPU node to send and receive packets with non-matching
+     * destination or source IPs. This is required if you plan to use the TPU
+     * workers to forward routes.
+     * 
+ * + * bool can_ip_forward = 4; + * @return This builder for chaining. + */ + public Builder clearCanIpForward() { + + canIpForward_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.NetworkConfig) + private static final com.google.cloud.tpu.v2.NetworkConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.NetworkConfig(); + } + + public static com.google.cloud.tpu.v2.NetworkConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfigOrBuilder.java new file mode 100644 index 000000000000..6835c260f7d5 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkConfigOrBuilder.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface NetworkConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the network for the TPU node. It must be a preexisting Google
+   * Compute Engine network. If none is provided, "default" will be used.
+   * 
+ * + * string network = 1; + * @return The network. + */ + java.lang.String getNetwork(); + /** + *
+   * The name of the network for the TPU node. It must be a preexisting Google
+   * Compute Engine network. If none is provided, "default" will be used.
+   * 
+ * + * string network = 1; + * @return The bytes for network. + */ + com.google.protobuf.ByteString + getNetworkBytes(); + + /** + *
+   * The name of the subnetwork for the TPU node. It must be a preexisting
+   * Google Compute Engine subnetwork. If none is provided, "default" will be
+   * used.
+   * 
+ * + * string subnetwork = 2; + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + *
+   * The name of the subnetwork for the TPU node. It must be a preexisting
+   * Google Compute Engine subnetwork. If none is provided, "default" will be
+   * used.
+   * 
+ * + * string subnetwork = 2; + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString + getSubnetworkBytes(); + + /** + *
+   * Indicates that external IP addresses would be associated with the TPU
+   * workers. If set to false, the specified subnetwork or network should have
+   * Private Google Access enabled.
+   * 
+ * + * bool enable_external_ips = 3; + * @return The enableExternalIps. + */ + boolean getEnableExternalIps(); + + /** + *
+   * Allows the TPU node to send and receive packets with non-matching
+   * destination or source IPs. This is required if you plan to use the TPU
+   * workers to forward routes.
+   * 
+ * + * bool can_ip_forward = 4; + * @return The canIpForward. + */ + boolean getCanIpForward(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpoint.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpoint.java new file mode 100644 index 000000000000..a8c6fc25b876 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpoint.java @@ -0,0 +1,884 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A network endpoint over which a TPU worker can be reached.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.NetworkEndpoint} + */ +public final class NetworkEndpoint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.NetworkEndpoint) + NetworkEndpointOrBuilder { +private static final long serialVersionUID = 0L; + // Use NetworkEndpoint.newBuilder() to construct. + private NetworkEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NetworkEndpoint() { + ipAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NetworkEndpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.NetworkEndpoint.class, com.google.cloud.tpu.v2.NetworkEndpoint.Builder.class); + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object ipAddress_; + /** + *
+   * The internal IP address of this network endpoint.
+   * 
+ * + * string ip_address = 1; + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + /** + *
+   * The internal IP address of this network endpoint.
+   * 
+ * + * string ip_address = 1; + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_; + /** + *
+   * The port of this network endpoint.
+   * 
+ * + * int32 port = 2; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int ACCESS_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.tpu.v2.AccessConfig accessConfig_; + /** + *
+   * The access config for the TPU worker.
+   * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @return Whether the accessConfig field is set. + */ + @java.lang.Override + public boolean hasAccessConfig() { + return accessConfig_ != null; + } + /** + *
+   * The access config for the TPU worker.
+   * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @return The accessConfig. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.AccessConfig getAccessConfig() { + return accessConfig_ == null ? com.google.cloud.tpu.v2.AccessConfig.getDefaultInstance() : accessConfig_; + } + /** + *
+   * The access config for the TPU worker.
+   * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.AccessConfigOrBuilder getAccessConfigOrBuilder() { + return getAccessConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (accessConfig_ != null) { + output.writeMessage(5, getAccessConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, port_); + } + if (accessConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getAccessConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.NetworkEndpoint)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.NetworkEndpoint other = (com.google.cloud.tpu.v2.NetworkEndpoint) obj; + + if (!getIpAddress() + .equals(other.getIpAddress())) return false; + if (getPort() + != other.getPort()) return false; + if (hasAccessConfig() != other.hasAccessConfig()) return false; + if (hasAccessConfig()) { + if (!getAccessConfig() + .equals(other.getAccessConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + if (hasAccessConfig()) { + hash = (37 * hash) + ACCESS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAccessConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.NetworkEndpoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.NetworkEndpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A network endpoint over which a TPU worker can be reached.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.NetworkEndpoint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.NetworkEndpoint) + com.google.cloud.tpu.v2.NetworkEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.NetworkEndpoint.class, com.google.cloud.tpu.v2.NetworkEndpoint.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.NetworkEndpoint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + ipAddress_ = ""; + + port_ = 0; + + if (accessConfigBuilder_ == null) { + accessConfig_ = null; + } else { + accessConfig_ = null; + accessConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_NetworkEndpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkEndpoint getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.NetworkEndpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkEndpoint build() { + com.google.cloud.tpu.v2.NetworkEndpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkEndpoint buildPartial() { + com.google.cloud.tpu.v2.NetworkEndpoint result = new com.google.cloud.tpu.v2.NetworkEndpoint(this); + result.ipAddress_ = ipAddress_; + result.port_ = port_; + if (accessConfigBuilder_ == null) { + result.accessConfig_ = accessConfig_; + } else { + result.accessConfig_ = accessConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.NetworkEndpoint) { + return mergeFrom((com.google.cloud.tpu.v2.NetworkEndpoint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.NetworkEndpoint other) { + if (other == com.google.cloud.tpu.v2.NetworkEndpoint.getDefaultInstance()) return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.hasAccessConfig()) { + mergeAccessConfig(other.getAccessConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + ipAddress_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + port_ = input.readInt32(); + + break; + } // case 16 + case 42: { + input.readMessage( + getAccessConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + *
+     * The internal IP address of this network endpoint.
+     * 
+ * + * string ip_address = 1; + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The internal IP address of this network endpoint.
+     * 
+ * + * string ip_address = 1; + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString + getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The internal IP address of this network endpoint.
+     * 
+ * + * string ip_address = 1; + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipAddress_ = value; + onChanged(); + return this; + } + /** + *
+     * The internal IP address of this network endpoint.
+     * 
+ * + * string ip_address = 1; + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + *
+     * The internal IP address of this network endpoint.
+     * 
+ * + * string ip_address = 1; + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipAddress_ = value; + onChanged(); + return this; + } + + private int port_ ; + /** + *
+     * The port of this network endpoint.
+     * 
+ * + * int32 port = 2; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + *
+     * The port of this network endpoint.
+     * 
+ * + * int32 port = 2; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + *
+     * The port of this network endpoint.
+     * 
+ * + * int32 port = 2; + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2.AccessConfig accessConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.AccessConfig, com.google.cloud.tpu.v2.AccessConfig.Builder, com.google.cloud.tpu.v2.AccessConfigOrBuilder> accessConfigBuilder_; + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @return Whether the accessConfig field is set. + */ + public boolean hasAccessConfig() { + return accessConfigBuilder_ != null || accessConfig_ != null; + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @return The accessConfig. + */ + public com.google.cloud.tpu.v2.AccessConfig getAccessConfig() { + if (accessConfigBuilder_ == null) { + return accessConfig_ == null ? com.google.cloud.tpu.v2.AccessConfig.getDefaultInstance() : accessConfig_; + } else { + return accessConfigBuilder_.getMessage(); + } + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + public Builder setAccessConfig(com.google.cloud.tpu.v2.AccessConfig value) { + if (accessConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessConfig_ = value; + onChanged(); + } else { + accessConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + public Builder setAccessConfig( + com.google.cloud.tpu.v2.AccessConfig.Builder builderForValue) { + if (accessConfigBuilder_ == null) { + accessConfig_ = builderForValue.build(); + onChanged(); + } else { + accessConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + public Builder mergeAccessConfig(com.google.cloud.tpu.v2.AccessConfig value) { + if (accessConfigBuilder_ == null) { + if (accessConfig_ != null) { + accessConfig_ = + com.google.cloud.tpu.v2.AccessConfig.newBuilder(accessConfig_).mergeFrom(value).buildPartial(); + } else { + accessConfig_ = value; + } + onChanged(); + } else { + accessConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + public Builder clearAccessConfig() { + if (accessConfigBuilder_ == null) { + accessConfig_ = null; + onChanged(); + } else { + accessConfig_ = null; + accessConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + public com.google.cloud.tpu.v2.AccessConfig.Builder getAccessConfigBuilder() { + + onChanged(); + return getAccessConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + public com.google.cloud.tpu.v2.AccessConfigOrBuilder getAccessConfigOrBuilder() { + if (accessConfigBuilder_ != null) { + return accessConfigBuilder_.getMessageOrBuilder(); + } else { + return accessConfig_ == null ? + com.google.cloud.tpu.v2.AccessConfig.getDefaultInstance() : accessConfig_; + } + } + /** + *
+     * The access config for the TPU worker.
+     * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.AccessConfig, com.google.cloud.tpu.v2.AccessConfig.Builder, com.google.cloud.tpu.v2.AccessConfigOrBuilder> + getAccessConfigFieldBuilder() { + if (accessConfigBuilder_ == null) { + accessConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.AccessConfig, com.google.cloud.tpu.v2.AccessConfig.Builder, com.google.cloud.tpu.v2.AccessConfigOrBuilder>( + getAccessConfig(), + getParentForChildren(), + isClean()); + accessConfig_ = null; + } + return accessConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.NetworkEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.NetworkEndpoint) + private static final com.google.cloud.tpu.v2.NetworkEndpoint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.NetworkEndpoint(); + } + + public static com.google.cloud.tpu.v2.NetworkEndpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkEndpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpointOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpointOrBuilder.java new file mode 100644 index 000000000000..73e837baae12 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NetworkEndpointOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface NetworkEndpointOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.NetworkEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The internal IP address of this network endpoint.
+   * 
+ * + * string ip_address = 1; + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + *
+   * The internal IP address of this network endpoint.
+   * 
+ * + * string ip_address = 1; + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString + getIpAddressBytes(); + + /** + *
+   * The port of this network endpoint.
+   * 
+ * + * int32 port = 2; + * @return The port. + */ + int getPort(); + + /** + *
+   * The access config for the TPU worker.
+   * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @return Whether the accessConfig field is set. + */ + boolean hasAccessConfig(); + /** + *
+   * The access config for the TPU worker.
+   * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @return The accessConfig. + */ + com.google.cloud.tpu.v2.AccessConfig getAccessConfig(); + /** + *
+   * The access config for the TPU worker.
+   * 
+ * + * .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + com.google.cloud.tpu.v2.AccessConfigOrBuilder getAccessConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Node.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Node.java new file mode 100644 index 000000000000..0b15a3c1e59f --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Node.java @@ -0,0 +1,6036 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A TPU instance.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.Node} + */ +public final class Node extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.Node) + NodeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Node.newBuilder() to construct. + private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Node() { + name_ = ""; + description_ = ""; + acceleratorType_ = ""; + state_ = 0; + healthDescription_ = ""; + runtimeVersion_ = ""; + cidrBlock_ = ""; + networkEndpoints_ = java.util.Collections.emptyList(); + health_ = 0; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + dataDisks_ = java.util.Collections.emptyList(); + apiVersion_ = 0; + symptoms_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Node(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Node_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 24: + return internalGetLabels(); + case 34: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.Node.class, com.google.cloud.tpu.v2.Node.Builder.class); + } + + /** + *
+   * Represents the different states of a TPU node during its lifecycle.
+   * 
+ * + * Protobuf enum {@code google.cloud.tpu.v2.Node.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * TPU node state is not known/set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * TPU node is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * TPU node has been created.
+     * 
+ * + * READY = 2; + */ + READY(2), + /** + *
+     * TPU node is restarting.
+     * 
+ * + * RESTARTING = 3; + */ + RESTARTING(3), + /** + *
+     * TPU node is undergoing reimaging.
+     * 
+ * + * REIMAGING = 4; + */ + REIMAGING(4), + /** + *
+     * TPU node is being deleted.
+     * 
+ * + * DELETING = 5; + */ + DELETING(5), + /** + *
+     * TPU node is being repaired and may be unusable. Details can be
+     * found in the `help_description` field.
+     * 
+ * + * REPAIRING = 6; + */ + REPAIRING(6), + /** + *
+     * TPU node is stopped.
+     * 
+ * + * STOPPED = 8; + */ + STOPPED(8), + /** + *
+     * TPU node is currently stopping.
+     * 
+ * + * STOPPING = 9; + */ + STOPPING(9), + /** + *
+     * TPU node is currently starting.
+     * 
+ * + * STARTING = 10; + */ + STARTING(10), + /** + *
+     * TPU node has been preempted. Only applies to Preemptible TPU Nodes.
+     * 
+ * + * PREEMPTED = 11; + */ + PREEMPTED(11), + /** + *
+     * TPU node has been terminated due to maintenance or has reached the end of
+     * its life cycle (for preemptible nodes).
+     * 
+ * + * TERMINATED = 12; + */ + TERMINATED(12), + /** + *
+     * TPU node is currently hiding.
+     * 
+ * + * HIDING = 13; + */ + HIDING(13), + /** + *
+     * TPU node has been hidden.
+     * 
+ * + * HIDDEN = 14; + */ + HIDDEN(14), + /** + *
+     * TPU node is currently unhiding.
+     * 
+ * + * UNHIDING = 15; + */ + UNHIDING(15), + UNRECOGNIZED(-1), + ; + + /** + *
+     * TPU node state is not known/set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * TPU node is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * TPU node has been created.
+     * 
+ * + * READY = 2; + */ + public static final int READY_VALUE = 2; + /** + *
+     * TPU node is restarting.
+     * 
+ * + * RESTARTING = 3; + */ + public static final int RESTARTING_VALUE = 3; + /** + *
+     * TPU node is undergoing reimaging.
+     * 
+ * + * REIMAGING = 4; + */ + public static final int REIMAGING_VALUE = 4; + /** + *
+     * TPU node is being deleted.
+     * 
+ * + * DELETING = 5; + */ + public static final int DELETING_VALUE = 5; + /** + *
+     * TPU node is being repaired and may be unusable. Details can be
+     * found in the `help_description` field.
+     * 
+ * + * REPAIRING = 6; + */ + public static final int REPAIRING_VALUE = 6; + /** + *
+     * TPU node is stopped.
+     * 
+ * + * STOPPED = 8; + */ + public static final int STOPPED_VALUE = 8; + /** + *
+     * TPU node is currently stopping.
+     * 
+ * + * STOPPING = 9; + */ + public static final int STOPPING_VALUE = 9; + /** + *
+     * TPU node is currently starting.
+     * 
+ * + * STARTING = 10; + */ + public static final int STARTING_VALUE = 10; + /** + *
+     * TPU node has been preempted. Only applies to Preemptible TPU Nodes.
+     * 
+ * + * PREEMPTED = 11; + */ + public static final int PREEMPTED_VALUE = 11; + /** + *
+     * TPU node has been terminated due to maintenance or has reached the end of
+     * its life cycle (for preemptible nodes).
+     * 
+ * + * TERMINATED = 12; + */ + public static final int TERMINATED_VALUE = 12; + /** + *
+     * TPU node is currently hiding.
+     * 
+ * + * HIDING = 13; + */ + public static final int HIDING_VALUE = 13; + /** + *
+     * TPU node has been hidden.
+     * 
+ * + * HIDDEN = 14; + */ + public static final int HIDDEN_VALUE = 14; + /** + *
+     * TPU node is currently unhiding.
+     * 
+ * + * UNHIDING = 15; + */ + public static final int UNHIDING_VALUE = 15; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return READY; + case 3: return RESTARTING; + case 4: return REIMAGING; + case 5: return DELETING; + case 6: return REPAIRING; + case 8: return STOPPED; + case 9: return STOPPING; + case 10: return STARTING; + case 11: return PREEMPTED; + case 12: return TERMINATED; + case 13: return HIDING; + case 14: return HIDDEN; + case 15: return UNHIDING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.tpu.v2.Node.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tpu.v2.Node.State) + } + + /** + *
+   * Health defines the status of a TPU node as reported by
+   * Health Monitor.
+   * 
+ * + * Protobuf enum {@code google.cloud.tpu.v2.Node.Health} + */ + public enum Health + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Health status is unknown: not initialized or failed to retrieve.
+     * 
+ * + * HEALTH_UNSPECIFIED = 0; + */ + HEALTH_UNSPECIFIED(0), + /** + *
+     * The resource is healthy.
+     * 
+ * + * HEALTHY = 1; + */ + HEALTHY(1), + /** + *
+     * The resource is unresponsive.
+     * 
+ * + * TIMEOUT = 3; + */ + TIMEOUT(3), + /** + *
+     * The in-guest ML stack is unhealthy.
+     * 
+ * + * UNHEALTHY_TENSORFLOW = 4; + */ + UNHEALTHY_TENSORFLOW(4), + /** + *
+     * The node is under maintenance/priority boost caused rescheduling and
+     * will resume running once rescheduled.
+     * 
+ * + * UNHEALTHY_MAINTENANCE = 5; + */ + UNHEALTHY_MAINTENANCE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Health status is unknown: not initialized or failed to retrieve.
+     * 
+ * + * HEALTH_UNSPECIFIED = 0; + */ + public static final int HEALTH_UNSPECIFIED_VALUE = 0; + /** + *
+     * The resource is healthy.
+     * 
+ * + * HEALTHY = 1; + */ + public static final int HEALTHY_VALUE = 1; + /** + *
+     * The resource is unresponsive.
+     * 
+ * + * TIMEOUT = 3; + */ + public static final int TIMEOUT_VALUE = 3; + /** + *
+     * The in-guest ML stack is unhealthy.
+     * 
+ * + * UNHEALTHY_TENSORFLOW = 4; + */ + public static final int UNHEALTHY_TENSORFLOW_VALUE = 4; + /** + *
+     * The node is under maintenance/priority boost caused rescheduling and
+     * will resume running once rescheduled.
+     * 
+ * + * UNHEALTHY_MAINTENANCE = 5; + */ + public static final int UNHEALTHY_MAINTENANCE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Health valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Health forNumber(int value) { + switch (value) { + case 0: return HEALTH_UNSPECIFIED; + case 1: return HEALTHY; + case 3: return TIMEOUT; + case 4: return UNHEALTHY_TENSORFLOW; + case 5: return UNHEALTHY_MAINTENANCE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Health> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Health findValueByNumber(int number) { + return Health.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.tpu.v2.Node.getDescriptor().getEnumTypes().get(1); + } + + private static final Health[] VALUES = values(); + + public static Health valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Health(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tpu.v2.Node.Health) + } + + /** + *
+   * TPU API Version.
+   * 
+ * + * Protobuf enum {@code google.cloud.tpu.v2.Node.ApiVersion} + */ + public enum ApiVersion + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * API version is unknown.
+     * 
+ * + * API_VERSION_UNSPECIFIED = 0; + */ + API_VERSION_UNSPECIFIED(0), + /** + *
+     * TPU API V1Alpha1 version.
+     * 
+ * + * V1_ALPHA1 = 1; + */ + V1_ALPHA1(1), + /** + *
+     * TPU API V1 version.
+     * 
+ * + * V1 = 2; + */ + V1(2), + /** + *
+     * TPU API V2Alpha1 version.
+     * 
+ * + * V2_ALPHA1 = 3; + */ + V2_ALPHA1(3), + /** + *
+     * TPU API V2 version.
+     * 
+ * + * V2 = 4; + */ + V2(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * API version is unknown.
+     * 
+ * + * API_VERSION_UNSPECIFIED = 0; + */ + public static final int API_VERSION_UNSPECIFIED_VALUE = 0; + /** + *
+     * TPU API V1Alpha1 version.
+     * 
+ * + * V1_ALPHA1 = 1; + */ + public static final int V1_ALPHA1_VALUE = 1; + /** + *
+     * TPU API V1 version.
+     * 
+ * + * V1 = 2; + */ + public static final int V1_VALUE = 2; + /** + *
+     * TPU API V2Alpha1 version.
+     * 
+ * + * V2_ALPHA1 = 3; + */ + public static final int V2_ALPHA1_VALUE = 3; + /** + *
+     * TPU API V2 version.
+     * 
+ * + * V2 = 4; + */ + public static final int V2_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ApiVersion valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ApiVersion forNumber(int value) { + switch (value) { + case 0: return API_VERSION_UNSPECIFIED; + case 1: return V1_ALPHA1; + case 2: return V1; + case 3: return V2_ALPHA1; + case 4: return V2; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ApiVersion> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ApiVersion findValueByNumber(int number) { + return ApiVersion.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.tpu.v2.Node.getDescriptor().getEnumTypes().get(2); + } + + private static final ApiVersion[] VALUES = values(); + + public static ApiVersion valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ApiVersion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tpu.v2.Node.ApiVersion) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Output only. Immutable. The name of the TPU.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. Immutable. The name of the TPU.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * The user-supplied description of the TPU. Maximum of 512 characters.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The user-supplied description of the TPU. Maximum of 512 characters.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 5; + private volatile java.lang.Object acceleratorType_; + /** + *
+   * Required. The type of hardware accelerators associated with this node.
+   * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The acceleratorType. + */ + @java.lang.Override + public java.lang.String getAcceleratorType() { + java.lang.Object ref = acceleratorType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + acceleratorType_ = s; + return s; + } + } + /** + *
+   * Required. The type of hardware accelerators associated with this node.
+   * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for acceleratorType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAcceleratorTypeBytes() { + java.lang.Object ref = acceleratorType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + acceleratorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_; + /** + *
+   * Output only. The current state for the TPU Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state for the TPU Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.tpu.v2.Node.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Node.State result = com.google.cloud.tpu.v2.Node.State.valueOf(state_); + return result == null ? com.google.cloud.tpu.v2.Node.State.UNRECOGNIZED : result; + } + + public static final int HEALTH_DESCRIPTION_FIELD_NUMBER = 10; + private volatile java.lang.Object healthDescription_; + /** + *
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
+   * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The healthDescription. + */ + @java.lang.Override + public java.lang.String getHealthDescription() { + java.lang.Object ref = healthDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthDescription_ = s; + return s; + } + } + /** + *
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
+   * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for healthDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHealthDescriptionBytes() { + java.lang.Object ref = healthDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + healthDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_VERSION_FIELD_NUMBER = 11; + private volatile java.lang.Object runtimeVersion_; + /** + *
+   * Required. The runtime version running in the Node.
+   * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return The runtimeVersion. + */ + @java.lang.Override + public java.lang.String getRuntimeVersion() { + java.lang.Object ref = runtimeVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeVersion_ = s; + return s; + } + } + /** + *
+   * Required. The runtime version running in the Node.
+   * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for runtimeVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRuntimeVersionBytes() { + java.lang.Object ref = runtimeVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + runtimeVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 36; + private com.google.cloud.tpu.v2.NetworkConfig networkConfig_; + /** + *
+   * Network configurations for the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + *
+   * Network configurations for the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkConfig getNetworkConfig() { + return networkConfig_ == null ? com.google.cloud.tpu.v2.NetworkConfig.getDefaultInstance() : networkConfig_; + } + /** + *
+   * Network configurations for the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return getNetworkConfig(); + } + + public static final int CIDR_BLOCK_FIELD_NUMBER = 13; + private volatile java.lang.Object cidrBlock_; + /** + *
+   * The CIDR block that the TPU node will use when selecting an IP address.
+   * This CIDR block must be a /29 block; the Compute Engine networks API
+   * forbids a smaller block, and using a larger block would be wasteful (a
+   * node can only consume one IP address). Errors will occur if the CIDR block
+   * has already been used for a currently existing TPU node, the CIDR block
+   * conflicts with any subnetworks in the user's provided network, or the
+   * provided network is peered with another network that is using that CIDR
+   * block.
+   * 
+ * + * string cidr_block = 13; + * @return The cidrBlock. + */ + @java.lang.Override + public java.lang.String getCidrBlock() { + java.lang.Object ref = cidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cidrBlock_ = s; + return s; + } + } + /** + *
+   * The CIDR block that the TPU node will use when selecting an IP address.
+   * This CIDR block must be a /29 block; the Compute Engine networks API
+   * forbids a smaller block, and using a larger block would be wasteful (a
+   * node can only consume one IP address). Errors will occur if the CIDR block
+   * has already been used for a currently existing TPU node, the CIDR block
+   * conflicts with any subnetworks in the user's provided network, or the
+   * provided network is peered with another network that is using that CIDR
+   * block.
+   * 
+ * + * string cidr_block = 13; + * @return The bytes for cidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCidrBlockBytes() { + java.lang.Object ref = cidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 37; + private com.google.cloud.tpu.v2.ServiceAccount serviceAccount_; + /** + *
+   * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+   * If None is specified, the default compute service account will be used.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @return Whether the serviceAccount field is set. + */ + @java.lang.Override + public boolean hasServiceAccount() { + return serviceAccount_ != null; + } + /** + *
+   * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+   * If None is specified, the default compute service account will be used.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @return The serviceAccount. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceAccount getServiceAccount() { + return serviceAccount_ == null ? com.google.cloud.tpu.v2.ServiceAccount.getDefaultInstance() : serviceAccount_; + } + /** + *
+   * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+   * If None is specified, the default compute service account will be used.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceAccountOrBuilder getServiceAccountOrBuilder() { + return getServiceAccount(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the node was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the node was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the node was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int SCHEDULING_CONFIG_FIELD_NUMBER = 17; + private com.google.cloud.tpu.v2.SchedulingConfig schedulingConfig_; + /** + *
+   * The scheduling options for this node.
+   * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @return Whether the schedulingConfig field is set. + */ + @java.lang.Override + public boolean hasSchedulingConfig() { + return schedulingConfig_ != null; + } + /** + *
+   * The scheduling options for this node.
+   * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @return The schedulingConfig. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.SchedulingConfig getSchedulingConfig() { + return schedulingConfig_ == null ? com.google.cloud.tpu.v2.SchedulingConfig.getDefaultInstance() : schedulingConfig_; + } + /** + *
+   * The scheduling options for this node.
+   * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.SchedulingConfigOrBuilder getSchedulingConfigOrBuilder() { + return getSchedulingConfig(); + } + + public static final int NETWORK_ENDPOINTS_FIELD_NUMBER = 21; + private java.util.List networkEndpoints_; + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getNetworkEndpointsList() { + return networkEndpoints_; + } + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getNetworkEndpointsOrBuilderList() { + return networkEndpoints_; + } + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getNetworkEndpointsCount() { + return networkEndpoints_.size(); + } + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkEndpoint getNetworkEndpoints(int index) { + return networkEndpoints_.get(index); + } + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( + int index) { + return networkEndpoints_.get(index); + } + + public static final int HEALTH_FIELD_NUMBER = 22; + private int health_; + /** + *
+   * The health status of the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @return The enum numeric value on the wire for health. + */ + @java.lang.Override public int getHealthValue() { + return health_; + } + /** + *
+   * The health status of the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @return The health. + */ + @java.lang.Override public com.google.cloud.tpu.v2.Node.Health getHealth() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Node.Health result = com.google.cloud.tpu.v2.Node.Health.valueOf(health_); + return result == null ? com.google.cloud.tpu.v2.Node.Health.UNRECOGNIZED : result; + } + + public static final int LABELS_FIELD_NUMBER = 24; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Node_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int METADATA_FIELD_NUMBER = 34; + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Node_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + @java.lang.Override + + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + @java.lang.Override + + public java.lang.String getMetadataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + @java.lang.Override + + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TAGS_FIELD_NUMBER = 40; + private com.google.protobuf.LazyStringList tags_; + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; + } + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int ID_FIELD_NUMBER = 33; + private long id_; + /** + *
+   * Output only. The unique identifier for the TPU Node.
+   * 
+ * + * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int DATA_DISKS_FIELD_NUMBER = 41; + private java.util.List dataDisks_; + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + @java.lang.Override + public java.util.List getDataDisksList() { + return dataDisks_; + } + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + @java.lang.Override + public java.util.List + getDataDisksOrBuilderList() { + return dataDisks_; + } + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + @java.lang.Override + public int getDataDisksCount() { + return dataDisks_.size(); + } + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.AttachedDisk getDataDisks(int index) { + return dataDisks_.get(index); + } + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.AttachedDiskOrBuilder getDataDisksOrBuilder( + int index) { + return dataDisks_.get(index); + } + + public static final int API_VERSION_FIELD_NUMBER = 38; + private int apiVersion_; + /** + *
+   * Output only. The API version that created this Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for apiVersion. + */ + @java.lang.Override public int getApiVersionValue() { + return apiVersion_; + } + /** + *
+   * Output only. The API version that created this Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + @java.lang.Override public com.google.cloud.tpu.v2.Node.ApiVersion getApiVersion() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Node.ApiVersion result = com.google.cloud.tpu.v2.Node.ApiVersion.valueOf(apiVersion_); + return result == null ? com.google.cloud.tpu.v2.Node.ApiVersion.UNRECOGNIZED : result; + } + + public static final int SYMPTOMS_FIELD_NUMBER = 39; + private java.util.List symptoms_; + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getSymptomsList() { + return symptoms_; + } + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getSymptomsOrBuilderList() { + return symptoms_; + } + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getSymptomsCount() { + return symptoms_.size(); + } + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Symptom getSymptoms(int index) { + return symptoms_.get(index); + } + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.SymptomOrBuilder getSymptomsOrBuilder( + int index) { + return symptoms_.get(index); + } + + public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 45; + private com.google.cloud.tpu.v2.ShieldedInstanceConfig shieldedInstanceConfig_; + /** + *
+   * Shielded Instance options.
+   * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @return Whether the shieldedInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfig_ != null; + } + /** + *
+   * Shielded Instance options.
+   * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @return The shieldedInstanceConfig. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.ShieldedInstanceConfig getShieldedInstanceConfig() { + return shieldedInstanceConfig_ == null ? com.google.cloud.tpu.v2.ShieldedInstanceConfig.getDefaultInstance() : shieldedInstanceConfig_; + } + /** + *
+   * Shielded Instance options.
+   * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder() { + return getShieldedInstanceConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acceleratorType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, acceleratorType_); + } + if (state_ != com.google.cloud.tpu.v2.Node.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, healthDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, runtimeVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cidrBlock_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, cidrBlock_); + } + if (createTime_ != null) { + output.writeMessage(16, getCreateTime()); + } + if (schedulingConfig_ != null) { + output.writeMessage(17, getSchedulingConfig()); + } + for (int i = 0; i < networkEndpoints_.size(); i++) { + output.writeMessage(21, networkEndpoints_.get(i)); + } + if (health_ != com.google.cloud.tpu.v2.Node.Health.HEALTH_UNSPECIFIED.getNumber()) { + output.writeEnum(22, health_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 24); + if (id_ != 0L) { + output.writeInt64(33, id_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMetadata(), + MetadataDefaultEntryHolder.defaultEntry, + 34); + if (networkConfig_ != null) { + output.writeMessage(36, getNetworkConfig()); + } + if (serviceAccount_ != null) { + output.writeMessage(37, getServiceAccount()); + } + if (apiVersion_ != com.google.cloud.tpu.v2.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { + output.writeEnum(38, apiVersion_); + } + for (int i = 0; i < symptoms_.size(); i++) { + output.writeMessage(39, symptoms_.get(i)); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 40, tags_.getRaw(i)); + } + for (int i = 0; i < dataDisks_.size(); i++) { + output.writeMessage(41, dataDisks_.get(i)); + } + if (shieldedInstanceConfig_ != null) { + output.writeMessage(45, getShieldedInstanceConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acceleratorType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, acceleratorType_); + } + if (state_ != com.google.cloud.tpu.v2.Node.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, healthDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, runtimeVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cidrBlock_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, cidrBlock_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getCreateTime()); + } + if (schedulingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getSchedulingConfig()); + } + for (int i = 0; i < networkEndpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, networkEndpoints_.get(i)); + } + if (health_ != com.google.cloud.tpu.v2.Node.Health.HEALTH_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, health_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, labels__); + } + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(33, id_); + } + for (java.util.Map.Entry entry + : internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry + metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(34, metadata__); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(36, getNetworkConfig()); + } + if (serviceAccount_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(37, getServiceAccount()); + } + if (apiVersion_ != com.google.cloud.tpu.v2.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(38, apiVersion_); + } + for (int i = 0; i < symptoms_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(39, symptoms_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 2 * getTagsList().size(); + } + for (int i = 0; i < dataDisks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(41, dataDisks_.get(i)); + } + if (shieldedInstanceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(45, getShieldedInstanceConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.Node)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.Node other = (com.google.cloud.tpu.v2.Node) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getAcceleratorType() + .equals(other.getAcceleratorType())) return false; + if (state_ != other.state_) return false; + if (!getHealthDescription() + .equals(other.getHealthDescription())) return false; + if (!getRuntimeVersion() + .equals(other.getRuntimeVersion())) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; + } + if (!getCidrBlock() + .equals(other.getCidrBlock())) return false; + if (hasServiceAccount() != other.hasServiceAccount()) return false; + if (hasServiceAccount()) { + if (!getServiceAccount() + .equals(other.getServiceAccount())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasSchedulingConfig() != other.hasSchedulingConfig()) return false; + if (hasSchedulingConfig()) { + if (!getSchedulingConfig() + .equals(other.getSchedulingConfig())) return false; + } + if (!getNetworkEndpointsList() + .equals(other.getNetworkEndpointsList())) return false; + if (health_ != other.health_) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!internalGetMetadata().equals( + other.internalGetMetadata())) return false; + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (getId() + != other.getId()) return false; + if (!getDataDisksList() + .equals(other.getDataDisksList())) return false; + if (apiVersion_ != other.apiVersion_) return false; + if (!getSymptomsList() + .equals(other.getSymptomsList())) return false; + if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; + if (hasShieldedInstanceConfig()) { + if (!getShieldedInstanceConfig() + .equals(other.getShieldedInstanceConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + ACCELERATOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorType().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + HEALTH_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getHealthDescription().hashCode(); + hash = (37 * hash) + RUNTIME_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeVersion().hashCode(); + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (37 * hash) + CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getCidrBlock().hashCode(); + if (hasServiceAccount()) { + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasSchedulingConfig()) { + hash = (37 * hash) + SCHEDULING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSchedulingConfig().hashCode(); + } + if (getNetworkEndpointsCount() > 0) { + hash = (37 * hash) + NETWORK_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkEndpointsList().hashCode(); + } + hash = (37 * hash) + HEALTH_FIELD_NUMBER; + hash = (53 * hash) + health_; + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + if (getDataDisksCount() > 0) { + hash = (37 * hash) + DATA_DISKS_FIELD_NUMBER; + hash = (53 * hash) + getDataDisksList().hashCode(); + } + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + apiVersion_; + if (getSymptomsCount() > 0) { + hash = (37 * hash) + SYMPTOMS_FIELD_NUMBER; + hash = (53 * hash) + getSymptomsList().hashCode(); + } + if (hasShieldedInstanceConfig()) { + hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.Node parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.Node parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Node parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.Node parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Node parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.Node parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Node parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.Node parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Node parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.Node parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Node parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.Node parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.Node prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A TPU instance.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.Node} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.Node) + com.google.cloud.tpu.v2.NodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Node_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 24: + return internalGetLabels(); + case 34: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 24: + return internalGetMutableLabels(); + case 34: + return internalGetMutableMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.Node.class, com.google.cloud.tpu.v2.Node.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.Node.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + acceleratorType_ = ""; + + state_ = 0; + + healthDescription_ = ""; + + runtimeVersion_ = ""; + + if (networkConfigBuilder_ == null) { + networkConfig_ = null; + } else { + networkConfig_ = null; + networkConfigBuilder_ = null; + } + cidrBlock_ = ""; + + if (serviceAccountBuilder_ == null) { + serviceAccount_ = null; + } else { + serviceAccount_ = null; + serviceAccountBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (schedulingConfigBuilder_ == null) { + schedulingConfig_ = null; + } else { + schedulingConfig_ = null; + schedulingConfigBuilder_ = null; + } + if (networkEndpointsBuilder_ == null) { + networkEndpoints_ = java.util.Collections.emptyList(); + } else { + networkEndpoints_ = null; + networkEndpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + health_ = 0; + + internalGetMutableLabels().clear(); + internalGetMutableMetadata().clear(); + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + id_ = 0L; + + if (dataDisksBuilder_ == null) { + dataDisks_ = java.util.Collections.emptyList(); + } else { + dataDisks_ = null; + dataDisksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + apiVersion_ = 0; + + if (symptomsBuilder_ == null) { + symptoms_ = java.util.Collections.emptyList(); + } else { + symptoms_ = null; + symptomsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Node_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Node getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.Node.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Node build() { + com.google.cloud.tpu.v2.Node result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Node buildPartial() { + com.google.cloud.tpu.v2.Node result = new com.google.cloud.tpu.v2.Node(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + result.acceleratorType_ = acceleratorType_; + result.state_ = state_; + result.healthDescription_ = healthDescription_; + result.runtimeVersion_ = runtimeVersion_; + if (networkConfigBuilder_ == null) { + result.networkConfig_ = networkConfig_; + } else { + result.networkConfig_ = networkConfigBuilder_.build(); + } + result.cidrBlock_ = cidrBlock_; + if (serviceAccountBuilder_ == null) { + result.serviceAccount_ = serviceAccount_; + } else { + result.serviceAccount_ = serviceAccountBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (schedulingConfigBuilder_ == null) { + result.schedulingConfig_ = schedulingConfig_; + } else { + result.schedulingConfig_ = schedulingConfigBuilder_.build(); + } + if (networkEndpointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + networkEndpoints_ = java.util.Collections.unmodifiableList(networkEndpoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.networkEndpoints_ = networkEndpoints_; + } else { + result.networkEndpoints_ = networkEndpointsBuilder_.build(); + } + result.health_ = health_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + if (((bitField0_ & 0x00000008) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.tags_ = tags_; + result.id_ = id_; + if (dataDisksBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + dataDisks_ = java.util.Collections.unmodifiableList(dataDisks_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.dataDisks_ = dataDisks_; + } else { + result.dataDisks_ = dataDisksBuilder_.build(); + } + result.apiVersion_ = apiVersion_; + if (symptomsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + symptoms_ = java.util.Collections.unmodifiableList(symptoms_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.symptoms_ = symptoms_; + } else { + result.symptoms_ = symptomsBuilder_.build(); + } + if (shieldedInstanceConfigBuilder_ == null) { + result.shieldedInstanceConfig_ = shieldedInstanceConfig_; + } else { + result.shieldedInstanceConfig_ = shieldedInstanceConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.Node) { + return mergeFrom((com.google.cloud.tpu.v2.Node)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.Node other) { + if (other == com.google.cloud.tpu.v2.Node.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getAcceleratorType().isEmpty()) { + acceleratorType_ = other.acceleratorType_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getHealthDescription().isEmpty()) { + healthDescription_ = other.healthDescription_; + onChanged(); + } + if (!other.getRuntimeVersion().isEmpty()) { + runtimeVersion_ = other.runtimeVersion_; + onChanged(); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + if (!other.getCidrBlock().isEmpty()) { + cidrBlock_ = other.cidrBlock_; + onChanged(); + } + if (other.hasServiceAccount()) { + mergeServiceAccount(other.getServiceAccount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasSchedulingConfig()) { + mergeSchedulingConfig(other.getSchedulingConfig()); + } + if (networkEndpointsBuilder_ == null) { + if (!other.networkEndpoints_.isEmpty()) { + if (networkEndpoints_.isEmpty()) { + networkEndpoints_ = other.networkEndpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.addAll(other.networkEndpoints_); + } + onChanged(); + } + } else { + if (!other.networkEndpoints_.isEmpty()) { + if (networkEndpointsBuilder_.isEmpty()) { + networkEndpointsBuilder_.dispose(); + networkEndpointsBuilder_ = null; + networkEndpoints_ = other.networkEndpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + networkEndpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNetworkEndpointsFieldBuilder() : null; + } else { + networkEndpointsBuilder_.addAllMessages(other.networkEndpoints_); + } + } + } + if (other.health_ != 0) { + setHealthValue(other.getHealthValue()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + internalGetMutableMetadata().mergeFrom( + other.internalGetMetadata()); + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (other.getId() != 0L) { + setId(other.getId()); + } + if (dataDisksBuilder_ == null) { + if (!other.dataDisks_.isEmpty()) { + if (dataDisks_.isEmpty()) { + dataDisks_ = other.dataDisks_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureDataDisksIsMutable(); + dataDisks_.addAll(other.dataDisks_); + } + onChanged(); + } + } else { + if (!other.dataDisks_.isEmpty()) { + if (dataDisksBuilder_.isEmpty()) { + dataDisksBuilder_.dispose(); + dataDisksBuilder_ = null; + dataDisks_ = other.dataDisks_; + bitField0_ = (bitField0_ & ~0x00000010); + dataDisksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDataDisksFieldBuilder() : null; + } else { + dataDisksBuilder_.addAllMessages(other.dataDisks_); + } + } + } + if (other.apiVersion_ != 0) { + setApiVersionValue(other.getApiVersionValue()); + } + if (symptomsBuilder_ == null) { + if (!other.symptoms_.isEmpty()) { + if (symptoms_.isEmpty()) { + symptoms_ = other.symptoms_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureSymptomsIsMutable(); + symptoms_.addAll(other.symptoms_); + } + onChanged(); + } + } else { + if (!other.symptoms_.isEmpty()) { + if (symptomsBuilder_.isEmpty()) { + symptomsBuilder_.dispose(); + symptomsBuilder_ = null; + symptoms_ = other.symptoms_; + bitField0_ = (bitField0_ & ~0x00000020); + symptomsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymptomsFieldBuilder() : null; + } else { + symptomsBuilder_.addAllMessages(other.symptoms_); + } + } + } + if (other.hasShieldedInstanceConfig()) { + mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: { + acceleratorType_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 72: { + state_ = input.readEnum(); + + break; + } // case 72 + case 82: { + healthDescription_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: { + runtimeVersion_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 106: { + cidrBlock_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 130: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 130 + case 138: { + input.readMessage( + getSchedulingConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 138 + case 170: { + com.google.cloud.tpu.v2.NetworkEndpoint m = + input.readMessage( + com.google.cloud.tpu.v2.NetworkEndpoint.parser(), + extensionRegistry); + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(m); + } else { + networkEndpointsBuilder_.addMessage(m); + } + break; + } // case 170 + case 176: { + health_ = input.readEnum(); + + break; + } // case 176 + case 194: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } // case 194 + case 264: { + id_ = input.readInt64(); + + break; + } // case 264 + case 274: { + com.google.protobuf.MapEntry + metadata__ = input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMetadata().getMutableMap().put( + metadata__.getKey(), metadata__.getValue()); + break; + } // case 274 + case 290: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 290 + case 298: { + input.readMessage( + getServiceAccountFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 298 + case 304: { + apiVersion_ = input.readEnum(); + + break; + } // case 304 + case 314: { + com.google.cloud.tpu.v2.Symptom m = + input.readMessage( + com.google.cloud.tpu.v2.Symptom.parser(), + extensionRegistry); + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + symptoms_.add(m); + } else { + symptomsBuilder_.addMessage(m); + } + break; + } // case 314 + case 322: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 322 + case 330: { + com.google.cloud.tpu.v2.AttachedDisk m = + input.readMessage( + com.google.cloud.tpu.v2.AttachedDisk.parser(), + extensionRegistry); + if (dataDisksBuilder_ == null) { + ensureDataDisksIsMutable(); + dataDisks_.add(m); + } else { + dataDisksBuilder_.addMessage(m); + } + break; + } // case 330 + case 362: { + input.readMessage( + getShieldedInstanceConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 362 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. Immutable. The name of the TPU.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Immutable. The name of the TPU.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Immutable. The name of the TPU.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The name of the TPU.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The name of the TPU.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The user-supplied description of the TPU. Maximum of 512 characters.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user-supplied description of the TPU. Maximum of 512 characters.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user-supplied description of the TPU. Maximum of 512 characters.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * The user-supplied description of the TPU. Maximum of 512 characters.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * The user-supplied description of the TPU. Maximum of 512 characters.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object acceleratorType_ = ""; + /** + *
+     * Required. The type of hardware accelerators associated with this node.
+     * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The acceleratorType. + */ + public java.lang.String getAcceleratorType() { + java.lang.Object ref = acceleratorType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + acceleratorType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The type of hardware accelerators associated with this node.
+     * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for acceleratorType. + */ + public com.google.protobuf.ByteString + getAcceleratorTypeBytes() { + java.lang.Object ref = acceleratorType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + acceleratorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The type of hardware accelerators associated with this node.
+     * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param value The acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + acceleratorType_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The type of hardware accelerators associated with this node.
+     * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearAcceleratorType() { + + acceleratorType_ = getDefaultInstance().getAcceleratorType(); + onChanged(); + return this; + } + /** + *
+     * Required. The type of hardware accelerators associated with this node.
+     * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + acceleratorType_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state for the TPU Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state for the TPU Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state for the TPU Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Node.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Node.State result = com.google.cloud.tpu.v2.Node.State.valueOf(state_); + return result == null ? com.google.cloud.tpu.v2.Node.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state for the TPU Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.tpu.v2.Node.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state for the TPU Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object healthDescription_ = ""; + /** + *
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
+     * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The healthDescription. + */ + public java.lang.String getHealthDescription() { + java.lang.Object ref = healthDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
+     * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for healthDescription. + */ + public com.google.protobuf.ByteString + getHealthDescriptionBytes() { + java.lang.Object ref = healthDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + healthDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
+     * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The healthDescription to set. + * @return This builder for chaining. + */ + public Builder setHealthDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + healthDescription_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
+     * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearHealthDescription() { + + healthDescription_ = getDefaultInstance().getHealthDescription(); + onChanged(); + return this; + } + /** + *
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
+     * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for healthDescription to set. + * @return This builder for chaining. + */ + public Builder setHealthDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + healthDescription_ = value; + onChanged(); + return this; + } + + private java.lang.Object runtimeVersion_ = ""; + /** + *
+     * Required. The runtime version running in the Node.
+     * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return The runtimeVersion. + */ + public java.lang.String getRuntimeVersion() { + java.lang.Object ref = runtimeVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The runtime version running in the Node.
+     * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for runtimeVersion. + */ + public com.google.protobuf.ByteString + getRuntimeVersionBytes() { + java.lang.Object ref = runtimeVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + runtimeVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The runtime version running in the Node.
+     * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param value The runtimeVersion to set. + * @return This builder for chaining. + */ + public Builder setRuntimeVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtimeVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The runtime version running in the Node.
+     * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearRuntimeVersion() { + + runtimeVersion_ = getDefaultInstance().getRuntimeVersion(); + onChanged(); + return this; + } + /** + *
+     * Required. The runtime version running in the Node.
+     * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for runtimeVersion to set. + * @return This builder for chaining. + */ + public Builder setRuntimeVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtimeVersion_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.NetworkConfig, com.google.cloud.tpu.v2.NetworkConfig.Builder, com.google.cloud.tpu.v2.NetworkConfigOrBuilder> networkConfigBuilder_; + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return networkConfigBuilder_ != null || networkConfig_ != null; + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @return The networkConfig. + */ + public com.google.cloud.tpu.v2.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null ? com.google.cloud.tpu.v2.NetworkConfig.getDefaultInstance() : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + public Builder setNetworkConfig(com.google.cloud.tpu.v2.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + onChanged(); + } else { + networkConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + public Builder setNetworkConfig( + com.google.cloud.tpu.v2.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + onChanged(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + public Builder mergeNetworkConfig(com.google.cloud.tpu.v2.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (networkConfig_ != null) { + networkConfig_ = + com.google.cloud.tpu.v2.NetworkConfig.newBuilder(networkConfig_).mergeFrom(value).buildPartial(); + } else { + networkConfig_ = value; + } + onChanged(); + } else { + networkConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + public Builder clearNetworkConfig() { + if (networkConfigBuilder_ == null) { + networkConfig_ = null; + onChanged(); + } else { + networkConfig_ = null; + networkConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + public com.google.cloud.tpu.v2.NetworkConfig.Builder getNetworkConfigBuilder() { + + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + public com.google.cloud.tpu.v2.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null ? + com.google.cloud.tpu.v2.NetworkConfig.getDefaultInstance() : networkConfig_; + } + } + /** + *
+     * Network configurations for the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.NetworkConfig, com.google.cloud.tpu.v2.NetworkConfig.Builder, com.google.cloud.tpu.v2.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.NetworkConfig, com.google.cloud.tpu.v2.NetworkConfig.Builder, com.google.cloud.tpu.v2.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private java.lang.Object cidrBlock_ = ""; + /** + *
+     * The CIDR block that the TPU node will use when selecting an IP address.
+     * This CIDR block must be a /29 block; the Compute Engine networks API
+     * forbids a smaller block, and using a larger block would be wasteful (a
+     * node can only consume one IP address). Errors will occur if the CIDR block
+     * has already been used for a currently existing TPU node, the CIDR block
+     * conflicts with any subnetworks in the user's provided network, or the
+     * provided network is peered with another network that is using that CIDR
+     * block.
+     * 
+ * + * string cidr_block = 13; + * @return The cidrBlock. + */ + public java.lang.String getCidrBlock() { + java.lang.Object ref = cidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The CIDR block that the TPU node will use when selecting an IP address.
+     * This CIDR block must be a /29 block; the Compute Engine networks API
+     * forbids a smaller block, and using a larger block would be wasteful (a
+     * node can only consume one IP address). Errors will occur if the CIDR block
+     * has already been used for a currently existing TPU node, the CIDR block
+     * conflicts with any subnetworks in the user's provided network, or the
+     * provided network is peered with another network that is using that CIDR
+     * block.
+     * 
+ * + * string cidr_block = 13; + * @return The bytes for cidrBlock. + */ + public com.google.protobuf.ByteString + getCidrBlockBytes() { + java.lang.Object ref = cidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The CIDR block that the TPU node will use when selecting an IP address.
+     * This CIDR block must be a /29 block; the Compute Engine networks API
+     * forbids a smaller block, and using a larger block would be wasteful (a
+     * node can only consume one IP address). Errors will occur if the CIDR block
+     * has already been used for a currently existing TPU node, the CIDR block
+     * conflicts with any subnetworks in the user's provided network, or the
+     * provided network is peered with another network that is using that CIDR
+     * block.
+     * 
+ * + * string cidr_block = 13; + * @param value The cidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCidrBlock( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cidrBlock_ = value; + onChanged(); + return this; + } + /** + *
+     * The CIDR block that the TPU node will use when selecting an IP address.
+     * This CIDR block must be a /29 block; the Compute Engine networks API
+     * forbids a smaller block, and using a larger block would be wasteful (a
+     * node can only consume one IP address). Errors will occur if the CIDR block
+     * has already been used for a currently existing TPU node, the CIDR block
+     * conflicts with any subnetworks in the user's provided network, or the
+     * provided network is peered with another network that is using that CIDR
+     * block.
+     * 
+ * + * string cidr_block = 13; + * @return This builder for chaining. + */ + public Builder clearCidrBlock() { + + cidrBlock_ = getDefaultInstance().getCidrBlock(); + onChanged(); + return this; + } + /** + *
+     * The CIDR block that the TPU node will use when selecting an IP address.
+     * This CIDR block must be a /29 block; the Compute Engine networks API
+     * forbids a smaller block, and using a larger block would be wasteful (a
+     * node can only consume one IP address). Errors will occur if the CIDR block
+     * has already been used for a currently existing TPU node, the CIDR block
+     * conflicts with any subnetworks in the user's provided network, or the
+     * provided network is peered with another network that is using that CIDR
+     * block.
+     * 
+ * + * string cidr_block = 13; + * @param value The bytes for cidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCidrBlockBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cidrBlock_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2.ServiceAccount serviceAccount_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ServiceAccount, com.google.cloud.tpu.v2.ServiceAccount.Builder, com.google.cloud.tpu.v2.ServiceAccountOrBuilder> serviceAccountBuilder_; + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @return Whether the serviceAccount field is set. + */ + public boolean hasServiceAccount() { + return serviceAccountBuilder_ != null || serviceAccount_ != null; + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @return The serviceAccount. + */ + public com.google.cloud.tpu.v2.ServiceAccount getServiceAccount() { + if (serviceAccountBuilder_ == null) { + return serviceAccount_ == null ? com.google.cloud.tpu.v2.ServiceAccount.getDefaultInstance() : serviceAccount_; + } else { + return serviceAccountBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + public Builder setServiceAccount(com.google.cloud.tpu.v2.ServiceAccount value) { + if (serviceAccountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + onChanged(); + } else { + serviceAccountBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + public Builder setServiceAccount( + com.google.cloud.tpu.v2.ServiceAccount.Builder builderForValue) { + if (serviceAccountBuilder_ == null) { + serviceAccount_ = builderForValue.build(); + onChanged(); + } else { + serviceAccountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + public Builder mergeServiceAccount(com.google.cloud.tpu.v2.ServiceAccount value) { + if (serviceAccountBuilder_ == null) { + if (serviceAccount_ != null) { + serviceAccount_ = + com.google.cloud.tpu.v2.ServiceAccount.newBuilder(serviceAccount_).mergeFrom(value).buildPartial(); + } else { + serviceAccount_ = value; + } + onChanged(); + } else { + serviceAccountBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + public Builder clearServiceAccount() { + if (serviceAccountBuilder_ == null) { + serviceAccount_ = null; + onChanged(); + } else { + serviceAccount_ = null; + serviceAccountBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + public com.google.cloud.tpu.v2.ServiceAccount.Builder getServiceAccountBuilder() { + + onChanged(); + return getServiceAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + public com.google.cloud.tpu.v2.ServiceAccountOrBuilder getServiceAccountOrBuilder() { + if (serviceAccountBuilder_ != null) { + return serviceAccountBuilder_.getMessageOrBuilder(); + } else { + return serviceAccount_ == null ? + com.google.cloud.tpu.v2.ServiceAccount.getDefaultInstance() : serviceAccount_; + } + } + /** + *
+     * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+     * If None is specified, the default compute service account will be used.
+     * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ServiceAccount, com.google.cloud.tpu.v2.ServiceAccount.Builder, com.google.cloud.tpu.v2.ServiceAccountOrBuilder> + getServiceAccountFieldBuilder() { + if (serviceAccountBuilder_ == null) { + serviceAccountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ServiceAccount, com.google.cloud.tpu.v2.ServiceAccount.Builder, com.google.cloud.tpu.v2.ServiceAccountOrBuilder>( + getServiceAccount(), + getParentForChildren(), + isClean()); + serviceAccount_ = null; + } + return serviceAccountBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the node was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.cloud.tpu.v2.SchedulingConfig schedulingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.SchedulingConfig, com.google.cloud.tpu.v2.SchedulingConfig.Builder, com.google.cloud.tpu.v2.SchedulingConfigOrBuilder> schedulingConfigBuilder_; + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @return Whether the schedulingConfig field is set. + */ + public boolean hasSchedulingConfig() { + return schedulingConfigBuilder_ != null || schedulingConfig_ != null; + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @return The schedulingConfig. + */ + public com.google.cloud.tpu.v2.SchedulingConfig getSchedulingConfig() { + if (schedulingConfigBuilder_ == null) { + return schedulingConfig_ == null ? com.google.cloud.tpu.v2.SchedulingConfig.getDefaultInstance() : schedulingConfig_; + } else { + return schedulingConfigBuilder_.getMessage(); + } + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + public Builder setSchedulingConfig(com.google.cloud.tpu.v2.SchedulingConfig value) { + if (schedulingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schedulingConfig_ = value; + onChanged(); + } else { + schedulingConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + public Builder setSchedulingConfig( + com.google.cloud.tpu.v2.SchedulingConfig.Builder builderForValue) { + if (schedulingConfigBuilder_ == null) { + schedulingConfig_ = builderForValue.build(); + onChanged(); + } else { + schedulingConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + public Builder mergeSchedulingConfig(com.google.cloud.tpu.v2.SchedulingConfig value) { + if (schedulingConfigBuilder_ == null) { + if (schedulingConfig_ != null) { + schedulingConfig_ = + com.google.cloud.tpu.v2.SchedulingConfig.newBuilder(schedulingConfig_).mergeFrom(value).buildPartial(); + } else { + schedulingConfig_ = value; + } + onChanged(); + } else { + schedulingConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + public Builder clearSchedulingConfig() { + if (schedulingConfigBuilder_ == null) { + schedulingConfig_ = null; + onChanged(); + } else { + schedulingConfig_ = null; + schedulingConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + public com.google.cloud.tpu.v2.SchedulingConfig.Builder getSchedulingConfigBuilder() { + + onChanged(); + return getSchedulingConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + public com.google.cloud.tpu.v2.SchedulingConfigOrBuilder getSchedulingConfigOrBuilder() { + if (schedulingConfigBuilder_ != null) { + return schedulingConfigBuilder_.getMessageOrBuilder(); + } else { + return schedulingConfig_ == null ? + com.google.cloud.tpu.v2.SchedulingConfig.getDefaultInstance() : schedulingConfig_; + } + } + /** + *
+     * The scheduling options for this node.
+     * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.SchedulingConfig, com.google.cloud.tpu.v2.SchedulingConfig.Builder, com.google.cloud.tpu.v2.SchedulingConfigOrBuilder> + getSchedulingConfigFieldBuilder() { + if (schedulingConfigBuilder_ == null) { + schedulingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.SchedulingConfig, com.google.cloud.tpu.v2.SchedulingConfig.Builder, com.google.cloud.tpu.v2.SchedulingConfigOrBuilder>( + getSchedulingConfig(), + getParentForChildren(), + isClean()); + schedulingConfig_ = null; + } + return schedulingConfigBuilder_; + } + + private java.util.List networkEndpoints_ = + java.util.Collections.emptyList(); + private void ensureNetworkEndpointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + networkEndpoints_ = new java.util.ArrayList(networkEndpoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.NetworkEndpoint, com.google.cloud.tpu.v2.NetworkEndpoint.Builder, com.google.cloud.tpu.v2.NetworkEndpointOrBuilder> networkEndpointsBuilder_; + + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getNetworkEndpointsList() { + if (networkEndpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(networkEndpoints_); + } else { + return networkEndpointsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getNetworkEndpointsCount() { + if (networkEndpointsBuilder_ == null) { + return networkEndpoints_.size(); + } else { + return networkEndpointsBuilder_.getCount(); + } + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.NetworkEndpoint getNetworkEndpoints(int index) { + if (networkEndpointsBuilder_ == null) { + return networkEndpoints_.get(index); + } else { + return networkEndpointsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkEndpoints( + int index, com.google.cloud.tpu.v2.NetworkEndpoint value) { + if (networkEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.set(index, value); + onChanged(); + } else { + networkEndpointsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkEndpoints( + int index, com.google.cloud.tpu.v2.NetworkEndpoint.Builder builderForValue) { + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + networkEndpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addNetworkEndpoints(com.google.cloud.tpu.v2.NetworkEndpoint value) { + if (networkEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(value); + onChanged(); + } else { + networkEndpointsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addNetworkEndpoints( + int index, com.google.cloud.tpu.v2.NetworkEndpoint value) { + if (networkEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(index, value); + onChanged(); + } else { + networkEndpointsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addNetworkEndpoints( + com.google.cloud.tpu.v2.NetworkEndpoint.Builder builderForValue) { + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(builderForValue.build()); + onChanged(); + } else { + networkEndpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addNetworkEndpoints( + int index, com.google.cloud.tpu.v2.NetworkEndpoint.Builder builderForValue) { + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + networkEndpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllNetworkEndpoints( + java.lang.Iterable values) { + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, networkEndpoints_); + onChanged(); + } else { + networkEndpointsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearNetworkEndpoints() { + if (networkEndpointsBuilder_ == null) { + networkEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + networkEndpointsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeNetworkEndpoints(int index) { + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.remove(index); + onChanged(); + } else { + networkEndpointsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.NetworkEndpoint.Builder getNetworkEndpointsBuilder( + int index) { + return getNetworkEndpointsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( + int index) { + if (networkEndpointsBuilder_ == null) { + return networkEndpoints_.get(index); } else { + return networkEndpointsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getNetworkEndpointsOrBuilderList() { + if (networkEndpointsBuilder_ != null) { + return networkEndpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(networkEndpoints_); + } + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.NetworkEndpoint.Builder addNetworkEndpointsBuilder() { + return getNetworkEndpointsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.NetworkEndpoint.getDefaultInstance()); + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.NetworkEndpoint.Builder addNetworkEndpointsBuilder( + int index) { + return getNetworkEndpointsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.NetworkEndpoint.getDefaultInstance()); + } + /** + *
+     * Output only. The network endpoints where TPU workers can be accessed and
+     * sent work. It is recommended that runtime clients of the node reach out
+     * to the 0th entry in this map first.
+     * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getNetworkEndpointsBuilderList() { + return getNetworkEndpointsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.NetworkEndpoint, com.google.cloud.tpu.v2.NetworkEndpoint.Builder, com.google.cloud.tpu.v2.NetworkEndpointOrBuilder> + getNetworkEndpointsFieldBuilder() { + if (networkEndpointsBuilder_ == null) { + networkEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.NetworkEndpoint, com.google.cloud.tpu.v2.NetworkEndpoint.Builder, com.google.cloud.tpu.v2.NetworkEndpointOrBuilder>( + networkEndpoints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + networkEndpoints_ = null; + } + return networkEndpointsBuilder_; + } + + private int health_ = 0; + /** + *
+     * The health status of the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @return The enum numeric value on the wire for health. + */ + @java.lang.Override public int getHealthValue() { + return health_; + } + /** + *
+     * The health status of the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @param value The enum numeric value on the wire for health to set. + * @return This builder for chaining. + */ + public Builder setHealthValue(int value) { + + health_ = value; + onChanged(); + return this; + } + /** + *
+     * The health status of the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @return The health. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Node.Health getHealth() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Node.Health result = com.google.cloud.tpu.v2.Node.Health.valueOf(health_); + return result == null ? com.google.cloud.tpu.v2.Node.Health.UNRECOGNIZED : result; + } + /** + *
+     * The health status of the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @param value The health to set. + * @return This builder for chaining. + */ + public Builder setHealth(com.google.cloud.tpu.v2.Node.Health value) { + if (value == null) { + throw new NullPointerException(); + } + + health_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The health status of the TPU node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @return This builder for chaining. + */ + public Builder clearHealth() { + + health_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 24; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 24; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 24; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 24; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 24; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 24; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Resource labels to represent user-provided metadata.
+     * 
+ * + * map<string, string> labels = 24; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + private com.google.protobuf.MapField + internalGetMutableMetadata() { + onChanged();; + if (metadata_ == null) { + metadata_ = com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+     * Custom metadata to apply to the TPU Node.
+     * Can set startup-script and shutdown-script
+     * 
+ * + * map<string, string> metadata = 34; + */ + + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+     * Custom metadata to apply to the TPU Node.
+     * Can set startup-script and shutdown-script
+     * 
+ * + * map<string, string> metadata = 34; + */ + @java.lang.Override + + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+     * Custom metadata to apply to the TPU Node.
+     * Can set startup-script and shutdown-script
+     * 
+ * + * map<string, string> metadata = 34; + */ + @java.lang.Override + + public java.lang.String getMetadataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Custom metadata to apply to the TPU Node.
+     * Can set startup-script and shutdown-script
+     * 
+ * + * map<string, string> metadata = 34; + */ + @java.lang.Override + + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + internalGetMutableMetadata().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Custom metadata to apply to the TPU Node.
+     * Can set startup-script and shutdown-script
+     * 
+ * + * map<string, string> metadata = 34; + */ + + public Builder removeMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMetadata().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetadata() { + return internalGetMutableMetadata().getMutableMap(); + } + /** + *
+     * Custom metadata to apply to the TPU Node.
+     * Can set startup-script and shutdown-script
+     * 
+ * + * map<string, string> metadata = 34; + */ + public Builder putMetadata( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableMetadata().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Custom metadata to apply to the TPU Node.
+     * Can set startup-script and shutdown-script
+     * 
+ * + * map<string, string> metadata = 34; + */ + + public Builder putAllMetadata( + java.util.Map values) { + internalGetMutableMetadata().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000008; + } + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + return this; + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+     * targets for network firewalls.
+     * 
+ * + * repeated string tags = 40; + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private long id_ ; + /** + *
+     * Output only. The unique identifier for the TPU Node.
+     * 
+ * + * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + *
+     * Output only. The unique identifier for the TPU Node.
+     * 
+ * + * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The unique identifier for the TPU Node.
+     * 
+ * + * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0L; + onChanged(); + return this; + } + + private java.util.List dataDisks_ = + java.util.Collections.emptyList(); + private void ensureDataDisksIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + dataDisks_ = new java.util.ArrayList(dataDisks_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.AttachedDisk, com.google.cloud.tpu.v2.AttachedDisk.Builder, com.google.cloud.tpu.v2.AttachedDiskOrBuilder> dataDisksBuilder_; + + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public java.util.List getDataDisksList() { + if (dataDisksBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataDisks_); + } else { + return dataDisksBuilder_.getMessageList(); + } + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public int getDataDisksCount() { + if (dataDisksBuilder_ == null) { + return dataDisks_.size(); + } else { + return dataDisksBuilder_.getCount(); + } + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public com.google.cloud.tpu.v2.AttachedDisk getDataDisks(int index) { + if (dataDisksBuilder_ == null) { + return dataDisks_.get(index); + } else { + return dataDisksBuilder_.getMessage(index); + } + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder setDataDisks( + int index, com.google.cloud.tpu.v2.AttachedDisk value) { + if (dataDisksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataDisksIsMutable(); + dataDisks_.set(index, value); + onChanged(); + } else { + dataDisksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder setDataDisks( + int index, com.google.cloud.tpu.v2.AttachedDisk.Builder builderForValue) { + if (dataDisksBuilder_ == null) { + ensureDataDisksIsMutable(); + dataDisks_.set(index, builderForValue.build()); + onChanged(); + } else { + dataDisksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder addDataDisks(com.google.cloud.tpu.v2.AttachedDisk value) { + if (dataDisksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataDisksIsMutable(); + dataDisks_.add(value); + onChanged(); + } else { + dataDisksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder addDataDisks( + int index, com.google.cloud.tpu.v2.AttachedDisk value) { + if (dataDisksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataDisksIsMutable(); + dataDisks_.add(index, value); + onChanged(); + } else { + dataDisksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder addDataDisks( + com.google.cloud.tpu.v2.AttachedDisk.Builder builderForValue) { + if (dataDisksBuilder_ == null) { + ensureDataDisksIsMutable(); + dataDisks_.add(builderForValue.build()); + onChanged(); + } else { + dataDisksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder addDataDisks( + int index, com.google.cloud.tpu.v2.AttachedDisk.Builder builderForValue) { + if (dataDisksBuilder_ == null) { + ensureDataDisksIsMutable(); + dataDisks_.add(index, builderForValue.build()); + onChanged(); + } else { + dataDisksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder addAllDataDisks( + java.lang.Iterable values) { + if (dataDisksBuilder_ == null) { + ensureDataDisksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dataDisks_); + onChanged(); + } else { + dataDisksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder clearDataDisks() { + if (dataDisksBuilder_ == null) { + dataDisks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + dataDisksBuilder_.clear(); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public Builder removeDataDisks(int index) { + if (dataDisksBuilder_ == null) { + ensureDataDisksIsMutable(); + dataDisks_.remove(index); + onChanged(); + } else { + dataDisksBuilder_.remove(index); + } + return this; + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public com.google.cloud.tpu.v2.AttachedDisk.Builder getDataDisksBuilder( + int index) { + return getDataDisksFieldBuilder().getBuilder(index); + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public com.google.cloud.tpu.v2.AttachedDiskOrBuilder getDataDisksOrBuilder( + int index) { + if (dataDisksBuilder_ == null) { + return dataDisks_.get(index); } else { + return dataDisksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public java.util.List + getDataDisksOrBuilderList() { + if (dataDisksBuilder_ != null) { + return dataDisksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataDisks_); + } + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public com.google.cloud.tpu.v2.AttachedDisk.Builder addDataDisksBuilder() { + return getDataDisksFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.AttachedDisk.getDefaultInstance()); + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public com.google.cloud.tpu.v2.AttachedDisk.Builder addDataDisksBuilder( + int index) { + return getDataDisksFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.AttachedDisk.getDefaultInstance()); + } + /** + *
+     * The additional data disks for the Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + public java.util.List + getDataDisksBuilderList() { + return getDataDisksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.AttachedDisk, com.google.cloud.tpu.v2.AttachedDisk.Builder, com.google.cloud.tpu.v2.AttachedDiskOrBuilder> + getDataDisksFieldBuilder() { + if (dataDisksBuilder_ == null) { + dataDisksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.AttachedDisk, com.google.cloud.tpu.v2.AttachedDisk.Builder, com.google.cloud.tpu.v2.AttachedDiskOrBuilder>( + dataDisks_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + dataDisks_ = null; + } + return dataDisksBuilder_; + } + + private int apiVersion_ = 0; + /** + *
+     * Output only. The API version that created this Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for apiVersion. + */ + @java.lang.Override public int getApiVersionValue() { + return apiVersion_; + } + /** + *
+     * Output only. The API version that created this Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionValue(int value) { + + apiVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The API version that created this Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Node.ApiVersion getApiVersion() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Node.ApiVersion result = com.google.cloud.tpu.v2.Node.ApiVersion.valueOf(apiVersion_); + return result == null ? com.google.cloud.tpu.v2.Node.ApiVersion.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The API version that created this Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(com.google.cloud.tpu.v2.Node.ApiVersion value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The API version that created this Node.
+     * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = 0; + onChanged(); + return this; + } + + private java.util.List symptoms_ = + java.util.Collections.emptyList(); + private void ensureSymptomsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + symptoms_ = new java.util.ArrayList(symptoms_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.Symptom, com.google.cloud.tpu.v2.Symptom.Builder, com.google.cloud.tpu.v2.SymptomOrBuilder> symptomsBuilder_; + + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getSymptomsList() { + if (symptomsBuilder_ == null) { + return java.util.Collections.unmodifiableList(symptoms_); + } else { + return symptomsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getSymptomsCount() { + if (symptomsBuilder_ == null) { + return symptoms_.size(); + } else { + return symptomsBuilder_.getCount(); + } + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.Symptom getSymptoms(int index) { + if (symptomsBuilder_ == null) { + return symptoms_.get(index); + } else { + return symptomsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setSymptoms( + int index, com.google.cloud.tpu.v2.Symptom value) { + if (symptomsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymptomsIsMutable(); + symptoms_.set(index, value); + onChanged(); + } else { + symptomsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setSymptoms( + int index, com.google.cloud.tpu.v2.Symptom.Builder builderForValue) { + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + symptoms_.set(index, builderForValue.build()); + onChanged(); + } else { + symptomsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addSymptoms(com.google.cloud.tpu.v2.Symptom value) { + if (symptomsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymptomsIsMutable(); + symptoms_.add(value); + onChanged(); + } else { + symptomsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addSymptoms( + int index, com.google.cloud.tpu.v2.Symptom value) { + if (symptomsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymptomsIsMutable(); + symptoms_.add(index, value); + onChanged(); + } else { + symptomsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addSymptoms( + com.google.cloud.tpu.v2.Symptom.Builder builderForValue) { + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + symptoms_.add(builderForValue.build()); + onChanged(); + } else { + symptomsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addSymptoms( + int index, com.google.cloud.tpu.v2.Symptom.Builder builderForValue) { + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + symptoms_.add(index, builderForValue.build()); + onChanged(); + } else { + symptomsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllSymptoms( + java.lang.Iterable values) { + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symptoms_); + onChanged(); + } else { + symptomsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearSymptoms() { + if (symptomsBuilder_ == null) { + symptoms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + symptomsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeSymptoms(int index) { + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + symptoms_.remove(index); + onChanged(); + } else { + symptomsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.Symptom.Builder getSymptomsBuilder( + int index) { + return getSymptomsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.SymptomOrBuilder getSymptomsOrBuilder( + int index) { + if (symptomsBuilder_ == null) { + return symptoms_.get(index); } else { + return symptomsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getSymptomsOrBuilderList() { + if (symptomsBuilder_ != null) { + return symptomsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(symptoms_); + } + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.Symptom.Builder addSymptomsBuilder() { + return getSymptomsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2.Symptom.getDefaultInstance()); + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2.Symptom.Builder addSymptomsBuilder( + int index) { + return getSymptomsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2.Symptom.getDefaultInstance()); + } + /** + *
+     * Output only. The Symptoms that have occurred to the TPU Node.
+     * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getSymptomsBuilderList() { + return getSymptomsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.Symptom, com.google.cloud.tpu.v2.Symptom.Builder, com.google.cloud.tpu.v2.SymptomOrBuilder> + getSymptomsFieldBuilder() { + if (symptomsBuilder_ == null) { + symptomsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2.Symptom, com.google.cloud.tpu.v2.Symptom.Builder, com.google.cloud.tpu.v2.SymptomOrBuilder>( + symptoms_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + symptoms_ = null; + } + return symptomsBuilder_; + } + + private com.google.cloud.tpu.v2.ShieldedInstanceConfig shieldedInstanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ShieldedInstanceConfig, com.google.cloud.tpu.v2.ShieldedInstanceConfig.Builder, com.google.cloud.tpu.v2.ShieldedInstanceConfigOrBuilder> shieldedInstanceConfigBuilder_; + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @return Whether the shieldedInstanceConfig field is set. + */ + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfigBuilder_ != null || shieldedInstanceConfig_ != null; + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @return The shieldedInstanceConfig. + */ + public com.google.cloud.tpu.v2.ShieldedInstanceConfig getShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + return shieldedInstanceConfig_ == null ? com.google.cloud.tpu.v2.ShieldedInstanceConfig.getDefaultInstance() : shieldedInstanceConfig_; + } else { + return shieldedInstanceConfigBuilder_.getMessage(); + } + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + public Builder setShieldedInstanceConfig(com.google.cloud.tpu.v2.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedInstanceConfig_ = value; + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + public Builder setShieldedInstanceConfig( + com.google.cloud.tpu.v2.ShieldedInstanceConfig.Builder builderForValue) { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = builderForValue.build(); + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + public Builder mergeShieldedInstanceConfig(com.google.cloud.tpu.v2.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (shieldedInstanceConfig_ != null) { + shieldedInstanceConfig_ = + com.google.cloud.tpu.v2.ShieldedInstanceConfig.newBuilder(shieldedInstanceConfig_).mergeFrom(value).buildPartial(); + } else { + shieldedInstanceConfig_ = value; + } + onChanged(); + } else { + shieldedInstanceConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + public Builder clearShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + onChanged(); + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + public com.google.cloud.tpu.v2.ShieldedInstanceConfig.Builder getShieldedInstanceConfigBuilder() { + + onChanged(); + return getShieldedInstanceConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + public com.google.cloud.tpu.v2.ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder() { + if (shieldedInstanceConfigBuilder_ != null) { + return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedInstanceConfig_ == null ? + com.google.cloud.tpu.v2.ShieldedInstanceConfig.getDefaultInstance() : shieldedInstanceConfig_; + } + } + /** + *
+     * Shielded Instance options.
+     * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ShieldedInstanceConfig, com.google.cloud.tpu.v2.ShieldedInstanceConfig.Builder, com.google.cloud.tpu.v2.ShieldedInstanceConfigOrBuilder> + getShieldedInstanceConfigFieldBuilder() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.ShieldedInstanceConfig, com.google.cloud.tpu.v2.ShieldedInstanceConfig.Builder, com.google.cloud.tpu.v2.ShieldedInstanceConfigOrBuilder>( + getShieldedInstanceConfig(), + getParentForChildren(), + isClean()); + shieldedInstanceConfig_ = null; + } + return shieldedInstanceConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.Node) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.Node) + private static final com.google.cloud.tpu.v2.Node DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.Node(); + } + + public static com.google.cloud.tpu.v2.Node getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Node parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Node getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeName.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeName.java new file mode 100644 index 000000000000..515bd4c164fe --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeName.java @@ -0,0 +1,217 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class NodeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NODE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/nodes/{node}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String node; + + @Deprecated + protected NodeName() { + project = null; + location = null; + node = null; + } + + private NodeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + node = Preconditions.checkNotNull(builder.getNode()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNode() { + return node; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NodeName of(String project, String location, String node) { + return newBuilder().setProject(project).setLocation(location).setNode(node).build(); + } + + public static String format(String project, String location, String node) { + return newBuilder().setProject(project).setLocation(location).setNode(node).build().toString(); + } + + public static NodeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NODE.validatedMatch( + formattedString, "NodeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("node")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NodeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NODE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (node != null) { + fieldMapBuilder.put("node", node); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NODE.instantiate( + "project", project, "location", location, "node", node); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NodeName that = ((NodeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.node, that.node); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(node); + return h; + } + + /** Builder for projects/{project}/locations/{location}/nodes/{node}. */ + public static class Builder { + private String project; + private String location; + private String node; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNode() { + return node; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNode(String node) { + this.node = node; + return this; + } + + private Builder(NodeName nodeName) { + this.project = nodeName.project; + this.location = nodeName.location; + this.node = nodeName.node; + } + + public NodeName build() { + return new NodeName(this); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeOrBuilder.java new file mode 100644 index 000000000000..390e82da0dfd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/NodeOrBuilder.java @@ -0,0 +1,654 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface NodeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.Node) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. Immutable. The name of the TPU.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. Immutable. The name of the TPU.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The user-supplied description of the TPU. Maximum of 512 characters.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The user-supplied description of the TPU. Maximum of 512 characters.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Required. The type of hardware accelerators associated with this node.
+   * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The acceleratorType. + */ + java.lang.String getAcceleratorType(); + /** + *
+   * Required. The type of hardware accelerators associated with this node.
+   * 
+ * + * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for acceleratorType. + */ + com.google.protobuf.ByteString + getAcceleratorTypeBytes(); + + /** + *
+   * Output only. The current state for the TPU Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state for the TPU Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.tpu.v2.Node.State getState(); + + /** + *
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
+   * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The healthDescription. + */ + java.lang.String getHealthDescription(); + /** + *
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
+   * 
+ * + * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for healthDescription. + */ + com.google.protobuf.ByteString + getHealthDescriptionBytes(); + + /** + *
+   * Required. The runtime version running in the Node.
+   * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return The runtimeVersion. + */ + java.lang.String getRuntimeVersion(); + /** + *
+   * Required. The runtime version running in the Node.
+   * 
+ * + * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for runtimeVersion. + */ + com.google.protobuf.ByteString + getRuntimeVersionBytes(); + + /** + *
+   * Network configurations for the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + *
+   * Network configurations for the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @return The networkConfig. + */ + com.google.cloud.tpu.v2.NetworkConfig getNetworkConfig(); + /** + *
+   * Network configurations for the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + com.google.cloud.tpu.v2.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); + + /** + *
+   * The CIDR block that the TPU node will use when selecting an IP address.
+   * This CIDR block must be a /29 block; the Compute Engine networks API
+   * forbids a smaller block, and using a larger block would be wasteful (a
+   * node can only consume one IP address). Errors will occur if the CIDR block
+   * has already been used for a currently existing TPU node, the CIDR block
+   * conflicts with any subnetworks in the user's provided network, or the
+   * provided network is peered with another network that is using that CIDR
+   * block.
+   * 
+ * + * string cidr_block = 13; + * @return The cidrBlock. + */ + java.lang.String getCidrBlock(); + /** + *
+   * The CIDR block that the TPU node will use when selecting an IP address.
+   * This CIDR block must be a /29 block; the Compute Engine networks API
+   * forbids a smaller block, and using a larger block would be wasteful (a
+   * node can only consume one IP address). Errors will occur if the CIDR block
+   * has already been used for a currently existing TPU node, the CIDR block
+   * conflicts with any subnetworks in the user's provided network, or the
+   * provided network is peered with another network that is using that CIDR
+   * block.
+   * 
+ * + * string cidr_block = 13; + * @return The bytes for cidrBlock. + */ + com.google.protobuf.ByteString + getCidrBlockBytes(); + + /** + *
+   * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+   * If None is specified, the default compute service account will be used.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @return Whether the serviceAccount field is set. + */ + boolean hasServiceAccount(); + /** + *
+   * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+   * If None is specified, the default compute service account will be used.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @return The serviceAccount. + */ + com.google.cloud.tpu.v2.ServiceAccount getServiceAccount(); + /** + *
+   * The Google Cloud Platform Service Account to be used by the TPU node VMs.
+   * If None is specified, the default compute service account will be used.
+   * 
+ * + * .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + com.google.cloud.tpu.v2.ServiceAccountOrBuilder getServiceAccountOrBuilder(); + + /** + *
+   * Output only. The time when the node was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the node was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the node was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The scheduling options for this node.
+   * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @return Whether the schedulingConfig field is set. + */ + boolean hasSchedulingConfig(); + /** + *
+   * The scheduling options for this node.
+   * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @return The schedulingConfig. + */ + com.google.cloud.tpu.v2.SchedulingConfig getSchedulingConfig(); + /** + *
+   * The scheduling options for this node.
+   * 
+ * + * .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + com.google.cloud.tpu.v2.SchedulingConfigOrBuilder getSchedulingConfigOrBuilder(); + + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getNetworkEndpointsList(); + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.tpu.v2.NetworkEndpoint getNetworkEndpoints(int index); + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getNetworkEndpointsCount(); + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getNetworkEndpointsOrBuilderList(); + /** + *
+   * Output only. The network endpoints where TPU workers can be accessed and
+   * sent work. It is recommended that runtime clients of the node reach out
+   * to the 0th entry in this map first.
+   * 
+ * + * repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.tpu.v2.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( + int index); + + /** + *
+   * The health status of the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @return The enum numeric value on the wire for health. + */ + int getHealthValue(); + /** + *
+   * The health status of the TPU node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.Health health = 22; + * @return The health. + */ + com.google.cloud.tpu.v2.Node.Health getHealth(); + + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + int getLabelsCount(); + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Resource labels to represent user-provided metadata.
+   * 
+ * + * map<string, string> labels = 24; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + int getMetadataCount(); + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + boolean containsMetadata( + java.lang.String key); + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetadata(); + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + java.util.Map + getMetadataMap(); + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + + /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Custom metadata to apply to the TPU Node.
+   * Can set startup-script and shutdown-script
+   * 
+ * + * map<string, string> metadata = 34; + */ + + java.lang.String getMetadataOrThrow( + java.lang.String key); + + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @return A list containing the tags. + */ + java.util.List + getTagsList(); + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @return The count of tags. + */ + int getTagsCount(); + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + *
+   * Tags to apply to the TPU Node. Tags are used to identify valid sources or
+   * targets for network firewalls.
+   * 
+ * + * repeated string tags = 40; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString + getTagsBytes(int index); + + /** + *
+   * Output only. The unique identifier for the TPU Node.
+   * 
+ * + * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The id. + */ + long getId(); + + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + java.util.List + getDataDisksList(); + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + com.google.cloud.tpu.v2.AttachedDisk getDataDisks(int index); + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + int getDataDisksCount(); + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + java.util.List + getDataDisksOrBuilderList(); + /** + *
+   * The additional data disks for the Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + com.google.cloud.tpu.v2.AttachedDiskOrBuilder getDataDisksOrBuilder( + int index); + + /** + *
+   * Output only. The API version that created this Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for apiVersion. + */ + int getApiVersionValue(); + /** + *
+   * Output only. The API version that created this Node.
+   * 
+ * + * .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + com.google.cloud.tpu.v2.Node.ApiVersion getApiVersion(); + + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getSymptomsList(); + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.tpu.v2.Symptom getSymptoms(int index); + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getSymptomsCount(); + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getSymptomsOrBuilderList(); + /** + *
+   * Output only. The Symptoms that have occurred to the TPU Node.
+   * 
+ * + * repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.tpu.v2.SymptomOrBuilder getSymptomsOrBuilder( + int index); + + /** + *
+   * Shielded Instance options.
+   * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @return Whether the shieldedInstanceConfig field is set. + */ + boolean hasShieldedInstanceConfig(); + /** + *
+   * Shielded Instance options.
+   * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @return The shieldedInstanceConfig. + */ + com.google.cloud.tpu.v2.ShieldedInstanceConfig getShieldedInstanceConfig(); + /** + *
+   * Shielded Instance options.
+   * 
+ * + * .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + com.google.cloud.tpu.v2.ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadata.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadata.java new file mode 100644 index 000000000000..1086172b1dff --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadata.java @@ -0,0 +1,1617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Metadata describing an [Operation][google.longrunning.Operation]
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusDetail_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.OperationMetadata.class, com.google.cloud.tpu.v2.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + *
+   * Target of the operation - for example
+   * projects/project-1/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + *
+   * Target of the operation - for example
+   * projects/project-1/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + private volatile java.lang.Object verb_; + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_DETAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object statusDetail_; + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * @return The statusDetail. + */ + @java.lang.Override + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } + } + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * @return The bytes for statusDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CANCEL_REQUESTED_FIELD_NUMBER = 6; + private boolean cancelRequested_; + /** + *
+   * Specifies if cancellation was requested for the operation.
+   * 
+ * + * bool cancel_requested = 6; + * @return The cancelRequested. + */ + @java.lang.Override + public boolean getCancelRequested() { + return cancelRequested_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusDetail_); + } + if (cancelRequested_ != false) { + output.writeBool(6, cancelRequested_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); + } + if (cancelRequested_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, cancelRequested_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.OperationMetadata other = (com.google.cloud.tpu.v2.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getVerb() + .equals(other.getVerb())) return false; + if (!getStatusDetail() + .equals(other.getStatusDetail())) return false; + if (getCancelRequested() + != other.getCancelRequested()) return false; + if (!getApiVersion() + .equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetail().hashCode(); + hash = (37 * hash) + CANCEL_REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCancelRequested()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata describing an [Operation][google.longrunning.Operation]
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.OperationMetadata) + com.google.cloud.tpu.v2.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.OperationMetadata.class, com.google.cloud.tpu.v2.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.OperationMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusDetail_ = ""; + + cancelRequested_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.OperationMetadata build() { + com.google.cloud.tpu.v2.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.OperationMetadata buildPartial() { + com.google.cloud.tpu.v2.OperationMetadata result = new com.google.cloud.tpu.v2.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusDetail_ = statusDetail_; + result.cancelRequested_ = cancelRequested_; + result.apiVersion_ = apiVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.OperationMetadata) { + return mergeFrom((com.google.cloud.tpu.v2.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.OperationMetadata other) { + if (other == com.google.cloud.tpu.v2.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusDetail().isEmpty()) { + statusDetail_ = other.statusDetail_; + onChanged(); + } + if (other.getCancelRequested() != false) { + setCancelRequested(other.getCancelRequested()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + statusDetail_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: { + cancelRequested_ = input.readBool(); + + break; + } // case 48 + case 58: { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + *
+     * Target of the operation - for example
+     * projects/project-1/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Target of the operation - for example
+     * projects/project-1/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Target of the operation - for example
+     * projects/project-1/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + *
+     * Target of the operation - for example
+     * projects/project-1/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + *
+     * Target of the operation - for example
+     * projects/project-1/connectivityTests/test-1
+     * 
+ * + * string target = 3; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + verb_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + verb_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusDetail_ = ""; + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * @return The statusDetail. + */ + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * @return The bytes for statusDetail. + */ + public com.google.protobuf.ByteString + getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * @param value The statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusDetail_ = value; + onChanged(); + return this; + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * @return This builder for chaining. + */ + public Builder clearStatusDetail() { + + statusDetail_ = getDefaultInstance().getStatusDetail(); + onChanged(); + return this; + } + /** + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_detail = 5; + * @param value The bytes for statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusDetail_ = value; + onChanged(); + return this; + } + + private boolean cancelRequested_ ; + /** + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * @return The cancelRequested. + */ + @java.lang.Override + public boolean getCancelRequested() { + return cancelRequested_; + } + /** + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * @param value The cancelRequested to set. + * @return This builder for chaining. + */ + public Builder setCancelRequested(boolean value) { + + cancelRequested_ = value; + onChanged(); + return this; + } + /** + *
+     * Specifies if cancellation was requested for the operation.
+     * 
+ * + * bool cancel_requested = 6; + * @return This builder for chaining. + */ + public Builder clearCancelRequested() { + + cancelRequested_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + *
+     * API version.
+     * 
+ * + * string api_version = 7; + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersion_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.OperationMetadata) + private static final com.google.cloud.tpu.v2.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.OperationMetadata(); + } + + public static com.google.cloud.tpu.v2.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadataOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..6fdfa9ec9b51 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/OperationMetadataOrBuilder.java @@ -0,0 +1,155 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Target of the operation - for example
+   * projects/project-1/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * @return The target. + */ + java.lang.String getTarget(); + /** + *
+   * Target of the operation - for example
+   * projects/project-1/connectivityTests/test-1
+   * 
+ * + * string target = 3; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @return The verb. + */ + java.lang.String getVerb(); + /** + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * @return The bytes for verb. + */ + com.google.protobuf.ByteString + getVerbBytes(); + + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * @return The statusDetail. + */ + java.lang.String getStatusDetail(); + /** + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_detail = 5; + * @return The bytes for statusDetail. + */ + com.google.protobuf.ByteString + getStatusDetailBytes(); + + /** + *
+   * Specifies if cancellation was requested for the operation.
+   * 
+ * + * bool cancel_requested = 6; + * @return The cancelRequested. + */ + boolean getCancelRequested(); + + /** + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + *
+   * API version.
+   * 
+ * + * string api_version = 7; + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString + getApiVersionBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersion.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersion.java new file mode 100644 index 000000000000..67aea0b05dcf --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersion.java @@ -0,0 +1,739 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A runtime version that a Node can be configured with.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.RuntimeVersion} + */ +public final class RuntimeVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.RuntimeVersion) + RuntimeVersionOrBuilder { +private static final long serialVersionUID = 0L; + // Use RuntimeVersion.newBuilder() to construct. + private RuntimeVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RuntimeVersion() { + name_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RuntimeVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_RuntimeVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_RuntimeVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.RuntimeVersion.class, com.google.cloud.tpu.v2.RuntimeVersion.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + *
+   * The runtime version.
+   * 
+ * + * string version = 2; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The runtime version.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.RuntimeVersion)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.RuntimeVersion other = (com.google.cloud.tpu.v2.RuntimeVersion) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.RuntimeVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.RuntimeVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A runtime version that a Node can be configured with.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.RuntimeVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.RuntimeVersion) + com.google.cloud.tpu.v2.RuntimeVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_RuntimeVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_RuntimeVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.RuntimeVersion.class, com.google.cloud.tpu.v2.RuntimeVersion.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.RuntimeVersion.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_RuntimeVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.RuntimeVersion getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.RuntimeVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.RuntimeVersion build() { + com.google.cloud.tpu.v2.RuntimeVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.RuntimeVersion buildPartial() { + com.google.cloud.tpu.v2.RuntimeVersion result = new com.google.cloud.tpu.v2.RuntimeVersion(this); + result.name_ = name_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.RuntimeVersion) { + return mergeFrom((com.google.cloud.tpu.v2.RuntimeVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.RuntimeVersion other) { + if (other == com.google.cloud.tpu.v2.RuntimeVersion.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + version_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The runtime version.
+     * 
+ * + * string version = 2; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The runtime version.
+     * 
+ * + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The runtime version.
+     * 
+ * + * string version = 2; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * The runtime version.
+     * 
+ * + * string version = 2; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * The runtime version.
+     * 
+ * + * string version = 2; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.RuntimeVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.RuntimeVersion) + private static final com.google.cloud.tpu.v2.RuntimeVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.RuntimeVersion(); + } + + public static com.google.cloud.tpu.v2.RuntimeVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.RuntimeVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionName.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionName.java new file mode 100644 index 000000000000..71b9613090dd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class RuntimeVersionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_RUNTIME_VERSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/runtimeVersions/{runtime_version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String runtimeVersion; + + @Deprecated + protected RuntimeVersionName() { + project = null; + location = null; + runtimeVersion = null; + } + + private RuntimeVersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + runtimeVersion = Preconditions.checkNotNull(builder.getRuntimeVersion()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRuntimeVersion() { + return runtimeVersion; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RuntimeVersionName of(String project, String location, String runtimeVersion) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRuntimeVersion(runtimeVersion) + .build(); + } + + public static String format(String project, String location, String runtimeVersion) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRuntimeVersion(runtimeVersion) + .build() + .toString(); + } + + public static RuntimeVersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_RUNTIME_VERSION.validatedMatch( + formattedString, "RuntimeVersionName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("runtime_version")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RuntimeVersionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_RUNTIME_VERSION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (runtimeVersion != null) { + fieldMapBuilder.put("runtime_version", runtimeVersion); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_RUNTIME_VERSION.instantiate( + "project", project, "location", location, "runtime_version", runtimeVersion); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + RuntimeVersionName that = ((RuntimeVersionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.runtimeVersion, that.runtimeVersion); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(runtimeVersion); + return h; + } + + /** Builder for projects/{project}/locations/{location}/runtimeVersions/{runtime_version}. */ + public static class Builder { + private String project; + private String location; + private String runtimeVersion; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRuntimeVersion() { + return runtimeVersion; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + private Builder(RuntimeVersionName runtimeVersionName) { + this.project = runtimeVersionName.project; + this.location = runtimeVersionName.location; + this.runtimeVersion = runtimeVersionName.runtimeVersion; + } + + public RuntimeVersionName build() { + return new RuntimeVersionName(this); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionOrBuilder.java new file mode 100644 index 000000000000..5f27a4e923cd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/RuntimeVersionOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface RuntimeVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.RuntimeVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The runtime version.
+   * 
+ * + * string version = 2; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The runtime version.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfig.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfig.java new file mode 100644 index 000000000000..c3cd07e7f05e --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfig.java @@ -0,0 +1,571 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Sets the scheduling options for this node.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.SchedulingConfig} + */ +public final class SchedulingConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.SchedulingConfig) + SchedulingConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use SchedulingConfig.newBuilder() to construct. + private SchedulingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SchedulingConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SchedulingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_SchedulingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_SchedulingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.SchedulingConfig.class, com.google.cloud.tpu.v2.SchedulingConfig.Builder.class); + } + + public static final int PREEMPTIBLE_FIELD_NUMBER = 1; + private boolean preemptible_; + /** + *
+   * Defines whether the node is preemptible.
+   * 
+ * + * bool preemptible = 1; + * @return The preemptible. + */ + @java.lang.Override + public boolean getPreemptible() { + return preemptible_; + } + + public static final int RESERVED_FIELD_NUMBER = 2; + private boolean reserved_; + /** + *
+   * Whether the node is created under a reservation.
+   * 
+ * + * bool reserved = 2; + * @return The reserved. + */ + @java.lang.Override + public boolean getReserved() { + return reserved_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (preemptible_ != false) { + output.writeBool(1, preemptible_); + } + if (reserved_ != false) { + output.writeBool(2, reserved_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (preemptible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, preemptible_); + } + if (reserved_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, reserved_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.SchedulingConfig)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.SchedulingConfig other = (com.google.cloud.tpu.v2.SchedulingConfig) obj; + + if (getPreemptible() + != other.getPreemptible()) return false; + if (getReserved() + != other.getReserved()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PREEMPTIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPreemptible()); + hash = (37 * hash) + RESERVED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReserved()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.SchedulingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.SchedulingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Sets the scheduling options for this node.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.SchedulingConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.SchedulingConfig) + com.google.cloud.tpu.v2.SchedulingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_SchedulingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_SchedulingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.SchedulingConfig.class, com.google.cloud.tpu.v2.SchedulingConfig.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.SchedulingConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + preemptible_ = false; + + reserved_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_SchedulingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.SchedulingConfig getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.SchedulingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.SchedulingConfig build() { + com.google.cloud.tpu.v2.SchedulingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.SchedulingConfig buildPartial() { + com.google.cloud.tpu.v2.SchedulingConfig result = new com.google.cloud.tpu.v2.SchedulingConfig(this); + result.preemptible_ = preemptible_; + result.reserved_ = reserved_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.SchedulingConfig) { + return mergeFrom((com.google.cloud.tpu.v2.SchedulingConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.SchedulingConfig other) { + if (other == com.google.cloud.tpu.v2.SchedulingConfig.getDefaultInstance()) return this; + if (other.getPreemptible() != false) { + setPreemptible(other.getPreemptible()); + } + if (other.getReserved() != false) { + setReserved(other.getReserved()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + preemptible_ = input.readBool(); + + break; + } // case 8 + case 16: { + reserved_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private boolean preemptible_ ; + /** + *
+     * Defines whether the node is preemptible.
+     * 
+ * + * bool preemptible = 1; + * @return The preemptible. + */ + @java.lang.Override + public boolean getPreemptible() { + return preemptible_; + } + /** + *
+     * Defines whether the node is preemptible.
+     * 
+ * + * bool preemptible = 1; + * @param value The preemptible to set. + * @return This builder for chaining. + */ + public Builder setPreemptible(boolean value) { + + preemptible_ = value; + onChanged(); + return this; + } + /** + *
+     * Defines whether the node is preemptible.
+     * 
+ * + * bool preemptible = 1; + * @return This builder for chaining. + */ + public Builder clearPreemptible() { + + preemptible_ = false; + onChanged(); + return this; + } + + private boolean reserved_ ; + /** + *
+     * Whether the node is created under a reservation.
+     * 
+ * + * bool reserved = 2; + * @return The reserved. + */ + @java.lang.Override + public boolean getReserved() { + return reserved_; + } + /** + *
+     * Whether the node is created under a reservation.
+     * 
+ * + * bool reserved = 2; + * @param value The reserved to set. + * @return This builder for chaining. + */ + public Builder setReserved(boolean value) { + + reserved_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether the node is created under a reservation.
+     * 
+ * + * bool reserved = 2; + * @return This builder for chaining. + */ + public Builder clearReserved() { + + reserved_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.SchedulingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.SchedulingConfig) + private static final com.google.cloud.tpu.v2.SchedulingConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.SchedulingConfig(); + } + + public static com.google.cloud.tpu.v2.SchedulingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.SchedulingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfigOrBuilder.java new file mode 100644 index 000000000000..fb75cba49292 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SchedulingConfigOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface SchedulingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.SchedulingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Defines whether the node is preemptible.
+   * 
+ * + * bool preemptible = 1; + * @return The preemptible. + */ + boolean getPreemptible(); + + /** + *
+   * Whether the node is created under a reservation.
+   * 
+ * + * bool reserved = 2; + * @return The reserved. + */ + boolean getReserved(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccount.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccount.java new file mode 100644 index 000000000000..60b1333c6e4a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccount.java @@ -0,0 +1,834 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A service account.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ServiceAccount} + */ +public final class ServiceAccount extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ServiceAccount) + ServiceAccountOrBuilder { +private static final long serialVersionUID = 0L; + // Use ServiceAccount.newBuilder() to construct. + private ServiceAccount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ServiceAccount() { + email_ = ""; + scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ServiceAccount(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ServiceAccount.class, com.google.cloud.tpu.v2.ServiceAccount.Builder.class); + } + + public static final int EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object email_; + /** + *
+   * Email address of the service account. If empty, default Compute service
+   * account will be used.
+   * 
+ * + * string email = 1; + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + *
+   * Email address of the service account. If empty, default Compute service
+   * account will be used.
+   * 
+ * + * string email = 1; + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPE_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList scope_; + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @return A list containing the scope. + */ + public com.google.protobuf.ProtocolStringList + getScopeList() { + return scope_; + } + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @return The count of scope. + */ + public int getScopeCount() { + return scope_.size(); + } + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + public com.google.protobuf.ByteString + getScopeBytes(int index) { + return scope_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); + } + for (int i = 0; i < scope_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scope_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_); + } + { + int dataSize = 0; + for (int i = 0; i < scope_.size(); i++) { + dataSize += computeStringSizeNoTag(scope_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopeList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ServiceAccount)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ServiceAccount other = (com.google.cloud.tpu.v2.ServiceAccount) obj; + + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getScopeList() + .equals(other.getScopeList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + if (getScopeCount() > 0) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScopeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ServiceAccount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ServiceAccount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A service account.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ServiceAccount} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ServiceAccount) + com.google.cloud.tpu.v2.ServiceAccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ServiceAccount.class, com.google.cloud.tpu.v2.ServiceAccount.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ServiceAccount.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + email_ = ""; + + scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceAccount_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceAccount getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ServiceAccount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceAccount build() { + com.google.cloud.tpu.v2.ServiceAccount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceAccount buildPartial() { + com.google.cloud.tpu.v2.ServiceAccount result = new com.google.cloud.tpu.v2.ServiceAccount(this); + int from_bitField0_ = bitField0_; + result.email_ = email_; + if (((bitField0_ & 0x00000001) != 0)) { + scope_ = scope_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.scope_ = scope_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ServiceAccount) { + return mergeFrom((com.google.cloud.tpu.v2.ServiceAccount)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ServiceAccount other) { + if (other == com.google.cloud.tpu.v2.ServiceAccount.getDefaultInstance()) return this; + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + onChanged(); + } + if (!other.scope_.isEmpty()) { + if (scope_.isEmpty()) { + scope_ = other.scope_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureScopeIsMutable(); + scope_.addAll(other.scope_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + email_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopeIsMutable(); + scope_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object email_ = ""; + /** + *
+     * Email address of the service account. If empty, default Compute service
+     * account will be used.
+     * 
+ * + * string email = 1; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Email address of the service account. If empty, default Compute service
+     * account will be used.
+     * 
+ * + * string email = 1; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Email address of the service account. If empty, default Compute service
+     * account will be used.
+     * 
+ * + * string email = 1; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + *
+     * Email address of the service account. If empty, default Compute service
+     * account will be used.
+     * 
+ * + * string email = 1; + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + *
+     * Email address of the service account. If empty, default Compute service
+     * account will be used.
+     * 
+ * + * string email = 1; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureScopeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + scope_ = new com.google.protobuf.LazyStringArrayList(scope_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @return A list containing the scope. + */ + public com.google.protobuf.ProtocolStringList + getScopeList() { + return scope_.getUnmodifiableView(); + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @return The count of scope. + */ + public int getScopeCount() { + return scope_.size(); + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + public com.google.protobuf.ByteString + getScopeBytes(int index) { + return scope_.getByteString(index); + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @param index The index to set the value at. + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopeIsMutable(); + scope_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @param value The scope to add. + * @return This builder for chaining. + */ + public Builder addScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopeIsMutable(); + scope_.add(value); + onChanged(); + return this; + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @param values The scope to add. + * @return This builder for chaining. + */ + public Builder addAllScope( + java.lang.Iterable values) { + ensureScopeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, scope_); + onChanged(); + return this; + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The list of scopes to be made available for this service account. If empty,
+     * access to all Cloud APIs will be allowed.
+     * 
+ * + * repeated string scope = 2; + * @param value The bytes of the scope to add. + * @return This builder for chaining. + */ + public Builder addScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopeIsMutable(); + scope_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ServiceAccount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ServiceAccount) + private static final com.google.cloud.tpu.v2.ServiceAccount DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ServiceAccount(); + } + + public static com.google.cloud.tpu.v2.ServiceAccount getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAccount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceAccount getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccountOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccountOrBuilder.java new file mode 100644 index 000000000000..f66e12c30098 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceAccountOrBuilder.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ServiceAccountOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ServiceAccount) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Email address of the service account. If empty, default Compute service
+   * account will be used.
+   * 
+ * + * string email = 1; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+   * Email address of the service account. If empty, default Compute service
+   * account will be used.
+   * 
+ * + * string email = 1; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); + + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @return A list containing the scope. + */ + java.util.List + getScopeList(); + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @return The count of scope. + */ + int getScopeCount(); + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + java.lang.String getScope(int index); + /** + *
+   * The list of scopes to be made available for this service account. If empty,
+   * access to all Cloud APIs will be allowed.
+   * 
+ * + * repeated string scope = 2; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + com.google.protobuf.ByteString + getScopeBytes(int index); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentity.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentity.java new file mode 100644 index 000000000000..d4af612e7257 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentity.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * The per-product per-project service identity for Cloud TPU service.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ServiceIdentity} + */ +public final class ServiceIdentity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ServiceIdentity) + ServiceIdentityOrBuilder { +private static final long serialVersionUID = 0L; + // Use ServiceIdentity.newBuilder() to construct. + private ServiceIdentity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ServiceIdentity() { + email_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ServiceIdentity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceIdentity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceIdentity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ServiceIdentity.class, com.google.cloud.tpu.v2.ServiceIdentity.Builder.class); + } + + public static final int EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object email_; + /** + *
+   * The email address of the service identity.
+   * 
+ * + * string email = 1; + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + *
+   * The email address of the service identity.
+   * 
+ * + * string email = 1; + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ServiceIdentity)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ServiceIdentity other = (com.google.cloud.tpu.v2.ServiceIdentity) obj; + + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ServiceIdentity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ServiceIdentity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The per-product per-project service identity for Cloud TPU service.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ServiceIdentity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ServiceIdentity) + com.google.cloud.tpu.v2.ServiceIdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceIdentity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceIdentity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ServiceIdentity.class, com.google.cloud.tpu.v2.ServiceIdentity.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ServiceIdentity.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + email_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ServiceIdentity_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceIdentity getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ServiceIdentity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceIdentity build() { + com.google.cloud.tpu.v2.ServiceIdentity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceIdentity buildPartial() { + com.google.cloud.tpu.v2.ServiceIdentity result = new com.google.cloud.tpu.v2.ServiceIdentity(this); + result.email_ = email_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ServiceIdentity) { + return mergeFrom((com.google.cloud.tpu.v2.ServiceIdentity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ServiceIdentity other) { + if (other == com.google.cloud.tpu.v2.ServiceIdentity.getDefaultInstance()) return this; + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + email_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object email_ = ""; + /** + *
+     * The email address of the service identity.
+     * 
+ * + * string email = 1; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The email address of the service identity.
+     * 
+ * + * string email = 1; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The email address of the service identity.
+     * 
+ * + * string email = 1; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + *
+     * The email address of the service identity.
+     * 
+ * + * string email = 1; + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + *
+     * The email address of the service identity.
+     * 
+ * + * string email = 1; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ServiceIdentity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ServiceIdentity) + private static final com.google.cloud.tpu.v2.ServiceIdentity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ServiceIdentity(); + } + + public static com.google.cloud.tpu.v2.ServiceIdentity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceIdentity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ServiceIdentity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentityOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentityOrBuilder.java new file mode 100644 index 000000000000..191bde8b3198 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ServiceIdentityOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ServiceIdentityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ServiceIdentity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The email address of the service identity.
+   * 
+ * + * string email = 1; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+   * The email address of the service identity.
+   * 
+ * + * string email = 1; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfig.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfig.java new file mode 100644 index 000000000000..2705c705fbed --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfig.java @@ -0,0 +1,490 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A set of Shielded Instance options.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ShieldedInstanceConfig} + */ +public final class ShieldedInstanceConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.ShieldedInstanceConfig) + ShieldedInstanceConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ShieldedInstanceConfig.newBuilder() to construct. + private ShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ShieldedInstanceConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ShieldedInstanceConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ShieldedInstanceConfig.class, com.google.cloud.tpu.v2.ShieldedInstanceConfig.Builder.class); + } + + public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; + private boolean enableSecureBoot_; + /** + *
+   * Defines whether the instance has Secure Boot enabled.
+   * 
+ * + * bool enable_secure_boot = 1; + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enableSecureBoot_ != false) { + output.writeBool(1, enableSecureBoot_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableSecureBoot_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enableSecureBoot_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.ShieldedInstanceConfig)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.ShieldedInstanceConfig other = (com.google.cloud.tpu.v2.ShieldedInstanceConfig) obj; + + if (getEnableSecureBoot() + != other.getEnableSecureBoot()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableSecureBoot()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.ShieldedInstanceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of Shielded Instance options.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.ShieldedInstanceConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.ShieldedInstanceConfig) + com.google.cloud.tpu.v2.ShieldedInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.ShieldedInstanceConfig.class, com.google.cloud.tpu.v2.ShieldedInstanceConfig.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.ShieldedInstanceConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableSecureBoot_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ShieldedInstanceConfig getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.ShieldedInstanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ShieldedInstanceConfig build() { + com.google.cloud.tpu.v2.ShieldedInstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ShieldedInstanceConfig buildPartial() { + com.google.cloud.tpu.v2.ShieldedInstanceConfig result = new com.google.cloud.tpu.v2.ShieldedInstanceConfig(this); + result.enableSecureBoot_ = enableSecureBoot_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.ShieldedInstanceConfig) { + return mergeFrom((com.google.cloud.tpu.v2.ShieldedInstanceConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.ShieldedInstanceConfig other) { + if (other == com.google.cloud.tpu.v2.ShieldedInstanceConfig.getDefaultInstance()) return this; + if (other.getEnableSecureBoot() != false) { + setEnableSecureBoot(other.getEnableSecureBoot()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + enableSecureBoot_ = input.readBool(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private boolean enableSecureBoot_ ; + /** + *
+     * Defines whether the instance has Secure Boot enabled.
+     * 
+ * + * bool enable_secure_boot = 1; + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + /** + *
+     * Defines whether the instance has Secure Boot enabled.
+     * 
+ * + * bool enable_secure_boot = 1; + * @param value The enableSecureBoot to set. + * @return This builder for chaining. + */ + public Builder setEnableSecureBoot(boolean value) { + + enableSecureBoot_ = value; + onChanged(); + return this; + } + /** + *
+     * Defines whether the instance has Secure Boot enabled.
+     * 
+ * + * bool enable_secure_boot = 1; + * @return This builder for chaining. + */ + public Builder clearEnableSecureBoot() { + + enableSecureBoot_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.ShieldedInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.ShieldedInstanceConfig) + private static final com.google.cloud.tpu.v2.ShieldedInstanceConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.ShieldedInstanceConfig(); + } + + public static com.google.cloud.tpu.v2.ShieldedInstanceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShieldedInstanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.ShieldedInstanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfigOrBuilder.java new file mode 100644 index 000000000000..94d3889ebf73 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/ShieldedInstanceConfigOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface ShieldedInstanceConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.ShieldedInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Defines whether the instance has Secure Boot enabled.
+   * 
+ * + * bool enable_secure_boot = 1; + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequest.java new file mode 100644 index 000000000000..cfe05a62201a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [StartNode][google.cloud.tpu.v2.Tpu.StartNode].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.StartNodeRequest} + */ +public final class StartNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.StartNodeRequest) + StartNodeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use StartNodeRequest.newBuilder() to construct. + private StartNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StartNodeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StartNodeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StartNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StartNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.StartNodeRequest.class, com.google.cloud.tpu.v2.StartNodeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.StartNodeRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.StartNodeRequest other = (com.google.cloud.tpu.v2.StartNodeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.StartNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.StartNodeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [StartNode][google.cloud.tpu.v2.Tpu.StartNode].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.StartNodeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.StartNodeRequest) + com.google.cloud.tpu.v2.StartNodeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StartNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StartNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.StartNodeRequest.class, com.google.cloud.tpu.v2.StartNodeRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.StartNodeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StartNodeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StartNodeRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.StartNodeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StartNodeRequest build() { + com.google.cloud.tpu.v2.StartNodeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StartNodeRequest buildPartial() { + com.google.cloud.tpu.v2.StartNodeRequest result = new com.google.cloud.tpu.v2.StartNodeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.StartNodeRequest) { + return mergeFrom((com.google.cloud.tpu.v2.StartNodeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.StartNodeRequest other) { + if (other == com.google.cloud.tpu.v2.StartNodeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.StartNodeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.StartNodeRequest) + private static final com.google.cloud.tpu.v2.StartNodeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.StartNodeRequest(); + } + + public static com.google.cloud.tpu.v2.StartNodeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StartNodeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequestOrBuilder.java new file mode 100644 index 000000000000..960f59a1cf5a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StartNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface StartNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.StartNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequest.java new file mode 100644 index 000000000000..ecd8bcb09bf1 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [StopNode][google.cloud.tpu.v2.Tpu.StopNode].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.StopNodeRequest} + */ +public final class StopNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.StopNodeRequest) + StopNodeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use StopNodeRequest.newBuilder() to construct. + private StopNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StopNodeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StopNodeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StopNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StopNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.StopNodeRequest.class, com.google.cloud.tpu.v2.StopNodeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.StopNodeRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.StopNodeRequest other = (com.google.cloud.tpu.v2.StopNodeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.StopNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.StopNodeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [StopNode][google.cloud.tpu.v2.Tpu.StopNode].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.StopNodeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.StopNodeRequest) + com.google.cloud.tpu.v2.StopNodeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StopNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StopNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.StopNodeRequest.class, com.google.cloud.tpu.v2.StopNodeRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.StopNodeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_StopNodeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StopNodeRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.StopNodeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StopNodeRequest build() { + com.google.cloud.tpu.v2.StopNodeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StopNodeRequest buildPartial() { + com.google.cloud.tpu.v2.StopNodeRequest result = new com.google.cloud.tpu.v2.StopNodeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.StopNodeRequest) { + return mergeFrom((com.google.cloud.tpu.v2.StopNodeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.StopNodeRequest other) { + if (other == com.google.cloud.tpu.v2.StopNodeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.StopNodeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.StopNodeRequest) + private static final com.google.cloud.tpu.v2.StopNodeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.StopNodeRequest(); + } + + public static com.google.cloud.tpu.v2.StopNodeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.StopNodeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequestOrBuilder.java new file mode 100644 index 000000000000..841889e788ac --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/StopNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface StopNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.StopNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Symptom.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Symptom.java new file mode 100644 index 000000000000..6304982eaa99 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/Symptom.java @@ -0,0 +1,1308 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * A Symptom instance.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.Symptom} + */ +public final class Symptom extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.Symptom) + SymptomOrBuilder { +private static final long serialVersionUID = 0L; + // Use Symptom.newBuilder() to construct. + private Symptom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Symptom() { + symptomType_ = 0; + details_ = ""; + workerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Symptom(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Symptom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Symptom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.Symptom.class, com.google.cloud.tpu.v2.Symptom.Builder.class); + } + + /** + *
+   * SymptomType represents the different types of Symptoms that a TPU can be
+   * at.
+   * 
+ * + * Protobuf enum {@code google.cloud.tpu.v2.Symptom.SymptomType} + */ + public enum SymptomType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified symptom.
+     * 
+ * + * SYMPTOM_TYPE_UNSPECIFIED = 0; + */ + SYMPTOM_TYPE_UNSPECIFIED(0), + /** + *
+     * TPU VM memory is low.
+     * 
+ * + * LOW_MEMORY = 1; + */ + LOW_MEMORY(1), + /** + *
+     * TPU runtime is out of memory.
+     * 
+ * + * OUT_OF_MEMORY = 2; + */ + OUT_OF_MEMORY(2), + /** + *
+     * TPU runtime execution has timed out.
+     * 
+ * + * EXECUTE_TIMED_OUT = 3; + */ + EXECUTE_TIMED_OUT(3), + /** + *
+     * TPU runtime fails to construct a mesh that recognizes each TPU device's
+     * neighbors.
+     * 
+ * + * MESH_BUILD_FAIL = 4; + */ + MESH_BUILD_FAIL(4), + /** + *
+     * TPU HBM is out of memory.
+     * 
+ * + * HBM_OUT_OF_MEMORY = 5; + */ + HBM_OUT_OF_MEMORY(5), + /** + *
+     * Abusive behaviors have been identified on the current project.
+     * 
+ * + * PROJECT_ABUSE = 6; + */ + PROJECT_ABUSE(6), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified symptom.
+     * 
+ * + * SYMPTOM_TYPE_UNSPECIFIED = 0; + */ + public static final int SYMPTOM_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * TPU VM memory is low.
+     * 
+ * + * LOW_MEMORY = 1; + */ + public static final int LOW_MEMORY_VALUE = 1; + /** + *
+     * TPU runtime is out of memory.
+     * 
+ * + * OUT_OF_MEMORY = 2; + */ + public static final int OUT_OF_MEMORY_VALUE = 2; + /** + *
+     * TPU runtime execution has timed out.
+     * 
+ * + * EXECUTE_TIMED_OUT = 3; + */ + public static final int EXECUTE_TIMED_OUT_VALUE = 3; + /** + *
+     * TPU runtime fails to construct a mesh that recognizes each TPU device's
+     * neighbors.
+     * 
+ * + * MESH_BUILD_FAIL = 4; + */ + public static final int MESH_BUILD_FAIL_VALUE = 4; + /** + *
+     * TPU HBM is out of memory.
+     * 
+ * + * HBM_OUT_OF_MEMORY = 5; + */ + public static final int HBM_OUT_OF_MEMORY_VALUE = 5; + /** + *
+     * Abusive behaviors have been identified on the current project.
+     * 
+ * + * PROJECT_ABUSE = 6; + */ + public static final int PROJECT_ABUSE_VALUE = 6; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SymptomType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SymptomType forNumber(int value) { + switch (value) { + case 0: return SYMPTOM_TYPE_UNSPECIFIED; + case 1: return LOW_MEMORY; + case 2: return OUT_OF_MEMORY; + case 3: return EXECUTE_TIMED_OUT; + case 4: return MESH_BUILD_FAIL; + case 5: return HBM_OUT_OF_MEMORY; + case 6: return PROJECT_ABUSE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SymptomType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SymptomType findValueByNumber(int number) { + return SymptomType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.tpu.v2.Symptom.getDescriptor().getEnumTypes().get(0); + } + + private static final SymptomType[] VALUES = values(); + + public static SymptomType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SymptomType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tpu.v2.Symptom.SymptomType) + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Timestamp when the Symptom is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Timestamp when the Symptom is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Timestamp when the Symptom is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int SYMPTOM_TYPE_FIELD_NUMBER = 2; + private int symptomType_; + /** + *
+   * Type of the Symptom.
+   * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return The enum numeric value on the wire for symptomType. + */ + @java.lang.Override public int getSymptomTypeValue() { + return symptomType_; + } + /** + *
+   * Type of the Symptom.
+   * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return The symptomType. + */ + @java.lang.Override public com.google.cloud.tpu.v2.Symptom.SymptomType getSymptomType() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Symptom.SymptomType result = com.google.cloud.tpu.v2.Symptom.SymptomType.valueOf(symptomType_); + return result == null ? com.google.cloud.tpu.v2.Symptom.SymptomType.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 3; + private volatile java.lang.Object details_; + /** + *
+   * Detailed information of the current Symptom.
+   * 
+ * + * string details = 3; + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + *
+   * Detailed information of the current Symptom.
+   * 
+ * + * string details = 3; + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WORKER_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object workerId_; + /** + *
+   * A string used to uniquely distinguish a worker within a TPU node.
+   * 
+ * + * string worker_id = 4; + * @return The workerId. + */ + @java.lang.Override + public java.lang.String getWorkerId() { + java.lang.Object ref = workerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerId_ = s; + return s; + } + } + /** + *
+   * A string used to uniquely distinguish a worker within a TPU node.
+   * 
+ * + * string worker_id = 4; + * @return The bytes for workerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWorkerIdBytes() { + java.lang.Object ref = workerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + workerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (symptomType_ != com.google.cloud.tpu.v2.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, symptomType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, details_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, workerId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + if (symptomType_ != com.google.cloud.tpu.v2.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, symptomType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, details_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, workerId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.Symptom)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.Symptom other = (com.google.cloud.tpu.v2.Symptom) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (symptomType_ != other.symptomType_) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!getWorkerId() + .equals(other.getWorkerId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + SYMPTOM_TYPE_FIELD_NUMBER; + hash = (53 * hash) + symptomType_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (37 * hash) + WORKER_ID_FIELD_NUMBER; + hash = (53 * hash) + getWorkerId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.Symptom parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Symptom parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.Symptom parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.Symptom parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.Symptom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Symptom instance.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.Symptom} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.Symptom) + com.google.cloud.tpu.v2.SymptomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Symptom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Symptom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.Symptom.class, com.google.cloud.tpu.v2.Symptom.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.Symptom.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + symptomType_ = 0; + + details_ = ""; + + workerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_Symptom_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Symptom getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.Symptom.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Symptom build() { + com.google.cloud.tpu.v2.Symptom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Symptom buildPartial() { + com.google.cloud.tpu.v2.Symptom result = new com.google.cloud.tpu.v2.Symptom(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.symptomType_ = symptomType_; + result.details_ = details_; + result.workerId_ = workerId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.Symptom) { + return mergeFrom((com.google.cloud.tpu.v2.Symptom)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.Symptom other) { + if (other == com.google.cloud.tpu.v2.Symptom.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.symptomType_ != 0) { + setSymptomTypeValue(other.getSymptomTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + onChanged(); + } + if (!other.getWorkerId().isEmpty()) { + workerId_ = other.workerId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 16: { + symptomType_ = input.readEnum(); + + break; + } // case 16 + case 26: { + details_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + workerId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Timestamp when the Symptom is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int symptomType_ = 0; + /** + *
+     * Type of the Symptom.
+     * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return The enum numeric value on the wire for symptomType. + */ + @java.lang.Override public int getSymptomTypeValue() { + return symptomType_; + } + /** + *
+     * Type of the Symptom.
+     * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @param value The enum numeric value on the wire for symptomType to set. + * @return This builder for chaining. + */ + public Builder setSymptomTypeValue(int value) { + + symptomType_ = value; + onChanged(); + return this; + } + /** + *
+     * Type of the Symptom.
+     * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return The symptomType. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Symptom.SymptomType getSymptomType() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2.Symptom.SymptomType result = com.google.cloud.tpu.v2.Symptom.SymptomType.valueOf(symptomType_); + return result == null ? com.google.cloud.tpu.v2.Symptom.SymptomType.UNRECOGNIZED : result; + } + /** + *
+     * Type of the Symptom.
+     * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @param value The symptomType to set. + * @return This builder for chaining. + */ + public Builder setSymptomType(com.google.cloud.tpu.v2.Symptom.SymptomType value) { + if (value == null) { + throw new NullPointerException(); + } + + symptomType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Type of the Symptom.
+     * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return This builder for chaining. + */ + public Builder clearSymptomType() { + + symptomType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+     * Detailed information of the current Symptom.
+     * 
+ * + * string details = 3; + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Detailed information of the current Symptom.
+     * 
+ * + * string details = 3; + * @return The bytes for details. + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Detailed information of the current Symptom.
+     * 
+ * + * string details = 3; + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + details_ = value; + onChanged(); + return this; + } + /** + *
+     * Detailed information of the current Symptom.
+     * 
+ * + * string details = 3; + * @return This builder for chaining. + */ + public Builder clearDetails() { + + details_ = getDefaultInstance().getDetails(); + onChanged(); + return this; + } + /** + *
+     * Detailed information of the current Symptom.
+     * 
+ * + * string details = 3; + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + details_ = value; + onChanged(); + return this; + } + + private java.lang.Object workerId_ = ""; + /** + *
+     * A string used to uniquely distinguish a worker within a TPU node.
+     * 
+ * + * string worker_id = 4; + * @return The workerId. + */ + public java.lang.String getWorkerId() { + java.lang.Object ref = workerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A string used to uniquely distinguish a worker within a TPU node.
+     * 
+ * + * string worker_id = 4; + * @return The bytes for workerId. + */ + public com.google.protobuf.ByteString + getWorkerIdBytes() { + java.lang.Object ref = workerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + workerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A string used to uniquely distinguish a worker within a TPU node.
+     * 
+ * + * string worker_id = 4; + * @param value The workerId to set. + * @return This builder for chaining. + */ + public Builder setWorkerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + workerId_ = value; + onChanged(); + return this; + } + /** + *
+     * A string used to uniquely distinguish a worker within a TPU node.
+     * 
+ * + * string worker_id = 4; + * @return This builder for chaining. + */ + public Builder clearWorkerId() { + + workerId_ = getDefaultInstance().getWorkerId(); + onChanged(); + return this; + } + /** + *
+     * A string used to uniquely distinguish a worker within a TPU node.
+     * 
+ * + * string worker_id = 4; + * @param value The bytes for workerId to set. + * @return This builder for chaining. + */ + public Builder setWorkerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + workerId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.Symptom) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.Symptom) + private static final com.google.cloud.tpu.v2.Symptom DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.Symptom(); + } + + public static com.google.cloud.tpu.v2.Symptom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symptom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.Symptom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SymptomOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SymptomOrBuilder.java new file mode 100644 index 000000000000..e728f7778156 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/SymptomOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface SymptomOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.Symptom) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Timestamp when the Symptom is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Timestamp when the Symptom is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Timestamp when the Symptom is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Type of the Symptom.
+   * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return The enum numeric value on the wire for symptomType. + */ + int getSymptomTypeValue(); + /** + *
+   * Type of the Symptom.
+   * 
+ * + * .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return The symptomType. + */ + com.google.cloud.tpu.v2.Symptom.SymptomType getSymptomType(); + + /** + *
+   * Detailed information of the current Symptom.
+   * 
+ * + * string details = 3; + * @return The details. + */ + java.lang.String getDetails(); + /** + *
+   * Detailed information of the current Symptom.
+   * 
+ * + * string details = 3; + * @return The bytes for details. + */ + com.google.protobuf.ByteString + getDetailsBytes(); + + /** + *
+   * A string used to uniquely distinguish a worker within a TPU node.
+   * 
+ * + * string worker_id = 4; + * @return The workerId. + */ + java.lang.String getWorkerId(); + /** + *
+   * A string used to uniquely distinguish a worker within a TPU node.
+   * 
+ * + * string worker_id = 4; + * @return The bytes for workerId. + */ + com.google.protobuf.ByteString + getWorkerIdBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequest.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequest.java new file mode 100644 index 000000000000..db80aac60088 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequest.java @@ -0,0 +1,893 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +/** + *
+ * Request for [UpdateNode][google.cloud.tpu.v2.Tpu.UpdateNode].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.UpdateNodeRequest} + */ +public final class UpdateNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2.UpdateNodeRequest) + UpdateNodeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateNodeRequest.newBuilder() to construct. + private UpdateNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateNodeRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateNodeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_UpdateNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_UpdateNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.UpdateNodeRequest.class, com.google.cloud.tpu.v2.UpdateNodeRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Required. Mask of fields from [Node][Tpu.Node] to update.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Required. Mask of fields from [Node][Tpu.Node] to update.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Required. Mask of fields from [Node][Tpu.Node] to update.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int NODE_FIELD_NUMBER = 2; + private com.google.cloud.tpu.v2.Node node_; + /** + *
+   * Required. The node. Only fields specified in update_mask are updated.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + @java.lang.Override + public boolean hasNode() { + return node_ != null; + } + /** + *
+   * Required. The node. Only fields specified in update_mask are updated.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + @java.lang.Override + public com.google.cloud.tpu.v2.Node getNode() { + return node_ == null ? com.google.cloud.tpu.v2.Node.getDefaultInstance() : node_; + } + /** + *
+   * Required. The node. Only fields specified in update_mask are updated.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2.NodeOrBuilder getNodeOrBuilder() { + return getNode(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (node_ != null) { + output.writeMessage(2, getNode()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (node_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNode()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2.UpdateNodeRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2.UpdateNodeRequest other = (com.google.cloud.tpu.v2.UpdateNodeRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasNode() != other.hasNode()) return false; + if (hasNode()) { + if (!getNode() + .equals(other.getNode())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasNode()) { + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNode().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2.UpdateNodeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2.UpdateNodeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [UpdateNode][google.cloud.tpu.v2.Tpu.UpdateNode].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2.UpdateNodeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2.UpdateNodeRequest) + com.google.cloud.tpu.v2.UpdateNodeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_UpdateNodeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_UpdateNodeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2.UpdateNodeRequest.class, com.google.cloud.tpu.v2.UpdateNodeRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2.UpdateNodeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + if (nodeBuilder_ == null) { + node_ = null; + } else { + node_ = null; + nodeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2.CloudTpuProto.internal_static_google_cloud_tpu_v2_UpdateNodeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.UpdateNodeRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2.UpdateNodeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2.UpdateNodeRequest build() { + com.google.cloud.tpu.v2.UpdateNodeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.UpdateNodeRequest buildPartial() { + com.google.cloud.tpu.v2.UpdateNodeRequest result = new com.google.cloud.tpu.v2.UpdateNodeRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (nodeBuilder_ == null) { + result.node_ = node_; + } else { + result.node_ = nodeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2.UpdateNodeRequest) { + return mergeFrom((com.google.cloud.tpu.v2.UpdateNodeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2.UpdateNodeRequest other) { + if (other == com.google.cloud.tpu.v2.UpdateNodeRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasNode()) { + mergeNode(other.getNode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getNodeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Required. Mask of fields from [Node][Tpu.Node] to update.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.tpu.v2.Node node_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder> nodeBuilder_; + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + public boolean hasNode() { + return nodeBuilder_ != null || node_ != null; + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + public com.google.cloud.tpu.v2.Node getNode() { + if (nodeBuilder_ == null) { + return node_ == null ? com.google.cloud.tpu.v2.Node.getDefaultInstance() : node_; + } else { + return nodeBuilder_.getMessage(); + } + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNode(com.google.cloud.tpu.v2.Node value) { + if (nodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + node_ = value; + onChanged(); + } else { + nodeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNode( + com.google.cloud.tpu.v2.Node.Builder builderForValue) { + if (nodeBuilder_ == null) { + node_ = builderForValue.build(); + onChanged(); + } else { + nodeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNode(com.google.cloud.tpu.v2.Node value) { + if (nodeBuilder_ == null) { + if (node_ != null) { + node_ = + com.google.cloud.tpu.v2.Node.newBuilder(node_).mergeFrom(value).buildPartial(); + } else { + node_ = value; + } + onChanged(); + } else { + nodeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNode() { + if (nodeBuilder_ == null) { + node_ = null; + onChanged(); + } else { + node_ = null; + nodeBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2.Node.Builder getNodeBuilder() { + + onChanged(); + return getNodeFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2.NodeOrBuilder getNodeOrBuilder() { + if (nodeBuilder_ != null) { + return nodeBuilder_.getMessageOrBuilder(); + } else { + return node_ == null ? + com.google.cloud.tpu.v2.Node.getDefaultInstance() : node_; + } + } + /** + *
+     * Required. The node. Only fields specified in update_mask are updated.
+     * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder> + getNodeFieldBuilder() { + if (nodeBuilder_ == null) { + nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2.Node, com.google.cloud.tpu.v2.Node.Builder, com.google.cloud.tpu.v2.NodeOrBuilder>( + getNode(), + getParentForChildren(), + isClean()); + node_ = null; + } + return nodeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2.UpdateNodeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2.UpdateNodeRequest) + private static final com.google.cloud.tpu.v2.UpdateNodeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2.UpdateNodeRequest(); + } + + public static com.google.cloud.tpu.v2.UpdateNodeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2.UpdateNodeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequestOrBuilder.java new file mode 100644 index 000000000000..e084b805aaaf --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/UpdateNodeRequestOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2/cloud_tpu.proto + +package com.google.cloud.tpu.v2; + +public interface UpdateNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2.UpdateNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Mask of fields from [Node][Tpu.Node] to update.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Required. Mask of fields from [Node][Tpu.Node] to update.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Required. Mask of fields from [Node][Tpu.Node] to update.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The node. Only fields specified in update_mask are updated.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + boolean hasNode(); + /** + *
+   * Required. The node. Only fields specified in update_mask are updated.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + com.google.cloud.tpu.v2.Node getNode(); + /** + *
+   * Required. The node. Only fields specified in update_mask are updated.
+   * 
+ * + * .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.tpu.v2.NodeOrBuilder getNodeOrBuilder(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1/cloud_tpu.proto b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/proto/google/cloud/tpu/v2/cloud_tpu.proto similarity index 81% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1/cloud_tpu.proto rename to owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/proto/google/cloud/tpu/v2/cloud_tpu.proto index 612e1c4f5ddb..b99a2013c2d2 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1/cloud_tpu.proto +++ b/owl-bot-staging/java-tpu/v2/proto-google-cloud-tpu-v2/src/main/proto/google/cloud/tpu/v2/cloud_tpu.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -package google.cloud.tpu.v2alpha1; +package google.cloud.tpu.v2; import "google/api/annotations.proto"; import "google/api/client.proto"; @@ -24,23 +24,22 @@ import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "google.golang.org/genproto/googleapis/cloud/tpu/v2alpha1;tpu"; +option go_package = "google.golang.org/genproto/googleapis/cloud/tpu/v2;tpu"; option java_multiple_files = true; option java_outer_classname = "CloudTpuProto"; -option java_package = "com.google.cloud.tpu.v2alpha1"; +option java_package = "com.google.cloud.tpu.v2"; // Manages TPU nodes and other resources // -// TPU API v2alpha1 +// TPU API v2 service Tpu { option (google.api.default_host) = "tpu.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Lists nodes. rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) { option (google.api.http) = { - get: "/v2alpha1/{parent=projects/*/locations/*}/nodes" + get: "/v2/{parent=projects/*/locations/*}/nodes" }; option (google.api.method_signature) = "parent"; } @@ -48,7 +47,7 @@ service Tpu { // Gets the details of a node. rpc GetNode(GetNodeRequest) returns (Node) { option (google.api.http) = { - get: "/v2alpha1/{name=projects/*/locations/*/nodes/*}" + get: "/v2/{name=projects/*/locations/*/nodes/*}" }; option (google.api.method_signature) = "name"; } @@ -56,7 +55,7 @@ service Tpu { // Creates a node. rpc CreateNode(CreateNodeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v2alpha1/{parent=projects/*/locations/*}/nodes" + post: "/v2/{parent=projects/*/locations/*}/nodes" body: "node" }; option (google.api.method_signature) = "parent,node,node_id"; @@ -69,11 +68,11 @@ service Tpu { // Deletes a node. rpc DeleteNode(DeleteNodeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - delete: "/v2alpha1/{name=projects/*/locations/*/nodes/*}" + delete: "/v2/{name=projects/*/locations/*/nodes/*}" }; option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { - response_type: "Node" + response_type: "google.protobuf.Empty" metadata_type: "OperationMetadata" }; } @@ -81,7 +80,7 @@ service Tpu { // Stops a node. This operation is only available with single TPU nodes. rpc StopNode(StopNodeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:stop" + post: "/v2/{name=projects/*/locations/*/nodes/*}:stop" body: "*" }; option (google.longrunning.operation_info) = { @@ -93,7 +92,7 @@ service Tpu { // Starts a node. rpc StartNode(StartNodeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:start" + post: "/v2/{name=projects/*/locations/*/nodes/*}:start" body: "*" }; option (google.longrunning.operation_info) = { @@ -105,7 +104,7 @@ service Tpu { // Updates the configurations of a node. rpc UpdateNode(UpdateNodeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - patch: "/v2alpha1/{node.name=projects/*/locations/*/nodes/*}" + patch: "/v2/{node.name=projects/*/locations/*/nodes/*}" body: "node" }; option (google.api.method_signature) = "node,update_mask"; @@ -116,19 +115,17 @@ service Tpu { } // Generates the Cloud TPU service identity for the project. - rpc GenerateServiceIdentity(GenerateServiceIdentityRequest) - returns (GenerateServiceIdentityResponse) { + rpc GenerateServiceIdentity(GenerateServiceIdentityRequest) returns (GenerateServiceIdentityResponse) { option (google.api.http) = { - post: "/v2alpha1/{parent=projects/*/locations/*}:generateServiceIdentity" + post: "/v2/{parent=projects/*/locations/*}:generateServiceIdentity" body: "*" }; } // Lists accelerator types supported by this API. - rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) - returns (ListAcceleratorTypesResponse) { + rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) returns (ListAcceleratorTypesResponse) { option (google.api.http) = { - get: "/v2alpha1/{parent=projects/*/locations/*}/acceleratorTypes" + get: "/v2/{parent=projects/*/locations/*}/acceleratorTypes" }; option (google.api.method_signature) = "parent"; } @@ -136,16 +133,15 @@ service Tpu { // Gets AcceleratorType. rpc GetAcceleratorType(GetAcceleratorTypeRequest) returns (AcceleratorType) { option (google.api.http) = { - get: "/v2alpha1/{name=projects/*/locations/*/acceleratorTypes/*}" + get: "/v2/{name=projects/*/locations/*/acceleratorTypes/*}" }; option (google.api.method_signature) = "name"; } // Lists runtime versions supported by this API. - rpc ListRuntimeVersions(ListRuntimeVersionsRequest) - returns (ListRuntimeVersionsResponse) { + rpc ListRuntimeVersions(ListRuntimeVersionsRequest) returns (ListRuntimeVersionsResponse) { option (google.api.http) = { - get: "/v2alpha1/{parent=projects/*/locations/*}/runtimeVersions" + get: "/v2/{parent=projects/*/locations/*}/runtimeVersions" }; option (google.api.method_signature) = "parent"; } @@ -153,16 +149,15 @@ service Tpu { // Gets a runtime version. rpc GetRuntimeVersion(GetRuntimeVersionRequest) returns (RuntimeVersion) { option (google.api.http) = { - get: "/v2alpha1/{name=projects/*/locations/*/runtimeVersions/*}" + get: "/v2/{name=projects/*/locations/*/runtimeVersions/*}" }; option (google.api.method_signature) = "name"; } // Retrieves the guest attributes for the node. - rpc GetGuestAttributes(GetGuestAttributesRequest) - returns (GetGuestAttributesResponse) { + rpc GetGuestAttributes(GetGuestAttributesRequest) returns (GetGuestAttributesResponse) { option (google.api.http) = { - post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:getGuestAttributes" + post: "/v2/{name=projects/*/locations/*/nodes/*}:getGuestAttributes" body: "*" }; } @@ -266,6 +261,11 @@ message NetworkConfig { // workers. If set to false, the specified subnetwork or network should have // Private Google Access enabled. bool enable_external_ips = 3; + + // Allows the TPU node to send and receive packets with non-matching + // destination or source IPs. This is required if you plan to use the TPU + // workers to forward routes. + bool can_ip_forward = 4; } // A service account. @@ -369,6 +369,9 @@ message Node { // TPU API V2Alpha1 version. V2_ALPHA1 = 3; + + // TPU API V2 version. + V2 = 4; } // Output only. Immutable. The name of the TPU. @@ -386,8 +389,8 @@ message Node { // Output only. The current state for the TPU Node. State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If this field is populated, it contains a description of why - // the TPU Node is unhealthy. + // Output only. If this field is populated, it contains a description of why the TPU Node + // is unhealthy. string health_description = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. The runtime version running in the Node. @@ -411,8 +414,7 @@ message Node { ServiceAccount service_account = 37; // Output only. The time when the node was created. - google.protobuf.Timestamp create_time = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // The scheduling options for this node. SchedulingConfig scheduling_config = 17; @@ -420,8 +422,7 @@ message Node { // Output only. The network endpoints where TPU workers can be accessed and // sent work. It is recommended that runtime clients of the node reach out // to the 0th entry in this map first. - repeated NetworkEndpoint network_endpoints = 21 - [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated NetworkEndpoint network_endpoints = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; // The health status of the TPU node. Health health = 22; @@ -453,12 +454,14 @@ message Node { ShieldedInstanceConfig shielded_instance_config = 45; } -// Request for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes]. +// Request for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes]. message ListNodesRequest { // Required. The parent resource name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } + (google.api.resource_reference) = { + child_type: "tpu.googleapis.com/Node" + } ]; // The maximum number of items to return. @@ -468,7 +471,7 @@ message ListNodesRequest { string page_token = 3; } -// Response for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes]. +// Response for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes]. message ListNodesResponse { // The listed nodes. repeated Node nodes = 1; @@ -480,16 +483,18 @@ message ListNodesResponse { repeated string unreachable = 3; } -// Request for [GetNode][google.cloud.tpu.v2alpha1.Tpu.GetNode]. +// Request for [GetNode][google.cloud.tpu.v2.Tpu.GetNode]. message GetNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } ]; } -// Request for [CreateNode][google.cloud.tpu.v2alpha1.Tpu.CreateNode]. +// Request for [CreateNode][google.cloud.tpu.v2.Tpu.CreateNode]. message CreateNodeRequest { // Required. The parent resource name. string parent = 1 [ @@ -506,33 +511,45 @@ message CreateNodeRequest { Node node = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request for [DeleteNode][google.cloud.tpu.v2alpha1.Tpu.DeleteNode]. +// Request for [DeleteNode][google.cloud.tpu.v2.Tpu.DeleteNode]. message DeleteNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } ]; } -// Request for [StopNode][google.cloud.tpu.v2alpha1.Tpu.StopNode]. +// Request for [StopNode][google.cloud.tpu.v2.Tpu.StopNode]. message StopNodeRequest { - // The resource name. - string name = 1; + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; } -// Request for [StartNode][google.cloud.tpu.v2alpha1.Tpu.StartNode]. +// Request for [StartNode][google.cloud.tpu.v2.Tpu.StartNode]. message StartNodeRequest { - // The resource name. - string name = 1; + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; } -// Request for [UpdateNode][google.cloud.tpu.v2alpha1.Tpu.UpdateNode]. +// Request for [UpdateNode][google.cloud.tpu.v2.Tpu.UpdateNode]. message UpdateNodeRequest { // Required. Mask of fields from [Node][Tpu.Node] to update. - // Supported fields: None. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; + // Supported fields: [description, tags, labels, metadata, + // network_config.enable_external_ips]. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The node. Only fields specified in update_mask are updated. Node node = 2 [(google.api.field_behavior) = REQUIRED]; @@ -544,8 +561,7 @@ message ServiceIdentity { string email = 1; } -// Request for -// [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. +// Request for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. message GenerateServiceIdentityRequest { // Required. The parent resource name. string parent = 1 [ @@ -556,8 +572,7 @@ message GenerateServiceIdentityRequest { ]; } -// Response for -// [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. +// Response for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. message GenerateServiceIdentityResponse { // ServiceIdentity that was created or retrieved. ServiceIdentity identity = 1; @@ -577,8 +592,7 @@ message AcceleratorType { string type = 2; } -// Request for -// [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType]. +// Request for [GetAcceleratorType][google.cloud.tpu.v2.Tpu.GetAcceleratorType]. message GetAcceleratorTypeRequest { // Required. The resource name. string name = 1 [ @@ -589,14 +603,13 @@ message GetAcceleratorTypeRequest { ]; } -// Request for -// [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. +// Request for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesRequest { // Required. The parent resource name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "tpu.googleapis.com/AcceleratorType" + child_type: "tpu.googleapis.com/AcceleratorType" } ]; @@ -613,8 +626,7 @@ message ListAcceleratorTypesRequest { string order_by = 6; } -// Response for -// [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. +// Response for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesResponse { // The listed nodes. repeated AcceleratorType accelerator_types = 1; @@ -626,36 +638,6 @@ message ListAcceleratorTypesResponse { repeated string unreachable = 3; } -// Note: the following OperationMetadata message was added manually. -// This is caused by a conflict with some other message and will -// be resolved separately. Please make sure to add this message back -// if it's removed during public proto regeneration. - -// Metadata describing an [Operation][google.longrunning.Operation] -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Target of the operation - for example - // projects/project-1/connectivityTests/test-1 - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // Human-readable status of the operation, if any. - string status_detail = 5; - - // Specifies if cancellation was requested for the operation. - bool cancel_requested = 6; - - // API version. - string api_version = 7; -} - // A runtime version that a Node can be configured with. message RuntimeVersion { option (google.api.resource) = { @@ -670,8 +652,7 @@ message RuntimeVersion { string version = 2; } -// Request for -// [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion]. +// Request for [GetRuntimeVersion][google.cloud.tpu.v2.Tpu.GetRuntimeVersion]. message GetRuntimeVersionRequest { // Required. The resource name. string name = 1 [ @@ -682,14 +663,13 @@ message GetRuntimeVersionRequest { ]; } -// Request for -// [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. +// Request for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. message ListRuntimeVersionsRequest { // Required. The parent resource name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "tpu.googleapis.com/RuntimeVersion" + child_type: "tpu.googleapis.com/RuntimeVersion" } ]; @@ -706,8 +686,7 @@ message ListRuntimeVersionsRequest { string order_by = 6; } -// Response for -// [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. +// Response for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. message ListRuntimeVersionsResponse { // The listed nodes. repeated RuntimeVersion runtime_versions = 1; @@ -719,6 +698,31 @@ message ListRuntimeVersionsResponse { repeated string unreachable = 3; } +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} + // A Symptom instance. message Symptom { // SymptomType represents the different types of Symptoms that a TPU can be @@ -760,13 +764,14 @@ message Symptom { string worker_id = 4; } -// Request for -// [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. +// Request for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. message GetGuestAttributesRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } ]; // The guest attributes path to be queried. @@ -777,8 +782,7 @@ message GetGuestAttributesRequest { repeated string worker_ids = 3; } -// Response for -// [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. +// Response for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. message GetGuestAttributesResponse { // The guest attributes for the TPU workers. repeated GuestAttributes guest_attributes = 1; @@ -788,4 +792,4 @@ message GetGuestAttributesResponse { message ShieldedInstanceConfig { // Defines whether the instance has Secure Boot enabled. bool enable_secure_boot = 1; -} \ No newline at end of file +} diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/stub/tpustubsettings/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/stub/tpustubsettings/getnode/SyncGetNode.java new file mode 100644 index 000000000000..925423c230cd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/stub/tpustubsettings/getnode/SyncGetNode.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.stub.samples; + +// [START tpu_v2_generated_TpuStubSettings_GetNode_sync] +import com.google.cloud.tpu.v2.stub.TpuStubSettings; +import java.time.Duration; + +public class SyncGetNode { + + public static void main(String[] args) throws Exception { + syncGetNode(); + } + + public static void syncGetNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TpuStubSettings.Builder tpuSettingsBuilder = TpuStubSettings.newBuilder(); + tpuSettingsBuilder + .getNodeSettings() + .setRetrySettings( + tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TpuStubSettings tpuSettings = tpuSettingsBuilder.build(); + } +} +// [END tpu_v2_generated_TpuStubSettings_GetNode_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..8afccd8c9c25 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.cloud.tpu.v2.TpuSettings; +import com.google.cloud.tpu.v2.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TpuSettings tpuSettings = + TpuSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TpuClient tpuClient = TpuClient.create(tpuSettings); + } +} +// [END tpu_v2_generated_Tpu_Create_SetCredentialsProvider_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..6c734cb6e053 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_Create_SetCredentialsProvider1_sync] +import com.google.cloud.tpu.v2.TpuClient; +import com.google.cloud.tpu.v2.TpuSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TpuSettings tpuSettings = TpuSettings.newHttpJsonBuilder().build(); + TpuClient tpuClient = TpuClient.create(tpuSettings); + } +} +// [END tpu_v2_generated_Tpu_Create_SetCredentialsProvider1_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7028445dd422 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetEndpoint.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_Create_SetEndpoint_sync] +import com.google.cloud.tpu.v2.TpuClient; +import com.google.cloud.tpu.v2.TpuSettings; +import com.google.cloud.tpu.v2.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TpuSettings tpuSettings = TpuSettings.newBuilder().setEndpoint(myEndpoint).build(); + TpuClient tpuClient = TpuClient.create(tpuSettings); + } +} +// [END tpu_v2_generated_Tpu_Create_SetEndpoint_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNode.java new file mode 100644 index 000000000000..967e53af6d71 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNode.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_CreateNode_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.CreateNodeRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.longrunning.Operation; + +public class AsyncCreateNode { + + public static void main(String[] args) throws Exception { + asyncCreateNode(); + } + + public static void asyncCreateNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + CreateNodeRequest request = + CreateNodeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNodeId("nodeId-1040171331") + .setNode(Node.newBuilder().build()) + .build(); + ApiFuture future = tpuClient.createNodeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_CreateNode_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNodeLRO.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNodeLRO.java new file mode 100644 index 000000000000..f773b9507e68 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/AsyncCreateNodeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_CreateNode_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2.CreateNodeRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncCreateNodeLRO { + + public static void main(String[] args) throws Exception { + asyncCreateNodeLRO(); + } + + public static void asyncCreateNodeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + CreateNodeRequest request = + CreateNodeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNodeId("nodeId-1040171331") + .setNode(Node.newBuilder().build()) + .build(); + OperationFuture future = + tpuClient.createNodeOperationCallable().futureCall(request); + // Do something. + Node response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_CreateNode_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNode.java new file mode 100644 index 000000000000..95f3a9121a7f --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNode.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_CreateNode_sync] +import com.google.cloud.tpu.v2.CreateNodeRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncCreateNode { + + public static void main(String[] args) throws Exception { + syncCreateNode(); + } + + public static void syncCreateNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + CreateNodeRequest request = + CreateNodeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNodeId("nodeId-1040171331") + .setNode(Node.newBuilder().build()) + .build(); + Node response = tpuClient.createNodeAsync(request).get(); + } + } +} +// [END tpu_v2_generated_Tpu_CreateNode_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeLocationnameNodeString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeLocationnameNodeString.java new file mode 100644 index 000000000000..db38aac335e0 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeLocationnameNodeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_CreateNode_LocationnameNodeString_sync] +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncCreateNodeLocationnameNodeString { + + public static void main(String[] args) throws Exception { + syncCreateNodeLocationnameNodeString(); + } + + public static void syncCreateNodeLocationnameNodeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + Node response = tpuClient.createNodeAsync(parent, node, nodeId).get(); + } + } +} +// [END tpu_v2_generated_Tpu_CreateNode_LocationnameNodeString_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeStringNodeString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeStringNodeString.java new file mode 100644 index 000000000000..0254e9c47f00 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/createnode/SyncCreateNodeStringNodeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_CreateNode_StringNodeString_sync] +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncCreateNodeStringNodeString { + + public static void main(String[] args) throws Exception { + syncCreateNodeStringNodeString(); + } + + public static void syncCreateNodeStringNodeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + Node response = tpuClient.createNodeAsync(parent, node, nodeId).get(); + } + } +} +// [END tpu_v2_generated_Tpu_CreateNode_StringNodeString_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNode.java new file mode 100644 index 000000000000..8b7bd3f317d8 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNode.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_DeleteNode_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.DeleteNodeRequest; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteNode { + + public static void main(String[] args) throws Exception { + asyncDeleteNode(); + } + + public static void asyncDeleteNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + DeleteNodeRequest request = + DeleteNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + ApiFuture future = tpuClient.deleteNodeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_DeleteNode_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNodeLRO.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNodeLRO.java new file mode 100644 index 000000000000..0a3cfda3c611 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/AsyncDeleteNodeLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_DeleteNode_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2.DeleteNodeRequest; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteNodeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteNodeLRO(); + } + + public static void asyncDeleteNodeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + DeleteNodeRequest request = + DeleteNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + OperationFuture future = + tpuClient.deleteNodeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_DeleteNode_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNode.java new file mode 100644 index 000000000000..dde60561c84f --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNode.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_DeleteNode_sync] +import com.google.cloud.tpu.v2.DeleteNodeRequest; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNode { + + public static void main(String[] args) throws Exception { + syncDeleteNode(); + } + + public static void syncDeleteNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + DeleteNodeRequest request = + DeleteNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + tpuClient.deleteNodeAsync(request).get(); + } + } +} +// [END tpu_v2_generated_Tpu_DeleteNode_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeNodename.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeNodename.java new file mode 100644 index 000000000000..c65ef17c74d5 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeNodename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_DeleteNode_Nodename_sync] +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNodeNodename { + + public static void main(String[] args) throws Exception { + syncDeleteNodeNodename(); + } + + public static void syncDeleteNodeNodename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + tpuClient.deleteNodeAsync(name).get(); + } + } +} +// [END tpu_v2_generated_Tpu_DeleteNode_Nodename_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeString.java new file mode 100644 index 000000000000..4da05cb647b4 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/deletenode/SyncDeleteNodeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_DeleteNode_String_sync] +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNodeString { + + public static void main(String[] args) throws Exception { + syncDeleteNodeString(); + } + + public static void syncDeleteNodeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString(); + tpuClient.deleteNodeAsync(name).get(); + } + } +} +// [END tpu_v2_generated_Tpu_DeleteNode_String_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java new file mode 100644 index 000000000000..1405b83ff675 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GenerateServiceIdentity_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncGenerateServiceIdentity { + + public static void main(String[] args) throws Exception { + asyncGenerateServiceIdentity(); + } + + public static void asyncGenerateServiceIdentity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GenerateServiceIdentityRequest request = + GenerateServiceIdentityRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + tpuClient.generateServiceIdentityCallable().futureCall(request); + // Do something. + GenerateServiceIdentityResponse response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_GenerateServiceIdentity_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java new file mode 100644 index 000000000000..ae8fdf7aded9 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GenerateServiceIdentity_sync] +import com.google.cloud.tpu.v2.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGenerateServiceIdentity { + + public static void main(String[] args) throws Exception { + syncGenerateServiceIdentity(); + } + + public static void syncGenerateServiceIdentity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GenerateServiceIdentityRequest request = + GenerateServiceIdentityRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + GenerateServiceIdentityResponse response = tpuClient.generateServiceIdentity(request); + } + } +} +// [END tpu_v2_generated_Tpu_GenerateServiceIdentity_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/AsyncGetAcceleratorType.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/AsyncGetAcceleratorType.java new file mode 100644 index 000000000000..0ce384cb544b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/AsyncGetAcceleratorType.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetAcceleratorType_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.AcceleratorTypeName; +import com.google.cloud.tpu.v2.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncGetAcceleratorType { + + public static void main(String[] args) throws Exception { + asyncGetAcceleratorType(); + } + + public static void asyncGetAcceleratorType() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetAcceleratorTypeRequest request = + GetAcceleratorTypeRequest.newBuilder() + .setName( + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") + .toString()) + .build(); + ApiFuture future = + tpuClient.getAcceleratorTypeCallable().futureCall(request); + // Do something. + AcceleratorType response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_GetAcceleratorType_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorType.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorType.java new file mode 100644 index 000000000000..50c0dbf1ec34 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorType.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetAcceleratorType_sync] +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.AcceleratorTypeName; +import com.google.cloud.tpu.v2.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetAcceleratorType { + + public static void main(String[] args) throws Exception { + syncGetAcceleratorType(); + } + + public static void syncGetAcceleratorType() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetAcceleratorTypeRequest request = + GetAcceleratorTypeRequest.newBuilder() + .setName( + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") + .toString()) + .build(); + AcceleratorType response = tpuClient.getAcceleratorType(request); + } + } +} +// [END tpu_v2_generated_Tpu_GetAcceleratorType_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java new file mode 100644 index 000000000000..89c8b0e37c7e --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetAcceleratorType_Acceleratortypename_sync] +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.AcceleratorTypeName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetAcceleratorTypeAcceleratortypename { + + public static void main(String[] args) throws Exception { + syncGetAcceleratorTypeAcceleratortypename(); + } + + public static void syncGetAcceleratorTypeAcceleratortypename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + AcceleratorTypeName name = + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + AcceleratorType response = tpuClient.getAcceleratorType(name); + } + } +} +// [END tpu_v2_generated_Tpu_GetAcceleratorType_Acceleratortypename_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java new file mode 100644 index 000000000000..5934d2cceed6 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetAcceleratorType_String_sync] +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.AcceleratorTypeName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetAcceleratorTypeString { + + public static void main(String[] args) throws Exception { + syncGetAcceleratorTypeString(); + } + + public static void syncGetAcceleratorTypeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String name = + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString(); + AcceleratorType response = tpuClient.getAcceleratorType(name); + } + } +} +// [END tpu_v2_generated_Tpu_GetAcceleratorType_String_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/AsyncGetGuestAttributes.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/AsyncGetGuestAttributes.java new file mode 100644 index 000000000000..1bce176f1ba7 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/AsyncGetGuestAttributes.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetGuestAttributes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; +import java.util.ArrayList; + +public class AsyncGetGuestAttributes { + + public static void main(String[] args) throws Exception { + asyncGetGuestAttributes(); + } + + public static void asyncGetGuestAttributes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetGuestAttributesRequest request = + GetGuestAttributesRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setQueryPath("queryPath-1807004403") + .addAllWorkerIds(new ArrayList()) + .build(); + ApiFuture future = + tpuClient.getGuestAttributesCallable().futureCall(request); + // Do something. + GetGuestAttributesResponse response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_GetGuestAttributes_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/SyncGetGuestAttributes.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/SyncGetGuestAttributes.java new file mode 100644 index 000000000000..7c31c6bb798a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getguestattributes/SyncGetGuestAttributes.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetGuestAttributes_sync] +import com.google.cloud.tpu.v2.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; +import java.util.ArrayList; + +public class SyncGetGuestAttributes { + + public static void main(String[] args) throws Exception { + syncGetGuestAttributes(); + } + + public static void syncGetGuestAttributes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetGuestAttributesRequest request = + GetGuestAttributesRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setQueryPath("queryPath-1807004403") + .addAllWorkerIds(new ArrayList()) + .build(); + GetGuestAttributesResponse response = tpuClient.getGuestAttributes(request); + } + } +} +// [END tpu_v2_generated_Tpu_GetGuestAttributes_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..2c7b1cffd8c1 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = tpuClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_GetLocation_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/SyncGetLocation.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..57ae91067837 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = tpuClient.getLocation(request); + } + } +} +// [END tpu_v2_generated_Tpu_GetLocation_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/AsyncGetNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/AsyncGetNode.java new file mode 100644 index 000000000000..c95ea658fe3d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/AsyncGetNode.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetNode_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.GetNodeRequest; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncGetNode { + + public static void main(String[] args) throws Exception { + asyncGetNode(); + } + + public static void asyncGetNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetNodeRequest request = + GetNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + ApiFuture future = tpuClient.getNodeCallable().futureCall(request); + // Do something. + Node response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_GetNode_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNode.java new file mode 100644 index 000000000000..613ec74ff463 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNode.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetNode_sync] +import com.google.cloud.tpu.v2.GetNodeRequest; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetNode { + + public static void main(String[] args) throws Exception { + syncGetNode(); + } + + public static void syncGetNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetNodeRequest request = + GetNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + Node response = tpuClient.getNode(request); + } + } +} +// [END tpu_v2_generated_Tpu_GetNode_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeNodename.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeNodename.java new file mode 100644 index 000000000000..5d54c71fb4d1 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeNodename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetNode_Nodename_sync] +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetNodeNodename { + + public static void main(String[] args) throws Exception { + syncGetNodeNodename(); + } + + public static void syncGetNodeNodename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + Node response = tpuClient.getNode(name); + } + } +} +// [END tpu_v2_generated_Tpu_GetNode_Nodename_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeString.java new file mode 100644 index 000000000000..cb28eec38200 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getnode/SyncGetNodeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetNode_String_sync] +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetNodeString { + + public static void main(String[] args) throws Exception { + syncGetNodeString(); + } + + public static void syncGetNodeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString(); + Node response = tpuClient.getNode(name); + } + } +} +// [END tpu_v2_generated_Tpu_GetNode_String_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/AsyncGetRuntimeVersion.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/AsyncGetRuntimeVersion.java new file mode 100644 index 000000000000..bd17c04490a7 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/AsyncGetRuntimeVersion.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetRuntimeVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.RuntimeVersionName; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncGetRuntimeVersion { + + public static void main(String[] args) throws Exception { + asyncGetRuntimeVersion(); + } + + public static void asyncGetRuntimeVersion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetRuntimeVersionRequest request = + GetRuntimeVersionRequest.newBuilder() + .setName( + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .build(); + ApiFuture future = tpuClient.getRuntimeVersionCallable().futureCall(request); + // Do something. + RuntimeVersion response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_GetRuntimeVersion_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersion.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersion.java new file mode 100644 index 000000000000..d3b4cbf79cd6 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersion.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetRuntimeVersion_sync] +import com.google.cloud.tpu.v2.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.RuntimeVersionName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetRuntimeVersion { + + public static void main(String[] args) throws Exception { + syncGetRuntimeVersion(); + } + + public static void syncGetRuntimeVersion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetRuntimeVersionRequest request = + GetRuntimeVersionRequest.newBuilder() + .setName( + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .build(); + RuntimeVersion response = tpuClient.getRuntimeVersion(request); + } + } +} +// [END tpu_v2_generated_Tpu_GetRuntimeVersion_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java new file mode 100644 index 000000000000..bb9536e1e2a5 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetRuntimeVersion_Runtimeversionname_sync] +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.RuntimeVersionName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetRuntimeVersionRuntimeversionname { + + public static void main(String[] args) throws Exception { + syncGetRuntimeVersionRuntimeversionname(); + } + + public static void syncGetRuntimeVersionRuntimeversionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + RuntimeVersionName name = + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + RuntimeVersion response = tpuClient.getRuntimeVersion(name); + } + } +} +// [END tpu_v2_generated_Tpu_GetRuntimeVersion_Runtimeversionname_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionString.java new file mode 100644 index 000000000000..b5eee77a8908 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/getruntimeversion/SyncGetRuntimeVersionString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_GetRuntimeVersion_String_sync] +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.RuntimeVersionName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncGetRuntimeVersionString { + + public static void main(String[] args) throws Exception { + syncGetRuntimeVersionString(); + } + + public static void syncGetRuntimeVersionString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String name = + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString(); + RuntimeVersion response = tpuClient.getRuntimeVersion(name); + } + } +} +// [END tpu_v2_generated_Tpu_GetRuntimeVersion_String_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java new file mode 100644 index 000000000000..38691c4a6bd0 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java @@ -0,0 +1,56 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListAcceleratorTypes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncListAcceleratorTypes { + + public static void main(String[] args) throws Exception { + asyncListAcceleratorTypes(); + } + + public static void asyncListAcceleratorTypes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + tpuClient.listAcceleratorTypesPagedCallable().futureCall(request); + // Do something. + for (AcceleratorType element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListAcceleratorTypes_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java new file mode 100644 index 000000000000..3be7cf72751c --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListAcceleratorTypes_Paged_async] +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.common.base.Strings; + +public class AsyncListAcceleratorTypesPaged { + + public static void main(String[] args) throws Exception { + asyncListAcceleratorTypesPaged(); + } + + public static void asyncListAcceleratorTypesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAcceleratorTypesResponse response = + tpuClient.listAcceleratorTypesCallable().call(request); + for (AcceleratorType element : response.getAcceleratorTypesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tpu_v2_generated_Tpu_ListAcceleratorTypes_Paged_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypes.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypes.java new file mode 100644 index 000000000000..7be3443f6f47 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypes.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListAcceleratorTypes_sync] +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListAcceleratorTypes { + + public static void main(String[] args) throws Exception { + syncListAcceleratorTypes(); + } + + public static void syncListAcceleratorTypes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (AcceleratorType element : tpuClient.listAcceleratorTypes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListAcceleratorTypes_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java new file mode 100644 index 000000000000..cba03bb0e6b2 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListAcceleratorTypes_Locationname_sync] +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListAcceleratorTypesLocationname { + + public static void main(String[] args) throws Exception { + syncListAcceleratorTypesLocationname(); + } + + public static void syncListAcceleratorTypesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListAcceleratorTypes_Locationname_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java new file mode 100644 index 000000000000..948b7d29eea9 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListAcceleratorTypes_String_sync] +import com.google.cloud.tpu.v2.AcceleratorType; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListAcceleratorTypesString { + + public static void main(String[] args) throws Exception { + syncListAcceleratorTypesString(); + } + + public static void syncListAcceleratorTypesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListAcceleratorTypes_String_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocations.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..e7db43742214 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = tpuClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListLocations_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..df914a476164 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = tpuClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tpu_v2_generated_Tpu_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/SyncListLocations.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..5fe9083f8e15 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : tpuClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListLocations_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodes.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodes.java new file mode 100644 index 000000000000..122c3a42a44f --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodes.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListNodes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.ListNodesRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncListNodes { + + public static void main(String[] args) throws Exception { + asyncListNodes(); + } + + public static void asyncListNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListNodesRequest request = + ListNodesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = tpuClient.listNodesPagedCallable().futureCall(request); + // Do something. + for (Node element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListNodes_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodesPaged.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodesPaged.java new file mode 100644 index 000000000000..624802597874 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/AsyncListNodesPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListNodes_Paged_async] +import com.google.cloud.tpu.v2.ListNodesRequest; +import com.google.cloud.tpu.v2.ListNodesResponse; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.common.base.Strings; + +public class AsyncListNodesPaged { + + public static void main(String[] args) throws Exception { + asyncListNodesPaged(); + } + + public static void asyncListNodesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListNodesRequest request = + ListNodesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListNodesResponse response = tpuClient.listNodesCallable().call(request); + for (Node element : response.getNodesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tpu_v2_generated_Tpu_ListNodes_Paged_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodes.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodes.java new file mode 100644 index 000000000000..9298bfe2ad0d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodes.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListNodes_sync] +import com.google.cloud.tpu.v2.ListNodesRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListNodes { + + public static void main(String[] args) throws Exception { + syncListNodes(); + } + + public static void syncListNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListNodesRequest request = + ListNodesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Node element : tpuClient.listNodes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListNodes_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesLocationname.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesLocationname.java new file mode 100644 index 000000000000..386e24e55a66 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListNodes_Locationname_sync] +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListNodesLocationname { + + public static void main(String[] args) throws Exception { + syncListNodesLocationname(); + } + + public static void syncListNodesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Node element : tpuClient.listNodes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListNodes_Locationname_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesString.java new file mode 100644 index 000000000000..1af658e49c25 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listnodes/SyncListNodesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListNodes_String_sync] +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListNodesString { + + public static void main(String[] args) throws Exception { + syncListNodesString(); + } + + public static void syncListNodesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Node element : tpuClient.listNodes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListNodes_String_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersions.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersions.java new file mode 100644 index 000000000000..20c891561e29 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersions.java @@ -0,0 +1,56 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListRuntimeVersions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncListRuntimeVersions { + + public static void main(String[] args) throws Exception { + asyncListRuntimeVersions(); + } + + public static void asyncListRuntimeVersions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListRuntimeVersionsRequest request = + ListRuntimeVersionsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + tpuClient.listRuntimeVersionsPagedCallable().futureCall(request); + // Do something. + for (RuntimeVersion element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListRuntimeVersions_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java new file mode 100644 index 000000000000..c6edd9ad20e4 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListRuntimeVersions_Paged_async] +import com.google.cloud.tpu.v2.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.common.base.Strings; + +public class AsyncListRuntimeVersionsPaged { + + public static void main(String[] args) throws Exception { + asyncListRuntimeVersionsPaged(); + } + + public static void asyncListRuntimeVersionsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListRuntimeVersionsRequest request = + ListRuntimeVersionsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListRuntimeVersionsResponse response = + tpuClient.listRuntimeVersionsCallable().call(request); + for (RuntimeVersion element : response.getRuntimeVersionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tpu_v2_generated_Tpu_ListRuntimeVersions_Paged_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersions.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersions.java new file mode 100644 index 000000000000..ff664f78531b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersions.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListRuntimeVersions_sync] +import com.google.cloud.tpu.v2.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListRuntimeVersions { + + public static void main(String[] args) throws Exception { + syncListRuntimeVersions(); + } + + public static void syncListRuntimeVersions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListRuntimeVersionsRequest request = + ListRuntimeVersionsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (RuntimeVersion element : tpuClient.listRuntimeVersions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListRuntimeVersions_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java new file mode 100644 index 000000000000..8210d1a23574 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListRuntimeVersions_Locationname_sync] +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListRuntimeVersionsLocationname { + + public static void main(String[] args) throws Exception { + syncListRuntimeVersionsLocationname(); + } + + public static void syncListRuntimeVersionsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListRuntimeVersions_Locationname_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsString.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsString.java new file mode 100644 index 000000000000..f3cccb1e0507 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/listruntimeversions/SyncListRuntimeVersionsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_ListRuntimeVersions_String_sync] +import com.google.cloud.tpu.v2.LocationName; +import com.google.cloud.tpu.v2.RuntimeVersion; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncListRuntimeVersionsString { + + public static void main(String[] args) throws Exception { + syncListRuntimeVersionsString(); + } + + public static void syncListRuntimeVersionsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2_generated_Tpu_ListRuntimeVersions_String_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNode.java new file mode 100644 index 000000000000..9abea00d0718 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNode.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_StartNode_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.StartNodeRequest; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.longrunning.Operation; + +public class AsyncStartNode { + + public static void main(String[] args) throws Exception { + asyncStartNode(); + } + + public static void asyncStartNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + ApiFuture future = tpuClient.startNodeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_StartNode_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNodeLRO.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNodeLRO.java new file mode 100644 index 000000000000..c40a0e961a01 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/AsyncStartNodeLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_StartNode_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.StartNodeRequest; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncStartNodeLRO { + + public static void main(String[] args) throws Exception { + asyncStartNodeLRO(); + } + + public static void asyncStartNodeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + OperationFuture future = + tpuClient.startNodeOperationCallable().futureCall(request); + // Do something. + Node response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_StartNode_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/SyncStartNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/SyncStartNode.java new file mode 100644 index 000000000000..7b4d7875200e --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/startnode/SyncStartNode.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_StartNode_sync] +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.StartNodeRequest; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncStartNode { + + public static void main(String[] args) throws Exception { + syncStartNode(); + } + + public static void syncStartNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + Node response = tpuClient.startNodeAsync(request).get(); + } + } +} +// [END tpu_v2_generated_Tpu_StartNode_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNode.java new file mode 100644 index 000000000000..111caf4ae40b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNode.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_StopNode_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.StopNodeRequest; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.longrunning.Operation; + +public class AsyncStopNode { + + public static void main(String[] args) throws Exception { + asyncStopNode(); + } + + public static void asyncStopNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + ApiFuture future = tpuClient.stopNodeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_StopNode_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNodeLRO.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNodeLRO.java new file mode 100644 index 000000000000..5ef4fd26a0eb --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/AsyncStopNodeLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_StopNode_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.StopNodeRequest; +import com.google.cloud.tpu.v2.TpuClient; + +public class AsyncStopNodeLRO { + + public static void main(String[] args) throws Exception { + asyncStopNodeLRO(); + } + + public static void asyncStopNodeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + OperationFuture future = + tpuClient.stopNodeOperationCallable().futureCall(request); + // Do something. + Node response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_StopNode_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/SyncStopNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/SyncStopNode.java new file mode 100644 index 000000000000..c2ea538b5252 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/stopnode/SyncStopNode.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_StopNode_sync] +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.NodeName; +import com.google.cloud.tpu.v2.StopNodeRequest; +import com.google.cloud.tpu.v2.TpuClient; + +public class SyncStopNode { + + public static void main(String[] args) throws Exception { + syncStopNode(); + } + + public static void syncStopNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + Node response = tpuClient.stopNodeAsync(request).get(); + } + } +} +// [END tpu_v2_generated_Tpu_StopNode_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNode.java new file mode 100644 index 000000000000..74bebd56b9ad --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNode.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_UpdateNode_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.cloud.tpu.v2.UpdateNodeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateNode { + + public static void main(String[] args) throws Exception { + asyncUpdateNode(); + } + + public static void asyncUpdateNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + UpdateNodeRequest request = + UpdateNodeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setNode(Node.newBuilder().build()) + .build(); + ApiFuture future = tpuClient.updateNodeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_UpdateNode_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNodeLRO.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNodeLRO.java new file mode 100644 index 000000000000..80e3cb2049e6 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/AsyncUpdateNodeLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_UpdateNode_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.OperationMetadata; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.cloud.tpu.v2.UpdateNodeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateNodeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateNodeLRO(); + } + + public static void asyncUpdateNodeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + UpdateNodeRequest request = + UpdateNodeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setNode(Node.newBuilder().build()) + .build(); + OperationFuture future = + tpuClient.updateNodeOperationCallable().futureCall(request); + // Do something. + Node response = future.get(); + } + } +} +// [END tpu_v2_generated_Tpu_UpdateNode_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNode.java new file mode 100644 index 000000000000..a18df080d118 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNode.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_UpdateNode_sync] +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.cloud.tpu.v2.UpdateNodeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateNode { + + public static void main(String[] args) throws Exception { + syncUpdateNode(); + } + + public static void syncUpdateNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + UpdateNodeRequest request = + UpdateNodeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setNode(Node.newBuilder().build()) + .build(); + Node response = tpuClient.updateNodeAsync(request).get(); + } + } +} +// [END tpu_v2_generated_Tpu_UpdateNode_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java new file mode 100644 index 000000000000..4e0d5a145a51 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_Tpu_UpdateNode_NodeFieldmask_sync] +import com.google.cloud.tpu.v2.Node; +import com.google.cloud.tpu.v2.TpuClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateNodeNodeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateNodeNodeFieldmask(); + } + + public static void syncUpdateNodeNodeFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + Node node = Node.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Node response = tpuClient.updateNodeAsync(node, updateMask).get(); + } + } +} +// [END tpu_v2_generated_Tpu_UpdateNode_NodeFieldmask_sync] diff --git a/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpusettings/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpusettings/getnode/SyncGetNode.java new file mode 100644 index 000000000000..a6683ccac7bf --- /dev/null +++ b/owl-bot-staging/java-tpu/v2/samples/snippets/generated/com/google/cloud/tpu/v2/tpusettings/getnode/SyncGetNode.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2.samples; + +// [START tpu_v2_generated_TpuSettings_GetNode_sync] +import com.google.cloud.tpu.v2.TpuSettings; +import java.time.Duration; + +public class SyncGetNode { + + public static void main(String[] args) throws Exception { + syncGetNode(); + } + + public static void syncGetNode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TpuSettings.Builder tpuSettingsBuilder = TpuSettings.newBuilder(); + tpuSettingsBuilder + .getNodeSettings() + .setRetrySettings( + tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TpuSettings tpuSettings = tpuSettingsBuilder.build(); + } +} +// [END tpu_v2_generated_TpuSettings_GetNode_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuClient.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuClient.java new file mode 100644 index 000000000000..e9f3f21dda6b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuClient.java @@ -0,0 +1,3001 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.stub.TpuStub; +import com.google.cloud.tpu.v2alpha1.stub.TpuStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages TPU nodes and other resources + * + *

TPU API v2alpha1 + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TpuClient tpuClient = TpuClient.create()) {
+ *   NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]");
+ *   Node response = tpuClient.getNode(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the TpuClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of TpuSettings to create(). For + * example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TpuSettings tpuSettings =
+ *     TpuSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * TpuClient tpuClient = TpuClient.create(tpuSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TpuSettings tpuSettings = TpuSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TpuClient tpuClient = TpuClient.create(tpuSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class TpuClient implements BackgroundResource { + private final TpuSettings settings; + private final TpuStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of TpuClient with default settings. */ + public static final TpuClient create() throws IOException { + return create(TpuSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TpuClient, using the given settings. The channels are created based + * on the settings passed in, or defaults for any settings that are not set. + */ + public static final TpuClient create(TpuSettings settings) throws IOException { + return new TpuClient(settings); + } + + /** + * Constructs an instance of TpuClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(TpuSettings). + */ + public static final TpuClient create(TpuStub stub) { + return new TpuClient(stub); + } + + /** + * Constructs an instance of TpuClient, using the given settings. This is protected so that it is + * easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected TpuClient(TpuSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TpuStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected TpuClient(TpuStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final TpuSettings getSettings() { + return settings; + } + + public TpuStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Node element : tpuClient.listNodes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNodesPagedResponse listNodes(LocationName parent) { + ListNodesRequest request = + ListNodesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listNodes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Node element : tpuClient.listNodes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNodesPagedResponse listNodes(String parent) { + ListNodesRequest request = ListNodesRequest.newBuilder().setParent(parent).build(); + return listNodes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListNodesRequest request =
+   *       ListNodesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Node element : tpuClient.listNodes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNodesPagedResponse listNodes(ListNodesRequest request) { + return listNodesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListNodesRequest request =
+   *       ListNodesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = tpuClient.listNodesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Node element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNodesPagedCallable() { + return stub.listNodesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListNodesRequest request =
+   *       ListNodesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListNodesResponse response = tpuClient.listNodesCallable().call(request);
+   *     for (Node element : response.getNodesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNodesCallable() { + return stub.listNodesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]");
+   *   Node response = tpuClient.getNode(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Node getNode(NodeName name) { + GetNodeRequest request = + GetNodeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNode(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString();
+   *   Node response = tpuClient.getNode(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Node getNode(String name) { + GetNodeRequest request = GetNodeRequest.newBuilder().setName(name).build(); + return getNode(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetNodeRequest request =
+   *       GetNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   Node response = tpuClient.getNode(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Node getNode(GetNodeRequest request) { + return getNodeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetNodeRequest request =
+   *       GetNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   ApiFuture future = tpuClient.getNodeCallable().futureCall(request);
+   *   // Do something.
+   *   Node response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNodeCallable() { + return stub.getNodeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Node node = Node.newBuilder().build();
+   *   String nodeId = "nodeId-1040171331";
+   *   Node response = tpuClient.createNodeAsync(parent, node, nodeId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @param node Required. The node. + * @param nodeId The unqualified resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNodeAsync( + LocationName parent, Node node, String nodeId) { + CreateNodeRequest request = + CreateNodeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNode(node) + .setNodeId(nodeId) + .build(); + return createNodeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Node node = Node.newBuilder().build();
+   *   String nodeId = "nodeId-1040171331";
+   *   Node response = tpuClient.createNodeAsync(parent, node, nodeId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @param node Required. The node. + * @param nodeId The unqualified resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNodeAsync( + String parent, Node node, String nodeId) { + CreateNodeRequest request = + CreateNodeRequest.newBuilder().setParent(parent).setNode(node).setNodeId(nodeId).build(); + return createNodeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   CreateNodeRequest request =
+   *       CreateNodeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNodeId("nodeId-1040171331")
+   *           .setNode(Node.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Node response = tpuClient.createNodeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNodeAsync(CreateNodeRequest request) { + return createNodeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   CreateNodeRequest request =
+   *       CreateNodeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNodeId("nodeId-1040171331")
+   *           .setNode(Node.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.createNodeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Node response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createNodeOperationCallable() { + return stub.createNodeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   CreateNodeRequest request =
+   *       CreateNodeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNodeId("nodeId-1040171331")
+   *           .setNode(Node.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = tpuClient.createNodeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createNodeCallable() { + return stub.createNodeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]");
+   *   tpuClient.deleteNodeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNodeAsync(NodeName name) { + DeleteNodeRequest request = + DeleteNodeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteNodeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString();
+   *   tpuClient.deleteNodeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNodeAsync(String name) { + DeleteNodeRequest request = DeleteNodeRequest.newBuilder().setName(name).build(); + return deleteNodeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   DeleteNodeRequest request =
+   *       DeleteNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   tpuClient.deleteNodeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNodeAsync( + DeleteNodeRequest request) { + return deleteNodeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   DeleteNodeRequest request =
+   *       DeleteNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.deleteNodeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteNodeOperationCallable() { + return stub.deleteNodeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   DeleteNodeRequest request =
+   *       DeleteNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = tpuClient.deleteNodeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteNodeCallable() { + return stub.deleteNodeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a node. This operation is only available with single TPU nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   StopNodeRequest request =
+   *       StopNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   Node response = tpuClient.stopNodeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture stopNodeAsync(StopNodeRequest request) { + return stopNodeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a node. This operation is only available with single TPU nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   StopNodeRequest request =
+   *       StopNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.stopNodeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Node response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + stopNodeOperationCallable() { + return stub.stopNodeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a node. This operation is only available with single TPU nodes. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   StopNodeRequest request =
+   *       StopNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   ApiFuture future = tpuClient.stopNodeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable stopNodeCallable() { + return stub.stopNodeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   StartNodeRequest request =
+   *       StartNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   Node response = tpuClient.startNodeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture startNodeAsync(StartNodeRequest request) { + return startNodeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   StartNodeRequest request =
+   *       StartNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.startNodeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Node response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + startNodeOperationCallable() { + return stub.startNodeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   StartNodeRequest request =
+   *       StartNodeRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .build();
+   *   ApiFuture future = tpuClient.startNodeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable startNodeCallable() { + return stub.startNodeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configurations of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   Node node = Node.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Node response = tpuClient.updateNodeAsync(node, updateMask).get();
+   * }
+   * }
+ * + * @param node Required. The node. Only fields specified in update_mask are updated. + * @param updateMask Required. Mask of fields from [Node][Tpu.Node] to update. Supported fields: + * [description, tags, labels, metadata, network_config.enable_external_ips]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateNodeAsync( + Node node, FieldMask updateMask) { + UpdateNodeRequest request = + UpdateNodeRequest.newBuilder().setNode(node).setUpdateMask(updateMask).build(); + return updateNodeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configurations of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   UpdateNodeRequest request =
+   *       UpdateNodeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setNode(Node.newBuilder().build())
+   *           .build();
+   *   Node response = tpuClient.updateNodeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateNodeAsync(UpdateNodeRequest request) { + return updateNodeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configurations of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   UpdateNodeRequest request =
+   *       UpdateNodeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setNode(Node.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.updateNodeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Node response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateNodeOperationCallable() { + return stub.updateNodeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the configurations of a node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   UpdateNodeRequest request =
+   *       UpdateNodeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setNode(Node.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = tpuClient.updateNodeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateNodeCallable() { + return stub.updateNodeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists queued resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (QueuedResource element : tpuClient.listQueuedResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListQueuedResourcesPagedResponse listQueuedResources(LocationName parent) { + ListQueuedResourcesRequest request = + ListQueuedResourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listQueuedResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists queued resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (QueuedResource element : tpuClient.listQueuedResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListQueuedResourcesPagedResponse listQueuedResources(String parent) { + ListQueuedResourcesRequest request = + ListQueuedResourcesRequest.newBuilder().setParent(parent).build(); + return listQueuedResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists queued resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListQueuedResourcesRequest request =
+   *       ListQueuedResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (QueuedResource element : tpuClient.listQueuedResources(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListQueuedResourcesPagedResponse listQueuedResources( + ListQueuedResourcesRequest request) { + return listQueuedResourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists queued resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListQueuedResourcesRequest request =
+   *       ListQueuedResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       tpuClient.listQueuedResourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (QueuedResource element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listQueuedResourcesPagedCallable() { + return stub.listQueuedResourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists queued resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListQueuedResourcesRequest request =
+   *       ListQueuedResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListQueuedResourcesResponse response =
+   *         tpuClient.listQueuedResourcesCallable().call(request);
+   *     for (QueuedResource element : response.getQueuedResourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listQueuedResourcesCallable() { + return stub.listQueuedResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a queued resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   QueuedResourceName name =
+   *       QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]");
+   *   QueuedResource response = tpuClient.getQueuedResource(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueuedResource getQueuedResource(QueuedResourceName name) { + GetQueuedResourceRequest request = + GetQueuedResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getQueuedResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a queued resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String name =
+   *       QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString();
+   *   QueuedResource response = tpuClient.getQueuedResource(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueuedResource getQueuedResource(String name) { + GetQueuedResourceRequest request = GetQueuedResourceRequest.newBuilder().setName(name).build(); + return getQueuedResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a queued resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetQueuedResourceRequest request =
+   *       GetQueuedResourceRequest.newBuilder()
+   *           .setName(
+   *               QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString())
+   *           .build();
+   *   QueuedResource response = tpuClient.getQueuedResource(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueuedResource getQueuedResource(GetQueuedResourceRequest request) { + return getQueuedResourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a queued resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetQueuedResourceRequest request =
+   *       GetQueuedResourceRequest.newBuilder()
+   *           .setName(
+   *               QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString())
+   *           .build();
+   *   ApiFuture future = tpuClient.getQueuedResourceCallable().futureCall(request);
+   *   // Do something.
+   *   QueuedResource response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getQueuedResourceCallable() { + return stub.getQueuedResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   QueuedResource queuedResource = QueuedResource.newBuilder().build();
+   *   String queuedResourceId = "queuedResourceId437646236";
+   *   QueuedResource response =
+   *       tpuClient.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @param queuedResource Required. The queued resource. + * @param queuedResourceId The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + * regex format. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createQueuedResourceAsync( + LocationName parent, QueuedResource queuedResource, String queuedResourceId) { + CreateQueuedResourceRequest request = + CreateQueuedResourceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setQueuedResource(queuedResource) + .setQueuedResourceId(queuedResourceId) + .build(); + return createQueuedResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   QueuedResource queuedResource = QueuedResource.newBuilder().build();
+   *   String queuedResourceId = "queuedResourceId437646236";
+   *   QueuedResource response =
+   *       tpuClient.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @param queuedResource Required. The queued resource. + * @param queuedResourceId The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + * regex format. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createQueuedResourceAsync( + String parent, QueuedResource queuedResource, String queuedResourceId) { + CreateQueuedResourceRequest request = + CreateQueuedResourceRequest.newBuilder() + .setParent(parent) + .setQueuedResource(queuedResource) + .setQueuedResourceId(queuedResourceId) + .build(); + return createQueuedResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   CreateQueuedResourceRequest request =
+   *       CreateQueuedResourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setQueuedResourceId("queuedResourceId437646236")
+   *           .setQueuedResource(QueuedResource.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   QueuedResource response = tpuClient.createQueuedResourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createQueuedResourceAsync( + CreateQueuedResourceRequest request) { + return createQueuedResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   CreateQueuedResourceRequest request =
+   *       CreateQueuedResourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setQueuedResourceId("queuedResourceId437646236")
+   *           .setQueuedResource(QueuedResource.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.createQueuedResourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   QueuedResource response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createQueuedResourceOperationCallable() { + return stub.createQueuedResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   CreateQueuedResourceRequest request =
+   *       CreateQueuedResourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setQueuedResourceId("queuedResourceId437646236")
+   *           .setQueuedResource(QueuedResource.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = tpuClient.createQueuedResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createQueuedResourceCallable() { + return stub.createQueuedResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   QueuedResourceName name =
+   *       QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]");
+   *   QueuedResource response = tpuClient.deleteQueuedResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteQueuedResourceAsync( + QueuedResourceName name) { + DeleteQueuedResourceRequest request = + DeleteQueuedResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteQueuedResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String name =
+   *       QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString();
+   *   QueuedResource response = tpuClient.deleteQueuedResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteQueuedResourceAsync( + String name) { + DeleteQueuedResourceRequest request = + DeleteQueuedResourceRequest.newBuilder().setName(name).build(); + return deleteQueuedResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   DeleteQueuedResourceRequest request =
+   *       DeleteQueuedResourceRequest.newBuilder()
+   *           .setName(
+   *               QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   QueuedResource response = tpuClient.deleteQueuedResourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteQueuedResourceAsync( + DeleteQueuedResourceRequest request) { + return deleteQueuedResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   DeleteQueuedResourceRequest request =
+   *       DeleteQueuedResourceRequest.newBuilder()
+   *           .setName(
+   *               QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.deleteQueuedResourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   QueuedResource response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteQueuedResourceOperationCallable() { + return stub.deleteQueuedResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a QueuedResource TPU instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   DeleteQueuedResourceRequest request =
+   *       DeleteQueuedResourceRequest.newBuilder()
+   *           .setName(
+   *               QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = tpuClient.deleteQueuedResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteQueuedResourceCallable() { + return stub.deleteQueuedResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates the Cloud TPU service identity for the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GenerateServiceIdentityRequest request =
+   *       GenerateServiceIdentityRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   GenerateServiceIdentityResponse response = tpuClient.generateServiceIdentity(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerateServiceIdentityResponse generateServiceIdentity( + GenerateServiceIdentityRequest request) { + return generateServiceIdentityCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates the Cloud TPU service identity for the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GenerateServiceIdentityRequest request =
+   *       GenerateServiceIdentityRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       tpuClient.generateServiceIdentityCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateServiceIdentityResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateServiceIdentityCallable() { + return stub.generateServiceIdentityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists accelerator types supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(LocationName parent) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAcceleratorTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists accelerator types supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(String parent) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder().setParent(parent).build(); + return listAcceleratorTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists accelerator types supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListAcceleratorTypesRequest request =
+   *       ListAcceleratorTypesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (AcceleratorType element : tpuClient.listAcceleratorTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAcceleratorTypesPagedResponse listAcceleratorTypes( + ListAcceleratorTypesRequest request) { + return listAcceleratorTypesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists accelerator types supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListAcceleratorTypesRequest request =
+   *       ListAcceleratorTypesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       tpuClient.listAcceleratorTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AcceleratorType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAcceleratorTypesPagedCallable() { + return stub.listAcceleratorTypesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists accelerator types supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListAcceleratorTypesRequest request =
+   *       ListAcceleratorTypesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAcceleratorTypesResponse response =
+   *         tpuClient.listAcceleratorTypesCallable().call(request);
+   *     for (AcceleratorType element : response.getAcceleratorTypesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAcceleratorTypesCallable() { + return stub.listAcceleratorTypesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets AcceleratorType. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   AcceleratorTypeName name =
+   *       AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]");
+   *   AcceleratorType response = tpuClient.getAcceleratorType(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AcceleratorType getAcceleratorType(AcceleratorTypeName name) { + GetAcceleratorTypeRequest request = + GetAcceleratorTypeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAcceleratorType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets AcceleratorType. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String name =
+   *       AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString();
+   *   AcceleratorType response = tpuClient.getAcceleratorType(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AcceleratorType getAcceleratorType(String name) { + GetAcceleratorTypeRequest request = + GetAcceleratorTypeRequest.newBuilder().setName(name).build(); + return getAcceleratorType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets AcceleratorType. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetAcceleratorTypeRequest request =
+   *       GetAcceleratorTypeRequest.newBuilder()
+   *           .setName(
+   *               AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   AcceleratorType response = tpuClient.getAcceleratorType(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AcceleratorType getAcceleratorType(GetAcceleratorTypeRequest request) { + return getAcceleratorTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets AcceleratorType. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetAcceleratorTypeRequest request =
+   *       GetAcceleratorTypeRequest.newBuilder()
+   *           .setName(
+   *               AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       tpuClient.getAcceleratorTypeCallable().futureCall(request);
+   *   // Do something.
+   *   AcceleratorType response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAcceleratorTypeCallable() { + return stub.getAcceleratorTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runtime versions supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimeVersionsPagedResponse listRuntimeVersions(LocationName parent) { + ListRuntimeVersionsRequest request = + ListRuntimeVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRuntimeVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runtime versions supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimeVersionsPagedResponse listRuntimeVersions(String parent) { + ListRuntimeVersionsRequest request = + ListRuntimeVersionsRequest.newBuilder().setParent(parent).build(); + return listRuntimeVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runtime versions supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListRuntimeVersionsRequest request =
+   *       ListRuntimeVersionsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (RuntimeVersion element : tpuClient.listRuntimeVersions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimeVersionsPagedResponse listRuntimeVersions( + ListRuntimeVersionsRequest request) { + return listRuntimeVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runtime versions supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListRuntimeVersionsRequest request =
+   *       ListRuntimeVersionsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       tpuClient.listRuntimeVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RuntimeVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRuntimeVersionsPagedCallable() { + return stub.listRuntimeVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists runtime versions supported by this API. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListRuntimeVersionsRequest request =
+   *       ListRuntimeVersionsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListRuntimeVersionsResponse response =
+   *         tpuClient.listRuntimeVersionsCallable().call(request);
+   *     for (RuntimeVersion element : response.getRuntimeVersionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRuntimeVersionsCallable() { + return stub.listRuntimeVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a runtime version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   RuntimeVersionName name =
+   *       RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]");
+   *   RuntimeVersion response = tpuClient.getRuntimeVersion(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RuntimeVersion getRuntimeVersion(RuntimeVersionName name) { + GetRuntimeVersionRequest request = + GetRuntimeVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getRuntimeVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a runtime version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   String name =
+   *       RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString();
+   *   RuntimeVersion response = tpuClient.getRuntimeVersion(name);
+   * }
+   * }
+ * + * @param name Required. The resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RuntimeVersion getRuntimeVersion(String name) { + GetRuntimeVersionRequest request = GetRuntimeVersionRequest.newBuilder().setName(name).build(); + return getRuntimeVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a runtime version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetRuntimeVersionRequest request =
+   *       GetRuntimeVersionRequest.newBuilder()
+   *           .setName(
+   *               RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString())
+   *           .build();
+   *   RuntimeVersion response = tpuClient.getRuntimeVersion(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RuntimeVersion getRuntimeVersion(GetRuntimeVersionRequest request) { + return getRuntimeVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a runtime version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetRuntimeVersionRequest request =
+   *       GetRuntimeVersionRequest.newBuilder()
+   *           .setName(
+   *               RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString())
+   *           .build();
+   *   ApiFuture future = tpuClient.getRuntimeVersionCallable().futureCall(request);
+   *   // Do something.
+   *   RuntimeVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRuntimeVersionCallable() { + return stub.getRuntimeVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the guest attributes for the node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetGuestAttributesRequest request =
+   *       GetGuestAttributesRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .setQueryPath("queryPath-1807004403")
+   *           .addAllWorkerIds(new ArrayList())
+   *           .build();
+   *   GetGuestAttributesResponse response = tpuClient.getGuestAttributes(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GetGuestAttributesResponse getGuestAttributes(GetGuestAttributesRequest request) { + return getGuestAttributesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the guest attributes for the node. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetGuestAttributesRequest request =
+   *       GetGuestAttributesRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .setQueryPath("queryPath-1807004403")
+   *           .addAllWorkerIds(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       tpuClient.getGuestAttributesCallable().futureCall(request);
+   *   // Do something.
+   *   GetGuestAttributesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getGuestAttributesCallable() { + return stub.getGuestAttributesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates a maintenance event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   SimulateMaintenanceEventRequest request =
+   *       SimulateMaintenanceEventRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .addAllWorkerIds(new ArrayList())
+   *           .build();
+   *   Node response = tpuClient.simulateMaintenanceEventAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture simulateMaintenanceEventAsync( + SimulateMaintenanceEventRequest request) { + return simulateMaintenanceEventOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates a maintenance event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   SimulateMaintenanceEventRequest request =
+   *       SimulateMaintenanceEventRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .addAllWorkerIds(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       tpuClient.simulateMaintenanceEventOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Node response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + simulateMaintenanceEventOperationCallable() { + return stub.simulateMaintenanceEventOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates a maintenance event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   SimulateMaintenanceEventRequest request =
+   *       SimulateMaintenanceEventRequest.newBuilder()
+   *           .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString())
+   *           .addAllWorkerIds(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       tpuClient.simulateMaintenanceEventCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + simulateMaintenanceEventCallable() { + return stub.simulateMaintenanceEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : tpuClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = tpuClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = tpuClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = tpuClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TpuClient tpuClient = TpuClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = tpuClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListNodesPagedResponse + extends AbstractPagedListResponse< + ListNodesRequest, ListNodesResponse, Node, ListNodesPage, ListNodesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNodesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListNodesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListNodesPagedResponse(ListNodesPage page) { + super(page, ListNodesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNodesPage + extends AbstractPage { + + private ListNodesPage( + PageContext context, + ListNodesResponse response) { + super(context, response); + } + + private static ListNodesPage createEmptyPage() { + return new ListNodesPage(null, null); + } + + @Override + protected ListNodesPage createPage( + PageContext context, + ListNodesResponse response) { + return new ListNodesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNodesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNodesRequest, ListNodesResponse, Node, ListNodesPage, ListNodesFixedSizeCollection> { + + private ListNodesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNodesFixedSizeCollection createEmptyCollection() { + return new ListNodesFixedSizeCollection(null, 0); + } + + @Override + protected ListNodesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNodesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListQueuedResourcesPagedResponse + extends AbstractPagedListResponse< + ListQueuedResourcesRequest, + ListQueuedResourcesResponse, + QueuedResource, + ListQueuedResourcesPage, + ListQueuedResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListQueuedResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListQueuedResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListQueuedResourcesPagedResponse(ListQueuedResourcesPage page) { + super(page, ListQueuedResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListQueuedResourcesPage + extends AbstractPage< + ListQueuedResourcesRequest, + ListQueuedResourcesResponse, + QueuedResource, + ListQueuedResourcesPage> { + + private ListQueuedResourcesPage( + PageContext + context, + ListQueuedResourcesResponse response) { + super(context, response); + } + + private static ListQueuedResourcesPage createEmptyPage() { + return new ListQueuedResourcesPage(null, null); + } + + @Override + protected ListQueuedResourcesPage createPage( + PageContext + context, + ListQueuedResourcesResponse response) { + return new ListQueuedResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListQueuedResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListQueuedResourcesRequest, + ListQueuedResourcesResponse, + QueuedResource, + ListQueuedResourcesPage, + ListQueuedResourcesFixedSizeCollection> { + + private ListQueuedResourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListQueuedResourcesFixedSizeCollection createEmptyCollection() { + return new ListQueuedResourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListQueuedResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListQueuedResourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAcceleratorTypesPagedResponse + extends AbstractPagedListResponse< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + AcceleratorType, + ListAcceleratorTypesPage, + ListAcceleratorTypesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAcceleratorTypesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAcceleratorTypesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAcceleratorTypesPagedResponse(ListAcceleratorTypesPage page) { + super(page, ListAcceleratorTypesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAcceleratorTypesPage + extends AbstractPage< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + AcceleratorType, + ListAcceleratorTypesPage> { + + private ListAcceleratorTypesPage( + PageContext + context, + ListAcceleratorTypesResponse response) { + super(context, response); + } + + private static ListAcceleratorTypesPage createEmptyPage() { + return new ListAcceleratorTypesPage(null, null); + } + + @Override + protected ListAcceleratorTypesPage createPage( + PageContext + context, + ListAcceleratorTypesResponse response) { + return new ListAcceleratorTypesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAcceleratorTypesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + AcceleratorType, + ListAcceleratorTypesPage, + ListAcceleratorTypesFixedSizeCollection> { + + private ListAcceleratorTypesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAcceleratorTypesFixedSizeCollection createEmptyCollection() { + return new ListAcceleratorTypesFixedSizeCollection(null, 0); + } + + @Override + protected ListAcceleratorTypesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAcceleratorTypesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRuntimeVersionsPagedResponse + extends AbstractPagedListResponse< + ListRuntimeVersionsRequest, + ListRuntimeVersionsResponse, + RuntimeVersion, + ListRuntimeVersionsPage, + ListRuntimeVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRuntimeVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRuntimeVersionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRuntimeVersionsPagedResponse(ListRuntimeVersionsPage page) { + super(page, ListRuntimeVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRuntimeVersionsPage + extends AbstractPage< + ListRuntimeVersionsRequest, + ListRuntimeVersionsResponse, + RuntimeVersion, + ListRuntimeVersionsPage> { + + private ListRuntimeVersionsPage( + PageContext + context, + ListRuntimeVersionsResponse response) { + super(context, response); + } + + private static ListRuntimeVersionsPage createEmptyPage() { + return new ListRuntimeVersionsPage(null, null); + } + + @Override + protected ListRuntimeVersionsPage createPage( + PageContext + context, + ListRuntimeVersionsResponse response) { + return new ListRuntimeVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRuntimeVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRuntimeVersionsRequest, + ListRuntimeVersionsResponse, + RuntimeVersion, + ListRuntimeVersionsPage, + ListRuntimeVersionsFixedSizeCollection> { + + private ListRuntimeVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRuntimeVersionsFixedSizeCollection createEmptyCollection() { + return new ListRuntimeVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListRuntimeVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRuntimeVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuSettings.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuSettings.java new file mode 100644 index 000000000000..e0ebc60e7c8d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/TpuSettings.java @@ -0,0 +1,523 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1; + +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListQueuedResourcesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.stub.TpuStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TpuClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (tpu.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNode to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TpuSettings.Builder tpuSettingsBuilder = TpuSettings.newBuilder();
+ * tpuSettingsBuilder
+ *     .getNodeSettings()
+ *     .setRetrySettings(
+ *         tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TpuSettings tpuSettings = tpuSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class TpuSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listNodes. */ + public PagedCallSettings + listNodesSettings() { + return ((TpuStubSettings) getStubSettings()).listNodesSettings(); + } + + /** Returns the object with the settings used for calls to getNode. */ + public UnaryCallSettings getNodeSettings() { + return ((TpuStubSettings) getStubSettings()).getNodeSettings(); + } + + /** Returns the object with the settings used for calls to createNode. */ + public UnaryCallSettings createNodeSettings() { + return ((TpuStubSettings) getStubSettings()).createNodeSettings(); + } + + /** Returns the object with the settings used for calls to createNode. */ + public OperationCallSettings + createNodeOperationSettings() { + return ((TpuStubSettings) getStubSettings()).createNodeOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteNode. */ + public UnaryCallSettings deleteNodeSettings() { + return ((TpuStubSettings) getStubSettings()).deleteNodeSettings(); + } + + /** Returns the object with the settings used for calls to deleteNode. */ + public OperationCallSettings + deleteNodeOperationSettings() { + return ((TpuStubSettings) getStubSettings()).deleteNodeOperationSettings(); + } + + /** Returns the object with the settings used for calls to stopNode. */ + public UnaryCallSettings stopNodeSettings() { + return ((TpuStubSettings) getStubSettings()).stopNodeSettings(); + } + + /** Returns the object with the settings used for calls to stopNode. */ + public OperationCallSettings + stopNodeOperationSettings() { + return ((TpuStubSettings) getStubSettings()).stopNodeOperationSettings(); + } + + /** Returns the object with the settings used for calls to startNode. */ + public UnaryCallSettings startNodeSettings() { + return ((TpuStubSettings) getStubSettings()).startNodeSettings(); + } + + /** Returns the object with the settings used for calls to startNode. */ + public OperationCallSettings + startNodeOperationSettings() { + return ((TpuStubSettings) getStubSettings()).startNodeOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateNode. */ + public UnaryCallSettings updateNodeSettings() { + return ((TpuStubSettings) getStubSettings()).updateNodeSettings(); + } + + /** Returns the object with the settings used for calls to updateNode. */ + public OperationCallSettings + updateNodeOperationSettings() { + return ((TpuStubSettings) getStubSettings()).updateNodeOperationSettings(); + } + + /** Returns the object with the settings used for calls to listQueuedResources. */ + public PagedCallSettings< + ListQueuedResourcesRequest, ListQueuedResourcesResponse, ListQueuedResourcesPagedResponse> + listQueuedResourcesSettings() { + return ((TpuStubSettings) getStubSettings()).listQueuedResourcesSettings(); + } + + /** Returns the object with the settings used for calls to getQueuedResource. */ + public UnaryCallSettings getQueuedResourceSettings() { + return ((TpuStubSettings) getStubSettings()).getQueuedResourceSettings(); + } + + /** Returns the object with the settings used for calls to createQueuedResource. */ + public UnaryCallSettings createQueuedResourceSettings() { + return ((TpuStubSettings) getStubSettings()).createQueuedResourceSettings(); + } + + /** Returns the object with the settings used for calls to createQueuedResource. */ + public OperationCallSettings + createQueuedResourceOperationSettings() { + return ((TpuStubSettings) getStubSettings()).createQueuedResourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteQueuedResource. */ + public UnaryCallSettings deleteQueuedResourceSettings() { + return ((TpuStubSettings) getStubSettings()).deleteQueuedResourceSettings(); + } + + /** Returns the object with the settings used for calls to deleteQueuedResource. */ + public OperationCallSettings + deleteQueuedResourceOperationSettings() { + return ((TpuStubSettings) getStubSettings()).deleteQueuedResourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to generateServiceIdentity. */ + public UnaryCallSettings + generateServiceIdentitySettings() { + return ((TpuStubSettings) getStubSettings()).generateServiceIdentitySettings(); + } + + /** Returns the object with the settings used for calls to listAcceleratorTypes. */ + public PagedCallSettings< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse> + listAcceleratorTypesSettings() { + return ((TpuStubSettings) getStubSettings()).listAcceleratorTypesSettings(); + } + + /** Returns the object with the settings used for calls to getAcceleratorType. */ + public UnaryCallSettings + getAcceleratorTypeSettings() { + return ((TpuStubSettings) getStubSettings()).getAcceleratorTypeSettings(); + } + + /** Returns the object with the settings used for calls to listRuntimeVersions. */ + public PagedCallSettings< + ListRuntimeVersionsRequest, ListRuntimeVersionsResponse, ListRuntimeVersionsPagedResponse> + listRuntimeVersionsSettings() { + return ((TpuStubSettings) getStubSettings()).listRuntimeVersionsSettings(); + } + + /** Returns the object with the settings used for calls to getRuntimeVersion. */ + public UnaryCallSettings getRuntimeVersionSettings() { + return ((TpuStubSettings) getStubSettings()).getRuntimeVersionSettings(); + } + + /** Returns the object with the settings used for calls to getGuestAttributes. */ + public UnaryCallSettings + getGuestAttributesSettings() { + return ((TpuStubSettings) getStubSettings()).getGuestAttributesSettings(); + } + + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings + simulateMaintenanceEventSettings() { + return ((TpuStubSettings) getStubSettings()).simulateMaintenanceEventSettings(); + } + + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public OperationCallSettings + simulateMaintenanceEventOperationSettings() { + return ((TpuStubSettings) getStubSettings()).simulateMaintenanceEventOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((TpuStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((TpuStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final TpuSettings create(TpuStubSettings stub) throws IOException { + return new TpuSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return TpuStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return TpuStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return TpuStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return TpuStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return TpuStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return TpuStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TpuStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TpuSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for TpuSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(TpuStubSettings.newBuilder(clientContext)); + } + + protected Builder(TpuSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(TpuStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(TpuStubSettings.newBuilder()); + } + + public TpuStubSettings.Builder getStubSettingsBuilder() { + return ((TpuStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listNodes. */ + public PagedCallSettings.Builder + listNodesSettings() { + return getStubSettingsBuilder().listNodesSettings(); + } + + /** Returns the builder for the settings used for calls to getNode. */ + public UnaryCallSettings.Builder getNodeSettings() { + return getStubSettingsBuilder().getNodeSettings(); + } + + /** Returns the builder for the settings used for calls to createNode. */ + public UnaryCallSettings.Builder createNodeSettings() { + return getStubSettingsBuilder().createNodeSettings(); + } + + /** Returns the builder for the settings used for calls to createNode. */ + public OperationCallSettings.Builder + createNodeOperationSettings() { + return getStubSettingsBuilder().createNodeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNode. */ + public UnaryCallSettings.Builder deleteNodeSettings() { + return getStubSettingsBuilder().deleteNodeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNode. */ + public OperationCallSettings.Builder + deleteNodeOperationSettings() { + return getStubSettingsBuilder().deleteNodeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to stopNode. */ + public UnaryCallSettings.Builder stopNodeSettings() { + return getStubSettingsBuilder().stopNodeSettings(); + } + + /** Returns the builder for the settings used for calls to stopNode. */ + public OperationCallSettings.Builder + stopNodeOperationSettings() { + return getStubSettingsBuilder().stopNodeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startNode. */ + public UnaryCallSettings.Builder startNodeSettings() { + return getStubSettingsBuilder().startNodeSettings(); + } + + /** Returns the builder for the settings used for calls to startNode. */ + public OperationCallSettings.Builder + startNodeOperationSettings() { + return getStubSettingsBuilder().startNodeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateNode. */ + public UnaryCallSettings.Builder updateNodeSettings() { + return getStubSettingsBuilder().updateNodeSettings(); + } + + /** Returns the builder for the settings used for calls to updateNode. */ + public OperationCallSettings.Builder + updateNodeOperationSettings() { + return getStubSettingsBuilder().updateNodeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listQueuedResources. */ + public PagedCallSettings.Builder< + ListQueuedResourcesRequest, + ListQueuedResourcesResponse, + ListQueuedResourcesPagedResponse> + listQueuedResourcesSettings() { + return getStubSettingsBuilder().listQueuedResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to getQueuedResource. */ + public UnaryCallSettings.Builder + getQueuedResourceSettings() { + return getStubSettingsBuilder().getQueuedResourceSettings(); + } + + /** Returns the builder for the settings used for calls to createQueuedResource. */ + public UnaryCallSettings.Builder + createQueuedResourceSettings() { + return getStubSettingsBuilder().createQueuedResourceSettings(); + } + + /** Returns the builder for the settings used for calls to createQueuedResource. */ + public OperationCallSettings.Builder< + CreateQueuedResourceRequest, QueuedResource, OperationMetadata> + createQueuedResourceOperationSettings() { + return getStubSettingsBuilder().createQueuedResourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteQueuedResource. */ + public UnaryCallSettings.Builder + deleteQueuedResourceSettings() { + return getStubSettingsBuilder().deleteQueuedResourceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteQueuedResource. */ + public OperationCallSettings.Builder< + DeleteQueuedResourceRequest, QueuedResource, OperationMetadata> + deleteQueuedResourceOperationSettings() { + return getStubSettingsBuilder().deleteQueuedResourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to generateServiceIdentity. */ + public UnaryCallSettings.Builder< + GenerateServiceIdentityRequest, GenerateServiceIdentityResponse> + generateServiceIdentitySettings() { + return getStubSettingsBuilder().generateServiceIdentitySettings(); + } + + /** Returns the builder for the settings used for calls to listAcceleratorTypes. */ + public PagedCallSettings.Builder< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse> + listAcceleratorTypesSettings() { + return getStubSettingsBuilder().listAcceleratorTypesSettings(); + } + + /** Returns the builder for the settings used for calls to getAcceleratorType. */ + public UnaryCallSettings.Builder + getAcceleratorTypeSettings() { + return getStubSettingsBuilder().getAcceleratorTypeSettings(); + } + + /** Returns the builder for the settings used for calls to listRuntimeVersions. */ + public PagedCallSettings.Builder< + ListRuntimeVersionsRequest, + ListRuntimeVersionsResponse, + ListRuntimeVersionsPagedResponse> + listRuntimeVersionsSettings() { + return getStubSettingsBuilder().listRuntimeVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to getRuntimeVersion. */ + public UnaryCallSettings.Builder + getRuntimeVersionSettings() { + return getStubSettingsBuilder().getRuntimeVersionSettings(); + } + + /** Returns the builder for the settings used for calls to getGuestAttributes. */ + public UnaryCallSettings.Builder + getGuestAttributesSettings() { + return getStubSettingsBuilder().getGuestAttributesSettings(); + } + + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings.Builder + simulateMaintenanceEventSettings() { + return getStubSettingsBuilder().simulateMaintenanceEventSettings(); + } + + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + public OperationCallSettings.Builder + simulateMaintenanceEventOperationSettings() { + return getStubSettingsBuilder().simulateMaintenanceEventOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public TpuSettings build() throws IOException { + return new TpuSettings(this); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/gapic_metadata.json b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/gapic_metadata.json new file mode 100644 index 000000000000..c0c8ee5f3d5d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/gapic_metadata.json @@ -0,0 +1,78 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.tpu.v2alpha1", + "libraryPackage": "com.google.cloud.tpu.v2alpha1", + "services": { + "Tpu": { + "clients": { + "grpc": { + "libraryClient": "TpuClient", + "rpcs": { + "CreateNode": { + "methods": ["createNodeAsync", "createNodeAsync", "createNodeAsync", "createNodeOperationCallable", "createNodeCallable"] + }, + "CreateQueuedResource": { + "methods": ["createQueuedResourceAsync", "createQueuedResourceAsync", "createQueuedResourceAsync", "createQueuedResourceOperationCallable", "createQueuedResourceCallable"] + }, + "DeleteNode": { + "methods": ["deleteNodeAsync", "deleteNodeAsync", "deleteNodeAsync", "deleteNodeOperationCallable", "deleteNodeCallable"] + }, + "DeleteQueuedResource": { + "methods": ["deleteQueuedResourceAsync", "deleteQueuedResourceAsync", "deleteQueuedResourceAsync", "deleteQueuedResourceOperationCallable", "deleteQueuedResourceCallable"] + }, + "GenerateServiceIdentity": { + "methods": ["generateServiceIdentity", "generateServiceIdentityCallable"] + }, + "GetAcceleratorType": { + "methods": ["getAcceleratorType", "getAcceleratorType", "getAcceleratorType", "getAcceleratorTypeCallable"] + }, + "GetGuestAttributes": { + "methods": ["getGuestAttributes", "getGuestAttributesCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetNode": { + "methods": ["getNode", "getNode", "getNode", "getNodeCallable"] + }, + "GetQueuedResource": { + "methods": ["getQueuedResource", "getQueuedResource", "getQueuedResource", "getQueuedResourceCallable"] + }, + "GetRuntimeVersion": { + "methods": ["getRuntimeVersion", "getRuntimeVersion", "getRuntimeVersion", "getRuntimeVersionCallable"] + }, + "ListAcceleratorTypes": { + "methods": ["listAcceleratorTypes", "listAcceleratorTypes", "listAcceleratorTypes", "listAcceleratorTypesPagedCallable", "listAcceleratorTypesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListNodes": { + "methods": ["listNodes", "listNodes", "listNodes", "listNodesPagedCallable", "listNodesCallable"] + }, + "ListQueuedResources": { + "methods": ["listQueuedResources", "listQueuedResources", "listQueuedResources", "listQueuedResourcesPagedCallable", "listQueuedResourcesCallable"] + }, + "ListRuntimeVersions": { + "methods": ["listRuntimeVersions", "listRuntimeVersions", "listRuntimeVersions", "listRuntimeVersionsPagedCallable", "listRuntimeVersionsCallable"] + }, + "SimulateMaintenanceEvent": { + "methods": ["simulateMaintenanceEventAsync", "simulateMaintenanceEventOperationCallable", "simulateMaintenanceEventCallable"] + }, + "StartNode": { + "methods": ["startNodeAsync", "startNodeOperationCallable", "startNodeCallable"] + }, + "StopNode": { + "methods": ["stopNodeAsync", "stopNodeOperationCallable", "stopNodeCallable"] + }, + "UpdateNode": { + "methods": ["updateNodeAsync", "updateNodeAsync", "updateNodeOperationCallable", "updateNodeCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/package-info.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/package-info.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/package-info.java rename to owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/package-info.java diff --git a/java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuCallableFactory.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuCallableFactory.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuCallableFactory.java rename to owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuCallableFactory.java diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuStub.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuStub.java new file mode 100644 index 000000000000..1eb67191472a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/GrpcTpuStub.java @@ -0,0 +1,954 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.stub; + +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListQueuedResourcesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +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.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.AcceleratorType; +import com.google.cloud.tpu.v2alpha1.CreateNodeRequest; +import com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; +import com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2alpha1.GetNodeRequest; +import com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2alpha1.ListNodesRequest; +import com.google.cloud.tpu.v2alpha1.ListNodesResponse; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse; +import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.OperationMetadata; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.RuntimeVersion; +import com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest; +import com.google.cloud.tpu.v2alpha1.StartNodeRequest; +import com.google.cloud.tpu.v2alpha1.StopNodeRequest; +import com.google.cloud.tpu.v2alpha1.UpdateNodeRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Tpu service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcTpuStub extends TpuStub { + private static final MethodDescriptor + listNodesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/ListNodes") + .setRequestMarshaller(ProtoUtils.marshaller(ListNodesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListNodesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getNodeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetNode") + .setRequestMarshaller(ProtoUtils.marshaller(GetNodeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Node.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createNodeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/CreateNode") + .setRequestMarshaller(ProtoUtils.marshaller(CreateNodeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteNodeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/DeleteNode") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteNodeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor stopNodeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/StopNode") + .setRequestMarshaller(ProtoUtils.marshaller(StopNodeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor startNodeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/StartNode") + .setRequestMarshaller(ProtoUtils.marshaller(StartNodeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateNodeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/UpdateNode") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateNodeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listQueuedResourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/ListQueuedResources") + .setRequestMarshaller( + ProtoUtils.marshaller(ListQueuedResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListQueuedResourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getQueuedResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetQueuedResource") + .setRequestMarshaller( + ProtoUtils.marshaller(GetQueuedResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(QueuedResource.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createQueuedResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/CreateQueuedResource") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateQueuedResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteQueuedResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/DeleteQueuedResource") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteQueuedResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GenerateServiceIdentityRequest, GenerateServiceIdentityResponse> + generateServiceIdentityMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GenerateServiceIdentity") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateServiceIdentityRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateServiceIdentityResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAcceleratorTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/ListAcceleratorTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAcceleratorTypesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAcceleratorTypesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAcceleratorTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetAcceleratorType") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAcceleratorTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AcceleratorType.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRuntimeVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/ListRuntimeVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRuntimeVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRuntimeVersionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getRuntimeVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetRuntimeVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(GetRuntimeVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RuntimeVersion.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getGuestAttributesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/GetGuestAttributes") + .setRequestMarshaller( + ProtoUtils.marshaller(GetGuestAttributesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GetGuestAttributesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + simulateMaintenanceEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tpu.v2alpha1.Tpu/SimulateMaintenanceEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(SimulateMaintenanceEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable listNodesCallable; + private final UnaryCallable listNodesPagedCallable; + private final UnaryCallable getNodeCallable; + private final UnaryCallable createNodeCallable; + private final OperationCallable + createNodeOperationCallable; + private final UnaryCallable deleteNodeCallable; + private final OperationCallable + deleteNodeOperationCallable; + private final UnaryCallable stopNodeCallable; + private final OperationCallable + stopNodeOperationCallable; + private final UnaryCallable startNodeCallable; + private final OperationCallable + startNodeOperationCallable; + private final UnaryCallable updateNodeCallable; + private final OperationCallable + updateNodeOperationCallable; + private final UnaryCallable + listQueuedResourcesCallable; + private final UnaryCallable + listQueuedResourcesPagedCallable; + private final UnaryCallable getQueuedResourceCallable; + private final UnaryCallable createQueuedResourceCallable; + private final OperationCallable + createQueuedResourceOperationCallable; + private final UnaryCallable deleteQueuedResourceCallable; + private final OperationCallable + deleteQueuedResourceOperationCallable; + private final UnaryCallable + generateServiceIdentityCallable; + private final UnaryCallable + listAcceleratorTypesCallable; + private final UnaryCallable + listAcceleratorTypesPagedCallable; + private final UnaryCallable + getAcceleratorTypeCallable; + private final UnaryCallable + listRuntimeVersionsCallable; + private final UnaryCallable + listRuntimeVersionsPagedCallable; + private final UnaryCallable getRuntimeVersionCallable; + private final UnaryCallable + getGuestAttributesCallable; + private final UnaryCallable + simulateMaintenanceEventCallable; + private final OperationCallable + simulateMaintenanceEventOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcTpuStub create(TpuStubSettings settings) throws IOException { + return new GrpcTpuStub(settings, ClientContext.create(settings)); + } + + public static final GrpcTpuStub create(ClientContext clientContext) throws IOException { + return new GrpcTpuStub(TpuStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcTpuStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcTpuStub(TpuStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcTpuStub, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcTpuStub(TpuStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcTpuCallableFactory()); + } + + /** + * Constructs an instance of GrpcTpuStub, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcTpuStub( + TpuStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listNodesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNodesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getNodeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNodeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createNodeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNodeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteNodeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNodeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings stopNodeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopNodeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings startNodeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startNodeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateNodeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateNodeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("node.name", String.valueOf(request.getNode().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listQueuedResourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listQueuedResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getQueuedResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getQueuedResourceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createQueuedResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createQueuedResourceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteQueuedResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteQueuedResourceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + generateServiceIdentityTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(generateServiceIdentityMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + listAcceleratorTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAcceleratorTypesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getAcceleratorTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAcceleratorTypeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listRuntimeVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRuntimeVersionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getRuntimeVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRuntimeVersionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getGuestAttributesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getGuestAttributesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + simulateMaintenanceEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(simulateMaintenanceEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.listNodesCallable = + callableFactory.createUnaryCallable( + listNodesTransportSettings, settings.listNodesSettings(), clientContext); + this.listNodesPagedCallable = + callableFactory.createPagedCallable( + listNodesTransportSettings, settings.listNodesSettings(), clientContext); + this.getNodeCallable = + callableFactory.createUnaryCallable( + getNodeTransportSettings, settings.getNodeSettings(), clientContext); + this.createNodeCallable = + callableFactory.createUnaryCallable( + createNodeTransportSettings, settings.createNodeSettings(), clientContext); + this.createNodeOperationCallable = + callableFactory.createOperationCallable( + createNodeTransportSettings, + settings.createNodeOperationSettings(), + clientContext, + operationsStub); + this.deleteNodeCallable = + callableFactory.createUnaryCallable( + deleteNodeTransportSettings, settings.deleteNodeSettings(), clientContext); + this.deleteNodeOperationCallable = + callableFactory.createOperationCallable( + deleteNodeTransportSettings, + settings.deleteNodeOperationSettings(), + clientContext, + operationsStub); + this.stopNodeCallable = + callableFactory.createUnaryCallable( + stopNodeTransportSettings, settings.stopNodeSettings(), clientContext); + this.stopNodeOperationCallable = + callableFactory.createOperationCallable( + stopNodeTransportSettings, + settings.stopNodeOperationSettings(), + clientContext, + operationsStub); + this.startNodeCallable = + callableFactory.createUnaryCallable( + startNodeTransportSettings, settings.startNodeSettings(), clientContext); + this.startNodeOperationCallable = + callableFactory.createOperationCallable( + startNodeTransportSettings, + settings.startNodeOperationSettings(), + clientContext, + operationsStub); + this.updateNodeCallable = + callableFactory.createUnaryCallable( + updateNodeTransportSettings, settings.updateNodeSettings(), clientContext); + this.updateNodeOperationCallable = + callableFactory.createOperationCallable( + updateNodeTransportSettings, + settings.updateNodeOperationSettings(), + clientContext, + operationsStub); + this.listQueuedResourcesCallable = + callableFactory.createUnaryCallable( + listQueuedResourcesTransportSettings, + settings.listQueuedResourcesSettings(), + clientContext); + this.listQueuedResourcesPagedCallable = + callableFactory.createPagedCallable( + listQueuedResourcesTransportSettings, + settings.listQueuedResourcesSettings(), + clientContext); + this.getQueuedResourceCallable = + callableFactory.createUnaryCallable( + getQueuedResourceTransportSettings, + settings.getQueuedResourceSettings(), + clientContext); + this.createQueuedResourceCallable = + callableFactory.createUnaryCallable( + createQueuedResourceTransportSettings, + settings.createQueuedResourceSettings(), + clientContext); + this.createQueuedResourceOperationCallable = + callableFactory.createOperationCallable( + createQueuedResourceTransportSettings, + settings.createQueuedResourceOperationSettings(), + clientContext, + operationsStub); + this.deleteQueuedResourceCallable = + callableFactory.createUnaryCallable( + deleteQueuedResourceTransportSettings, + settings.deleteQueuedResourceSettings(), + clientContext); + this.deleteQueuedResourceOperationCallable = + callableFactory.createOperationCallable( + deleteQueuedResourceTransportSettings, + settings.deleteQueuedResourceOperationSettings(), + clientContext, + operationsStub); + this.generateServiceIdentityCallable = + callableFactory.createUnaryCallable( + generateServiceIdentityTransportSettings, + settings.generateServiceIdentitySettings(), + clientContext); + this.listAcceleratorTypesCallable = + callableFactory.createUnaryCallable( + listAcceleratorTypesTransportSettings, + settings.listAcceleratorTypesSettings(), + clientContext); + this.listAcceleratorTypesPagedCallable = + callableFactory.createPagedCallable( + listAcceleratorTypesTransportSettings, + settings.listAcceleratorTypesSettings(), + clientContext); + this.getAcceleratorTypeCallable = + callableFactory.createUnaryCallable( + getAcceleratorTypeTransportSettings, + settings.getAcceleratorTypeSettings(), + clientContext); + this.listRuntimeVersionsCallable = + callableFactory.createUnaryCallable( + listRuntimeVersionsTransportSettings, + settings.listRuntimeVersionsSettings(), + clientContext); + this.listRuntimeVersionsPagedCallable = + callableFactory.createPagedCallable( + listRuntimeVersionsTransportSettings, + settings.listRuntimeVersionsSettings(), + clientContext); + this.getRuntimeVersionCallable = + callableFactory.createUnaryCallable( + getRuntimeVersionTransportSettings, + settings.getRuntimeVersionSettings(), + clientContext); + this.getGuestAttributesCallable = + callableFactory.createUnaryCallable( + getGuestAttributesTransportSettings, + settings.getGuestAttributesSettings(), + clientContext); + this.simulateMaintenanceEventCallable = + callableFactory.createUnaryCallable( + simulateMaintenanceEventTransportSettings, + settings.simulateMaintenanceEventSettings(), + clientContext); + this.simulateMaintenanceEventOperationCallable = + callableFactory.createOperationCallable( + simulateMaintenanceEventTransportSettings, + settings.simulateMaintenanceEventOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listNodesCallable() { + return listNodesCallable; + } + + @Override + public UnaryCallable listNodesPagedCallable() { + return listNodesPagedCallable; + } + + @Override + public UnaryCallable getNodeCallable() { + return getNodeCallable; + } + + @Override + public UnaryCallable createNodeCallable() { + return createNodeCallable; + } + + @Override + public OperationCallable + createNodeOperationCallable() { + return createNodeOperationCallable; + } + + @Override + public UnaryCallable deleteNodeCallable() { + return deleteNodeCallable; + } + + @Override + public OperationCallable + deleteNodeOperationCallable() { + return deleteNodeOperationCallable; + } + + @Override + public UnaryCallable stopNodeCallable() { + return stopNodeCallable; + } + + @Override + public OperationCallable stopNodeOperationCallable() { + return stopNodeOperationCallable; + } + + @Override + public UnaryCallable startNodeCallable() { + return startNodeCallable; + } + + @Override + public OperationCallable startNodeOperationCallable() { + return startNodeOperationCallable; + } + + @Override + public UnaryCallable updateNodeCallable() { + return updateNodeCallable; + } + + @Override + public OperationCallable + updateNodeOperationCallable() { + return updateNodeOperationCallable; + } + + @Override + public UnaryCallable + listQueuedResourcesCallable() { + return listQueuedResourcesCallable; + } + + @Override + public UnaryCallable + listQueuedResourcesPagedCallable() { + return listQueuedResourcesPagedCallable; + } + + @Override + public UnaryCallable getQueuedResourceCallable() { + return getQueuedResourceCallable; + } + + @Override + public UnaryCallable createQueuedResourceCallable() { + return createQueuedResourceCallable; + } + + @Override + public OperationCallable + createQueuedResourceOperationCallable() { + return createQueuedResourceOperationCallable; + } + + @Override + public UnaryCallable deleteQueuedResourceCallable() { + return deleteQueuedResourceCallable; + } + + @Override + public OperationCallable + deleteQueuedResourceOperationCallable() { + return deleteQueuedResourceOperationCallable; + } + + @Override + public UnaryCallable + generateServiceIdentityCallable() { + return generateServiceIdentityCallable; + } + + @Override + public UnaryCallable + listAcceleratorTypesCallable() { + return listAcceleratorTypesCallable; + } + + @Override + public UnaryCallable + listAcceleratorTypesPagedCallable() { + return listAcceleratorTypesPagedCallable; + } + + @Override + public UnaryCallable getAcceleratorTypeCallable() { + return getAcceleratorTypeCallable; + } + + @Override + public UnaryCallable + listRuntimeVersionsCallable() { + return listRuntimeVersionsCallable; + } + + @Override + public UnaryCallable + listRuntimeVersionsPagedCallable() { + return listRuntimeVersionsPagedCallable; + } + + @Override + public UnaryCallable getRuntimeVersionCallable() { + return getRuntimeVersionCallable; + } + + @Override + public UnaryCallable + getGuestAttributesCallable() { + return getGuestAttributesCallable; + } + + @Override + public UnaryCallable + simulateMaintenanceEventCallable() { + return simulateMaintenanceEventCallable; + } + + @Override + public OperationCallable + simulateMaintenanceEventOperationCallable() { + return simulateMaintenanceEventOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStub.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStub.java new file mode 100644 index 000000000000..5840bb723c1b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStub.java @@ -0,0 +1,234 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.stub; + +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListQueuedResourcesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.AcceleratorType; +import com.google.cloud.tpu.v2alpha1.CreateNodeRequest; +import com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; +import com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2alpha1.GetNodeRequest; +import com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2alpha1.ListNodesRequest; +import com.google.cloud.tpu.v2alpha1.ListNodesResponse; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse; +import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.OperationMetadata; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.RuntimeVersion; +import com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest; +import com.google.cloud.tpu.v2alpha1.StartNodeRequest; +import com.google.cloud.tpu.v2alpha1.StopNodeRequest; +import com.google.cloud.tpu.v2alpha1.UpdateNodeRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Tpu service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class TpuStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable listNodesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNodesPagedCallable()"); + } + + public UnaryCallable listNodesCallable() { + throw new UnsupportedOperationException("Not implemented: listNodesCallable()"); + } + + public UnaryCallable getNodeCallable() { + throw new UnsupportedOperationException("Not implemented: getNodeCallable()"); + } + + public OperationCallable + createNodeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createNodeOperationCallable()"); + } + + public UnaryCallable createNodeCallable() { + throw new UnsupportedOperationException("Not implemented: createNodeCallable()"); + } + + public OperationCallable + deleteNodeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNodeOperationCallable()"); + } + + public UnaryCallable deleteNodeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNodeCallable()"); + } + + public OperationCallable stopNodeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: stopNodeOperationCallable()"); + } + + public UnaryCallable stopNodeCallable() { + throw new UnsupportedOperationException("Not implemented: stopNodeCallable()"); + } + + public OperationCallable startNodeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: startNodeOperationCallable()"); + } + + public UnaryCallable startNodeCallable() { + throw new UnsupportedOperationException("Not implemented: startNodeCallable()"); + } + + public OperationCallable + updateNodeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateNodeOperationCallable()"); + } + + public UnaryCallable updateNodeCallable() { + throw new UnsupportedOperationException("Not implemented: updateNodeCallable()"); + } + + public UnaryCallable + listQueuedResourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listQueuedResourcesPagedCallable()"); + } + + public UnaryCallable + listQueuedResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listQueuedResourcesCallable()"); + } + + public UnaryCallable getQueuedResourceCallable() { + throw new UnsupportedOperationException("Not implemented: getQueuedResourceCallable()"); + } + + public OperationCallable + createQueuedResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createQueuedResourceOperationCallable()"); + } + + public UnaryCallable createQueuedResourceCallable() { + throw new UnsupportedOperationException("Not implemented: createQueuedResourceCallable()"); + } + + public OperationCallable + deleteQueuedResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteQueuedResourceOperationCallable()"); + } + + public UnaryCallable deleteQueuedResourceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteQueuedResourceCallable()"); + } + + public UnaryCallable + generateServiceIdentityCallable() { + throw new UnsupportedOperationException("Not implemented: generateServiceIdentityCallable()"); + } + + public UnaryCallable + listAcceleratorTypesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAcceleratorTypesPagedCallable()"); + } + + public UnaryCallable + listAcceleratorTypesCallable() { + throw new UnsupportedOperationException("Not implemented: listAcceleratorTypesCallable()"); + } + + public UnaryCallable getAcceleratorTypeCallable() { + throw new UnsupportedOperationException("Not implemented: getAcceleratorTypeCallable()"); + } + + public UnaryCallable + listRuntimeVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRuntimeVersionsPagedCallable()"); + } + + public UnaryCallable + listRuntimeVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listRuntimeVersionsCallable()"); + } + + public UnaryCallable getRuntimeVersionCallable() { + throw new UnsupportedOperationException("Not implemented: getRuntimeVersionCallable()"); + } + + public UnaryCallable + getGuestAttributesCallable() { + throw new UnsupportedOperationException("Not implemented: getGuestAttributesCallable()"); + } + + public OperationCallable + simulateMaintenanceEventOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: simulateMaintenanceEventOperationCallable()"); + } + + public UnaryCallable + simulateMaintenanceEventCallable() { + throw new UnsupportedOperationException("Not implemented: simulateMaintenanceEventCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStubSettings.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStubSettings.java new file mode 100644 index 000000000000..af12c9f326a2 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/main/java/com/google/cloud/tpu/v2alpha1/stub/TpuStubSettings.java @@ -0,0 +1,1481 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.stub; + +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListQueuedResourcesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.AcceleratorType; +import com.google.cloud.tpu.v2alpha1.CreateNodeRequest; +import com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; +import com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest; +import com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse; +import com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest; +import com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest; +import com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse; +import com.google.cloud.tpu.v2alpha1.GetNodeRequest; +import com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest; +import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2alpha1.ListNodesRequest; +import com.google.cloud.tpu.v2alpha1.ListNodesResponse; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse; +import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.OperationMetadata; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.RuntimeVersion; +import com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest; +import com.google.cloud.tpu.v2alpha1.StartNodeRequest; +import com.google.cloud.tpu.v2alpha1.StopNodeRequest; +import com.google.cloud.tpu.v2alpha1.UpdateNodeRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TpuStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (tpu.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNode to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TpuStubSettings.Builder tpuSettingsBuilder = TpuStubSettings.newBuilder();
+ * tpuSettingsBuilder
+ *     .getNodeSettings()
+ *     .setRetrySettings(
+ *         tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TpuStubSettings tpuSettings = tpuSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class TpuStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings + listNodesSettings; + private final UnaryCallSettings getNodeSettings; + private final UnaryCallSettings createNodeSettings; + private final OperationCallSettings + createNodeOperationSettings; + private final UnaryCallSettings deleteNodeSettings; + private final OperationCallSettings + deleteNodeOperationSettings; + private final UnaryCallSettings stopNodeSettings; + private final OperationCallSettings + stopNodeOperationSettings; + private final UnaryCallSettings startNodeSettings; + private final OperationCallSettings + startNodeOperationSettings; + private final UnaryCallSettings updateNodeSettings; + private final OperationCallSettings + updateNodeOperationSettings; + private final PagedCallSettings< + ListQueuedResourcesRequest, ListQueuedResourcesResponse, ListQueuedResourcesPagedResponse> + listQueuedResourcesSettings; + private final UnaryCallSettings + getQueuedResourceSettings; + private final UnaryCallSettings + createQueuedResourceSettings; + private final OperationCallSettings< + CreateQueuedResourceRequest, QueuedResource, OperationMetadata> + createQueuedResourceOperationSettings; + private final UnaryCallSettings + deleteQueuedResourceSettings; + private final OperationCallSettings< + DeleteQueuedResourceRequest, QueuedResource, OperationMetadata> + deleteQueuedResourceOperationSettings; + private final UnaryCallSettings + generateServiceIdentitySettings; + private final PagedCallSettings< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse> + listAcceleratorTypesSettings; + private final UnaryCallSettings + getAcceleratorTypeSettings; + private final PagedCallSettings< + ListRuntimeVersionsRequest, ListRuntimeVersionsResponse, ListRuntimeVersionsPagedResponse> + listRuntimeVersionsSettings; + private final UnaryCallSettings + getRuntimeVersionSettings; + private final UnaryCallSettings + getGuestAttributesSettings; + private final UnaryCallSettings + simulateMaintenanceEventSettings; + private final OperationCallSettings + simulateMaintenanceEventOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_NODES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNodesRequest injectToken(ListNodesRequest payload, String token) { + return ListNodesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNodesRequest injectPageSize(ListNodesRequest payload, int pageSize) { + return ListNodesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNodesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNodesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNodesResponse payload) { + return payload.getNodesList() == null + ? ImmutableList.of() + : payload.getNodesList(); + } + }; + + private static final PagedListDescriptor< + ListQueuedResourcesRequest, ListQueuedResourcesResponse, QueuedResource> + LIST_QUEUED_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListQueuedResourcesRequest, ListQueuedResourcesResponse, QueuedResource>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListQueuedResourcesRequest injectToken( + ListQueuedResourcesRequest payload, String token) { + return ListQueuedResourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListQueuedResourcesRequest injectPageSize( + ListQueuedResourcesRequest payload, int pageSize) { + return ListQueuedResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListQueuedResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListQueuedResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListQueuedResourcesResponse payload) { + return payload.getQueuedResourcesList() == null + ? ImmutableList.of() + : payload.getQueuedResourcesList(); + } + }; + + private static final PagedListDescriptor< + ListAcceleratorTypesRequest, ListAcceleratorTypesResponse, AcceleratorType> + LIST_ACCELERATOR_TYPES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAcceleratorTypesRequest, ListAcceleratorTypesResponse, AcceleratorType>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAcceleratorTypesRequest injectToken( + ListAcceleratorTypesRequest payload, String token) { + return ListAcceleratorTypesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAcceleratorTypesRequest injectPageSize( + ListAcceleratorTypesRequest payload, int pageSize) { + return ListAcceleratorTypesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAcceleratorTypesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAcceleratorTypesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAcceleratorTypesResponse payload) { + return payload.getAcceleratorTypesList() == null + ? ImmutableList.of() + : payload.getAcceleratorTypesList(); + } + }; + + private static final PagedListDescriptor< + ListRuntimeVersionsRequest, ListRuntimeVersionsResponse, RuntimeVersion> + LIST_RUNTIME_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListRuntimeVersionsRequest, ListRuntimeVersionsResponse, RuntimeVersion>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRuntimeVersionsRequest injectToken( + ListRuntimeVersionsRequest payload, String token) { + return ListRuntimeVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRuntimeVersionsRequest injectPageSize( + ListRuntimeVersionsRequest payload, int pageSize) { + return ListRuntimeVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRuntimeVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRuntimeVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRuntimeVersionsResponse payload) { + return payload.getRuntimeVersionsList() == null + ? ImmutableList.of() + : payload.getRuntimeVersionsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListNodesRequest, ListNodesResponse, ListNodesPagedResponse> + LIST_NODES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNodesRequest, ListNodesResponse, ListNodesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNodesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NODES_PAGE_STR_DESC, request, context); + return ListNodesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListQueuedResourcesRequest, ListQueuedResourcesResponse, ListQueuedResourcesPagedResponse> + LIST_QUEUED_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListQueuedResourcesRequest, + ListQueuedResourcesResponse, + ListQueuedResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListQueuedResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_QUEUED_RESOURCES_PAGE_STR_DESC, request, context); + return ListQueuedResourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse> + LIST_ACCELERATOR_TYPES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAcceleratorTypesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAcceleratorTypesRequest, ListAcceleratorTypesResponse, AcceleratorType> + pageContext = + PageContext.create( + callable, LIST_ACCELERATOR_TYPES_PAGE_STR_DESC, request, context); + return ListAcceleratorTypesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRuntimeVersionsRequest, ListRuntimeVersionsResponse, ListRuntimeVersionsPagedResponse> + LIST_RUNTIME_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRuntimeVersionsRequest, + ListRuntimeVersionsResponse, + ListRuntimeVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRuntimeVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_RUNTIME_VERSIONS_PAGE_STR_DESC, request, context); + return ListRuntimeVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listNodes. */ + public PagedCallSettings + listNodesSettings() { + return listNodesSettings; + } + + /** Returns the object with the settings used for calls to getNode. */ + public UnaryCallSettings getNodeSettings() { + return getNodeSettings; + } + + /** Returns the object with the settings used for calls to createNode. */ + public UnaryCallSettings createNodeSettings() { + return createNodeSettings; + } + + /** Returns the object with the settings used for calls to createNode. */ + public OperationCallSettings + createNodeOperationSettings() { + return createNodeOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteNode. */ + public UnaryCallSettings deleteNodeSettings() { + return deleteNodeSettings; + } + + /** Returns the object with the settings used for calls to deleteNode. */ + public OperationCallSettings + deleteNodeOperationSettings() { + return deleteNodeOperationSettings; + } + + /** Returns the object with the settings used for calls to stopNode. */ + public UnaryCallSettings stopNodeSettings() { + return stopNodeSettings; + } + + /** Returns the object with the settings used for calls to stopNode. */ + public OperationCallSettings + stopNodeOperationSettings() { + return stopNodeOperationSettings; + } + + /** Returns the object with the settings used for calls to startNode. */ + public UnaryCallSettings startNodeSettings() { + return startNodeSettings; + } + + /** Returns the object with the settings used for calls to startNode. */ + public OperationCallSettings + startNodeOperationSettings() { + return startNodeOperationSettings; + } + + /** Returns the object with the settings used for calls to updateNode. */ + public UnaryCallSettings updateNodeSettings() { + return updateNodeSettings; + } + + /** Returns the object with the settings used for calls to updateNode. */ + public OperationCallSettings + updateNodeOperationSettings() { + return updateNodeOperationSettings; + } + + /** Returns the object with the settings used for calls to listQueuedResources. */ + public PagedCallSettings< + ListQueuedResourcesRequest, ListQueuedResourcesResponse, ListQueuedResourcesPagedResponse> + listQueuedResourcesSettings() { + return listQueuedResourcesSettings; + } + + /** Returns the object with the settings used for calls to getQueuedResource. */ + public UnaryCallSettings getQueuedResourceSettings() { + return getQueuedResourceSettings; + } + + /** Returns the object with the settings used for calls to createQueuedResource. */ + public UnaryCallSettings createQueuedResourceSettings() { + return createQueuedResourceSettings; + } + + /** Returns the object with the settings used for calls to createQueuedResource. */ + public OperationCallSettings + createQueuedResourceOperationSettings() { + return createQueuedResourceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteQueuedResource. */ + public UnaryCallSettings deleteQueuedResourceSettings() { + return deleteQueuedResourceSettings; + } + + /** Returns the object with the settings used for calls to deleteQueuedResource. */ + public OperationCallSettings + deleteQueuedResourceOperationSettings() { + return deleteQueuedResourceOperationSettings; + } + + /** Returns the object with the settings used for calls to generateServiceIdentity. */ + public UnaryCallSettings + generateServiceIdentitySettings() { + return generateServiceIdentitySettings; + } + + /** Returns the object with the settings used for calls to listAcceleratorTypes. */ + public PagedCallSettings< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse> + listAcceleratorTypesSettings() { + return listAcceleratorTypesSettings; + } + + /** Returns the object with the settings used for calls to getAcceleratorType. */ + public UnaryCallSettings + getAcceleratorTypeSettings() { + return getAcceleratorTypeSettings; + } + + /** Returns the object with the settings used for calls to listRuntimeVersions. */ + public PagedCallSettings< + ListRuntimeVersionsRequest, ListRuntimeVersionsResponse, ListRuntimeVersionsPagedResponse> + listRuntimeVersionsSettings() { + return listRuntimeVersionsSettings; + } + + /** Returns the object with the settings used for calls to getRuntimeVersion. */ + public UnaryCallSettings getRuntimeVersionSettings() { + return getRuntimeVersionSettings; + } + + /** Returns the object with the settings used for calls to getGuestAttributes. */ + public UnaryCallSettings + getGuestAttributesSettings() { + return getGuestAttributesSettings; + } + + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings + simulateMaintenanceEventSettings() { + return simulateMaintenanceEventSettings; + } + + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public OperationCallSettings + simulateMaintenanceEventOperationSettings() { + return simulateMaintenanceEventOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public TpuStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcTpuStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "tpu.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "tpu.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(TpuStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TpuStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listNodesSettings = settingsBuilder.listNodesSettings().build(); + getNodeSettings = settingsBuilder.getNodeSettings().build(); + createNodeSettings = settingsBuilder.createNodeSettings().build(); + createNodeOperationSettings = settingsBuilder.createNodeOperationSettings().build(); + deleteNodeSettings = settingsBuilder.deleteNodeSettings().build(); + deleteNodeOperationSettings = settingsBuilder.deleteNodeOperationSettings().build(); + stopNodeSettings = settingsBuilder.stopNodeSettings().build(); + stopNodeOperationSettings = settingsBuilder.stopNodeOperationSettings().build(); + startNodeSettings = settingsBuilder.startNodeSettings().build(); + startNodeOperationSettings = settingsBuilder.startNodeOperationSettings().build(); + updateNodeSettings = settingsBuilder.updateNodeSettings().build(); + updateNodeOperationSettings = settingsBuilder.updateNodeOperationSettings().build(); + listQueuedResourcesSettings = settingsBuilder.listQueuedResourcesSettings().build(); + getQueuedResourceSettings = settingsBuilder.getQueuedResourceSettings().build(); + createQueuedResourceSettings = settingsBuilder.createQueuedResourceSettings().build(); + createQueuedResourceOperationSettings = + settingsBuilder.createQueuedResourceOperationSettings().build(); + deleteQueuedResourceSettings = settingsBuilder.deleteQueuedResourceSettings().build(); + deleteQueuedResourceOperationSettings = + settingsBuilder.deleteQueuedResourceOperationSettings().build(); + generateServiceIdentitySettings = settingsBuilder.generateServiceIdentitySettings().build(); + listAcceleratorTypesSettings = settingsBuilder.listAcceleratorTypesSettings().build(); + getAcceleratorTypeSettings = settingsBuilder.getAcceleratorTypeSettings().build(); + listRuntimeVersionsSettings = settingsBuilder.listRuntimeVersionsSettings().build(); + getRuntimeVersionSettings = settingsBuilder.getRuntimeVersionSettings().build(); + getGuestAttributesSettings = settingsBuilder.getGuestAttributesSettings().build(); + simulateMaintenanceEventSettings = settingsBuilder.simulateMaintenanceEventSettings().build(); + simulateMaintenanceEventOperationSettings = + settingsBuilder.simulateMaintenanceEventOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for TpuStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListNodesRequest, ListNodesResponse, ListNodesPagedResponse> + listNodesSettings; + private final UnaryCallSettings.Builder getNodeSettings; + private final UnaryCallSettings.Builder createNodeSettings; + private final OperationCallSettings.Builder + createNodeOperationSettings; + private final UnaryCallSettings.Builder deleteNodeSettings; + private final OperationCallSettings.Builder + deleteNodeOperationSettings; + private final UnaryCallSettings.Builder stopNodeSettings; + private final OperationCallSettings.Builder + stopNodeOperationSettings; + private final UnaryCallSettings.Builder startNodeSettings; + private final OperationCallSettings.Builder + startNodeOperationSettings; + private final UnaryCallSettings.Builder updateNodeSettings; + private final OperationCallSettings.Builder + updateNodeOperationSettings; + private final PagedCallSettings.Builder< + ListQueuedResourcesRequest, + ListQueuedResourcesResponse, + ListQueuedResourcesPagedResponse> + listQueuedResourcesSettings; + private final UnaryCallSettings.Builder + getQueuedResourceSettings; + private final UnaryCallSettings.Builder + createQueuedResourceSettings; + private final OperationCallSettings.Builder< + CreateQueuedResourceRequest, QueuedResource, OperationMetadata> + createQueuedResourceOperationSettings; + private final UnaryCallSettings.Builder + deleteQueuedResourceSettings; + private final OperationCallSettings.Builder< + DeleteQueuedResourceRequest, QueuedResource, OperationMetadata> + deleteQueuedResourceOperationSettings; + private final UnaryCallSettings.Builder< + GenerateServiceIdentityRequest, GenerateServiceIdentityResponse> + generateServiceIdentitySettings; + private final PagedCallSettings.Builder< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse> + listAcceleratorTypesSettings; + private final UnaryCallSettings.Builder + getAcceleratorTypeSettings; + private final PagedCallSettings.Builder< + ListRuntimeVersionsRequest, + ListRuntimeVersionsResponse, + ListRuntimeVersionsPagedResponse> + listRuntimeVersionsSettings; + private final UnaryCallSettings.Builder + getRuntimeVersionSettings; + private final UnaryCallSettings.Builder + getGuestAttributesSettings; + private final UnaryCallSettings.Builder + simulateMaintenanceEventSettings; + private final OperationCallSettings.Builder< + SimulateMaintenanceEventRequest, Node, OperationMetadata> + simulateMaintenanceEventOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listNodesSettings = PagedCallSettings.newBuilder(LIST_NODES_PAGE_STR_FACT); + getNodeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNodeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNodeOperationSettings = OperationCallSettings.newBuilder(); + deleteNodeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNodeOperationSettings = OperationCallSettings.newBuilder(); + stopNodeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopNodeOperationSettings = OperationCallSettings.newBuilder(); + startNodeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startNodeOperationSettings = OperationCallSettings.newBuilder(); + updateNodeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateNodeOperationSettings = OperationCallSettings.newBuilder(); + listQueuedResourcesSettings = + PagedCallSettings.newBuilder(LIST_QUEUED_RESOURCES_PAGE_STR_FACT); + getQueuedResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createQueuedResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createQueuedResourceOperationSettings = OperationCallSettings.newBuilder(); + deleteQueuedResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteQueuedResourceOperationSettings = OperationCallSettings.newBuilder(); + generateServiceIdentitySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAcceleratorTypesSettings = + PagedCallSettings.newBuilder(LIST_ACCELERATOR_TYPES_PAGE_STR_FACT); + getAcceleratorTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRuntimeVersionsSettings = + PagedCallSettings.newBuilder(LIST_RUNTIME_VERSIONS_PAGE_STR_FACT); + getRuntimeVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getGuestAttributesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + simulateMaintenanceEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + simulateMaintenanceEventOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listNodesSettings, + getNodeSettings, + createNodeSettings, + deleteNodeSettings, + stopNodeSettings, + startNodeSettings, + updateNodeSettings, + listQueuedResourcesSettings, + getQueuedResourceSettings, + createQueuedResourceSettings, + deleteQueuedResourceSettings, + generateServiceIdentitySettings, + listAcceleratorTypesSettings, + getAcceleratorTypeSettings, + listRuntimeVersionsSettings, + getRuntimeVersionSettings, + getGuestAttributesSettings, + simulateMaintenanceEventSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(TpuStubSettings settings) { + super(settings); + + listNodesSettings = settings.listNodesSettings.toBuilder(); + getNodeSettings = settings.getNodeSettings.toBuilder(); + createNodeSettings = settings.createNodeSettings.toBuilder(); + createNodeOperationSettings = settings.createNodeOperationSettings.toBuilder(); + deleteNodeSettings = settings.deleteNodeSettings.toBuilder(); + deleteNodeOperationSettings = settings.deleteNodeOperationSettings.toBuilder(); + stopNodeSettings = settings.stopNodeSettings.toBuilder(); + stopNodeOperationSettings = settings.stopNodeOperationSettings.toBuilder(); + startNodeSettings = settings.startNodeSettings.toBuilder(); + startNodeOperationSettings = settings.startNodeOperationSettings.toBuilder(); + updateNodeSettings = settings.updateNodeSettings.toBuilder(); + updateNodeOperationSettings = settings.updateNodeOperationSettings.toBuilder(); + listQueuedResourcesSettings = settings.listQueuedResourcesSettings.toBuilder(); + getQueuedResourceSettings = settings.getQueuedResourceSettings.toBuilder(); + createQueuedResourceSettings = settings.createQueuedResourceSettings.toBuilder(); + createQueuedResourceOperationSettings = + settings.createQueuedResourceOperationSettings.toBuilder(); + deleteQueuedResourceSettings = settings.deleteQueuedResourceSettings.toBuilder(); + deleteQueuedResourceOperationSettings = + settings.deleteQueuedResourceOperationSettings.toBuilder(); + generateServiceIdentitySettings = settings.generateServiceIdentitySettings.toBuilder(); + listAcceleratorTypesSettings = settings.listAcceleratorTypesSettings.toBuilder(); + getAcceleratorTypeSettings = settings.getAcceleratorTypeSettings.toBuilder(); + listRuntimeVersionsSettings = settings.listRuntimeVersionsSettings.toBuilder(); + getRuntimeVersionSettings = settings.getRuntimeVersionSettings.toBuilder(); + getGuestAttributesSettings = settings.getGuestAttributesSettings.toBuilder(); + simulateMaintenanceEventSettings = settings.simulateMaintenanceEventSettings.toBuilder(); + simulateMaintenanceEventOperationSettings = + settings.simulateMaintenanceEventOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listNodesSettings, + getNodeSettings, + createNodeSettings, + deleteNodeSettings, + stopNodeSettings, + startNodeSettings, + updateNodeSettings, + listQueuedResourcesSettings, + getQueuedResourceSettings, + createQueuedResourceSettings, + deleteQueuedResourceSettings, + generateServiceIdentitySettings, + listAcceleratorTypesSettings, + getAcceleratorTypeSettings, + listRuntimeVersionsSettings, + getRuntimeVersionSettings, + getGuestAttributesSettings, + simulateMaintenanceEventSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listNodesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getNodeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createNodeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteNodeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .stopNodeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .startNodeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateNodeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listQueuedResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getQueuedResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createQueuedResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteQueuedResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .generateServiceIdentitySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listAcceleratorTypesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getAcceleratorTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listRuntimeVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getRuntimeVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getGuestAttributesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .simulateMaintenanceEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createNodeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Node.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteNodeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .stopNodeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Node.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .startNodeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Node.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateNodeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Node.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createQueuedResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(QueuedResource.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteQueuedResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(QueuedResource.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .simulateMaintenanceEventOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Node.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listNodes. */ + public PagedCallSettings.Builder + listNodesSettings() { + return listNodesSettings; + } + + /** Returns the builder for the settings used for calls to getNode. */ + public UnaryCallSettings.Builder getNodeSettings() { + return getNodeSettings; + } + + /** Returns the builder for the settings used for calls to createNode. */ + public UnaryCallSettings.Builder createNodeSettings() { + return createNodeSettings; + } + + /** Returns the builder for the settings used for calls to createNode. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createNodeOperationSettings() { + return createNodeOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteNode. */ + public UnaryCallSettings.Builder deleteNodeSettings() { + return deleteNodeSettings; + } + + /** Returns the builder for the settings used for calls to deleteNode. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteNodeOperationSettings() { + return deleteNodeOperationSettings; + } + + /** Returns the builder for the settings used for calls to stopNode. */ + public UnaryCallSettings.Builder stopNodeSettings() { + return stopNodeSettings; + } + + /** Returns the builder for the settings used for calls to stopNode. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + stopNodeOperationSettings() { + return stopNodeOperationSettings; + } + + /** Returns the builder for the settings used for calls to startNode. */ + public UnaryCallSettings.Builder startNodeSettings() { + return startNodeSettings; + } + + /** Returns the builder for the settings used for calls to startNode. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + startNodeOperationSettings() { + return startNodeOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateNode. */ + public UnaryCallSettings.Builder updateNodeSettings() { + return updateNodeSettings; + } + + /** Returns the builder for the settings used for calls to updateNode. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateNodeOperationSettings() { + return updateNodeOperationSettings; + } + + /** Returns the builder for the settings used for calls to listQueuedResources. */ + public PagedCallSettings.Builder< + ListQueuedResourcesRequest, + ListQueuedResourcesResponse, + ListQueuedResourcesPagedResponse> + listQueuedResourcesSettings() { + return listQueuedResourcesSettings; + } + + /** Returns the builder for the settings used for calls to getQueuedResource. */ + public UnaryCallSettings.Builder + getQueuedResourceSettings() { + return getQueuedResourceSettings; + } + + /** Returns the builder for the settings used for calls to createQueuedResource. */ + public UnaryCallSettings.Builder + createQueuedResourceSettings() { + return createQueuedResourceSettings; + } + + /** Returns the builder for the settings used for calls to createQueuedResource. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateQueuedResourceRequest, QueuedResource, OperationMetadata> + createQueuedResourceOperationSettings() { + return createQueuedResourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteQueuedResource. */ + public UnaryCallSettings.Builder + deleteQueuedResourceSettings() { + return deleteQueuedResourceSettings; + } + + /** Returns the builder for the settings used for calls to deleteQueuedResource. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteQueuedResourceRequest, QueuedResource, OperationMetadata> + deleteQueuedResourceOperationSettings() { + return deleteQueuedResourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to generateServiceIdentity. */ + public UnaryCallSettings.Builder< + GenerateServiceIdentityRequest, GenerateServiceIdentityResponse> + generateServiceIdentitySettings() { + return generateServiceIdentitySettings; + } + + /** Returns the builder for the settings used for calls to listAcceleratorTypes. */ + public PagedCallSettings.Builder< + ListAcceleratorTypesRequest, + ListAcceleratorTypesResponse, + ListAcceleratorTypesPagedResponse> + listAcceleratorTypesSettings() { + return listAcceleratorTypesSettings; + } + + /** Returns the builder for the settings used for calls to getAcceleratorType. */ + public UnaryCallSettings.Builder + getAcceleratorTypeSettings() { + return getAcceleratorTypeSettings; + } + + /** Returns the builder for the settings used for calls to listRuntimeVersions. */ + public PagedCallSettings.Builder< + ListRuntimeVersionsRequest, + ListRuntimeVersionsResponse, + ListRuntimeVersionsPagedResponse> + listRuntimeVersionsSettings() { + return listRuntimeVersionsSettings; + } + + /** Returns the builder for the settings used for calls to getRuntimeVersion. */ + public UnaryCallSettings.Builder + getRuntimeVersionSettings() { + return getRuntimeVersionSettings; + } + + /** Returns the builder for the settings used for calls to getGuestAttributes. */ + public UnaryCallSettings.Builder + getGuestAttributesSettings() { + return getGuestAttributesSettings; + } + + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings.Builder + simulateMaintenanceEventSettings() { + return simulateMaintenanceEventSettings; + } + + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + simulateMaintenanceEventOperationSettings() { + return simulateMaintenanceEventOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public TpuStubSettings build() throws IOException { + return new TpuStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocations.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocations.java new file mode 100644 index 000000000000..4ca0f78d1280 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocationsImpl.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocationsImpl.java new file mode 100644 index 000000000000..c0dddb930098 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpu.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpu.java similarity index 100% rename from java-tpu/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpu.java rename to owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpu.java diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpuImpl.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpuImpl.java new file mode 100644 index 000000000000..110a7e2439ce --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/MockTpuImpl.java @@ -0,0 +1,438 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1; + +import com.google.api.core.BetaApi; +import com.google.cloud.tpu.v2alpha1.TpuGrpc.TpuImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTpuImpl extends TpuImplBase { + private List requests; + private Queue responses; + + public MockTpuImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listNodes( + ListNodesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNodesResponse) { + requests.add(request); + responseObserver.onNext(((ListNodesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNodes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNodesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNode(GetNodeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Node) { + requests.add(request); + responseObserver.onNext(((Node) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNode, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Node.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createNode(CreateNodeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateNode, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNode(DeleteNodeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteNode, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void stopNode(StopNodeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StopNode, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void startNode(StartNodeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartNode, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateNode(UpdateNodeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateNode, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listQueuedResources( + ListQueuedResourcesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListQueuedResourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListQueuedResourcesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListQueuedResources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListQueuedResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getQueuedResource( + GetQueuedResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof QueuedResource) { + requests.add(request); + responseObserver.onNext(((QueuedResource) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetQueuedResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + QueuedResource.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createQueuedResource( + CreateQueuedResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateQueuedResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteQueuedResource( + DeleteQueuedResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteQueuedResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateServiceIdentity( + GenerateServiceIdentityRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerateServiceIdentityResponse) { + requests.add(request); + responseObserver.onNext(((GenerateServiceIdentityResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GenerateServiceIdentity, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerateServiceIdentityResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAcceleratorTypes( + ListAcceleratorTypesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAcceleratorTypesResponse) { + requests.add(request); + responseObserver.onNext(((ListAcceleratorTypesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAcceleratorTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAcceleratorTypesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAcceleratorType( + GetAcceleratorTypeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AcceleratorType) { + requests.add(request); + responseObserver.onNext(((AcceleratorType) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAcceleratorType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AcceleratorType.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRuntimeVersions( + ListRuntimeVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRuntimeVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListRuntimeVersionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRuntimeVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRuntimeVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRuntimeVersion( + GetRuntimeVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RuntimeVersion) { + requests.add(request); + responseObserver.onNext(((RuntimeVersion) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetRuntimeVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RuntimeVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getGuestAttributes( + GetGuestAttributesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GetGuestAttributesResponse) { + requests.add(request); + responseObserver.onNext(((GetGuestAttributesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetGuestAttributes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GetGuestAttributesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void simulateMaintenanceEvent( + SimulateMaintenanceEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SimulateMaintenanceEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/TpuClientTest.java b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/TpuClientTest.java new file mode 100644 index 000000000000..6a7b8f8dbc50 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/google-cloud-tpu/src/test/java/com/google/cloud/tpu/v2alpha1/TpuClientTest.java @@ -0,0 +1,1727 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1; + +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListAcceleratorTypesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListLocationsPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListNodesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListQueuedResourcesPagedResponse; +import static com.google.cloud.tpu.v2alpha1.TpuClient.ListRuntimeVersionsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TpuClientTest { + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockTpu mockTpu; + private LocalChannelProvider channelProvider; + private TpuClient client; + + @BeforeClass + public static void startStaticServer() { + mockTpu = new MockTpu(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockTpu, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + TpuSettings settings = + TpuSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TpuClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listNodesTest() throws Exception { + Node responsesElement = Node.newBuilder().build(); + ListNodesResponse expectedResponse = + ListNodesResponse.newBuilder() + .setNextPageToken("") + .addAllNodes(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNodesPagedResponse pagedListResponse = client.listNodes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNodesList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNodesRequest actualRequest = ((ListNodesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNodesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNodes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNodesTest2() throws Exception { + Node responsesElement = Node.newBuilder().build(); + ListNodesResponse expectedResponse = + ListNodesResponse.newBuilder() + .setNextPageToken("") + .addAllNodes(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNodesPagedResponse pagedListResponse = client.listNodes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNodesList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNodesRequest actualRequest = ((ListNodesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNodesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNodes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + mockTpu.addResponse(expectedResponse); + + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + + Node actualResponse = client.getNode(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNodeRequest actualRequest = ((GetNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNodeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + client.getNode(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNodeTest2() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + mockTpu.addResponse(expectedResponse); + + String name = "name3373707"; + + Node actualResponse = client.getNode(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNodeRequest actualRequest = ((GetNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNodeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String name = "name3373707"; + client.getNode(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + + Node actualResponse = client.createNodeAsync(parent, node, nodeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNodeRequest actualRequest = ((CreateNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(node, actualRequest.getNode()); + Assert.assertEquals(nodeId, actualRequest.getNodeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNodeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + client.createNodeAsync(parent, node, nodeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createNodeTest2() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + String parent = "parent-995424086"; + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + + Node actualResponse = client.createNodeAsync(parent, node, nodeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNodeRequest actualRequest = ((CreateNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(node, actualRequest.getNode()); + Assert.assertEquals(nodeId, actualRequest.getNodeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNodeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String parent = "parent-995424086"; + Node node = Node.newBuilder().build(); + String nodeId = "nodeId-1040171331"; + client.createNodeAsync(parent, node, nodeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteNodeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + + client.deleteNodeAsync(name).get(); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNodeRequest actualRequest = ((DeleteNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNodeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + client.deleteNodeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteNodeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNodeAsync(name).get(); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNodeRequest actualRequest = ((DeleteNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNodeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String name = "name3373707"; + client.deleteNodeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void stopNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + + Node actualResponse = client.stopNodeAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopNodeRequest actualRequest = ((StopNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopNodeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + client.stopNodeAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + + Node actualResponse = client.startNodeAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartNodeRequest actualRequest = ((StartNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startNodeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); + client.startNodeAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateNodeTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateNodeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + Node node = Node.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Node actualResponse = client.updateNodeAsync(node, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateNodeRequest actualRequest = ((UpdateNodeRequest) actualRequests.get(0)); + + Assert.assertEquals(node, actualRequest.getNode()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateNodeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + Node node = Node.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateNodeAsync(node, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listQueuedResourcesTest() throws Exception { + QueuedResource responsesElement = QueuedResource.newBuilder().build(); + ListQueuedResourcesResponse expectedResponse = + ListQueuedResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllQueuedResources(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListQueuedResourcesPagedResponse pagedListResponse = client.listQueuedResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getQueuedResourcesList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListQueuedResourcesRequest actualRequest = ((ListQueuedResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listQueuedResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listQueuedResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listQueuedResourcesTest2() throws Exception { + QueuedResource responsesElement = QueuedResource.newBuilder().build(); + ListQueuedResourcesResponse expectedResponse = + ListQueuedResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllQueuedResources(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListQueuedResourcesPagedResponse pagedListResponse = client.listQueuedResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getQueuedResourcesList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListQueuedResourcesRequest actualRequest = ((ListQueuedResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listQueuedResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String parent = "parent-995424086"; + client.listQueuedResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getQueuedResourceTest() throws Exception { + QueuedResource expectedResponse = + QueuedResource.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setQueueingPolicy(QueuedResource.QueueingPolicy.newBuilder().build()) + .setState(QueuedResourceState.newBuilder().build()) + .build(); + mockTpu.addResponse(expectedResponse); + + QueuedResourceName name = QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]"); + + QueuedResource actualResponse = client.getQueuedResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetQueuedResourceRequest actualRequest = ((GetQueuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getQueuedResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + QueuedResourceName name = + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]"); + client.getQueuedResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getQueuedResourceTest2() throws Exception { + QueuedResource expectedResponse = + QueuedResource.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setQueueingPolicy(QueuedResource.QueueingPolicy.newBuilder().build()) + .setState(QueuedResourceState.newBuilder().build()) + .build(); + mockTpu.addResponse(expectedResponse); + + String name = "name3373707"; + + QueuedResource actualResponse = client.getQueuedResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetQueuedResourceRequest actualRequest = ((GetQueuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getQueuedResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String name = "name3373707"; + client.getQueuedResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createQueuedResourceTest() throws Exception { + QueuedResource expectedResponse = + QueuedResource.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setQueueingPolicy(QueuedResource.QueueingPolicy.newBuilder().build()) + .setState(QueuedResourceState.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createQueuedResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + QueuedResource queuedResource = QueuedResource.newBuilder().build(); + String queuedResourceId = "queuedResourceId437646236"; + + QueuedResource actualResponse = + client.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateQueuedResourceRequest actualRequest = + ((CreateQueuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(queuedResource, actualRequest.getQueuedResource()); + Assert.assertEquals(queuedResourceId, actualRequest.getQueuedResourceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createQueuedResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + QueuedResource queuedResource = QueuedResource.newBuilder().build(); + String queuedResourceId = "queuedResourceId437646236"; + client.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createQueuedResourceTest2() throws Exception { + QueuedResource expectedResponse = + QueuedResource.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setQueueingPolicy(QueuedResource.QueueingPolicy.newBuilder().build()) + .setState(QueuedResourceState.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createQueuedResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + String parent = "parent-995424086"; + QueuedResource queuedResource = QueuedResource.newBuilder().build(); + String queuedResourceId = "queuedResourceId437646236"; + + QueuedResource actualResponse = + client.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateQueuedResourceRequest actualRequest = + ((CreateQueuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(queuedResource, actualRequest.getQueuedResource()); + Assert.assertEquals(queuedResourceId, actualRequest.getQueuedResourceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createQueuedResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String parent = "parent-995424086"; + QueuedResource queuedResource = QueuedResource.newBuilder().build(); + String queuedResourceId = "queuedResourceId437646236"; + client.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteQueuedResourceTest() throws Exception { + QueuedResource expectedResponse = + QueuedResource.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setQueueingPolicy(QueuedResource.QueueingPolicy.newBuilder().build()) + .setState(QueuedResourceState.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteQueuedResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + QueuedResourceName name = QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]"); + + QueuedResource actualResponse = client.deleteQueuedResourceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteQueuedResourceRequest actualRequest = + ((DeleteQueuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteQueuedResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + QueuedResourceName name = + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]"); + client.deleteQueuedResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteQueuedResourceTest2() throws Exception { + QueuedResource expectedResponse = + QueuedResource.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setQueueingPolicy(QueuedResource.QueueingPolicy.newBuilder().build()) + .setState(QueuedResourceState.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteQueuedResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + String name = "name3373707"; + + QueuedResource actualResponse = client.deleteQueuedResourceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteQueuedResourceRequest actualRequest = + ((DeleteQueuedResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteQueuedResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String name = "name3373707"; + client.deleteQueuedResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void generateServiceIdentityTest() throws Exception { + GenerateServiceIdentityResponse expectedResponse = + GenerateServiceIdentityResponse.newBuilder() + .setIdentity(ServiceIdentity.newBuilder().build()) + .build(); + mockTpu.addResponse(expectedResponse); + + GenerateServiceIdentityRequest request = + GenerateServiceIdentityRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + + GenerateServiceIdentityResponse actualResponse = client.generateServiceIdentity(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateServiceIdentityRequest actualRequest = + ((GenerateServiceIdentityRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateServiceIdentityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + GenerateServiceIdentityRequest request = + GenerateServiceIdentityRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + client.generateServiceIdentity(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAcceleratorTypesTest() throws Exception { + AcceleratorType responsesElement = AcceleratorType.newBuilder().build(); + ListAcceleratorTypesResponse expectedResponse = + ListAcceleratorTypesResponse.newBuilder() + .setNextPageToken("") + .addAllAcceleratorTypes(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAcceleratorTypesPagedResponse pagedListResponse = client.listAcceleratorTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAcceleratorTypesList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAcceleratorTypesRequest actualRequest = + ((ListAcceleratorTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAcceleratorTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAcceleratorTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAcceleratorTypesTest2() throws Exception { + AcceleratorType responsesElement = AcceleratorType.newBuilder().build(); + ListAcceleratorTypesResponse expectedResponse = + ListAcceleratorTypesResponse.newBuilder() + .setNextPageToken("") + .addAllAcceleratorTypes(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAcceleratorTypesPagedResponse pagedListResponse = client.listAcceleratorTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAcceleratorTypesList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAcceleratorTypesRequest actualRequest = + ((ListAcceleratorTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAcceleratorTypesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAcceleratorTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAcceleratorTypeTest() throws Exception { + AcceleratorType expectedResponse = + AcceleratorType.newBuilder() + .setName( + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString()) + .setType("type3575610") + .build(); + mockTpu.addResponse(expectedResponse); + + AcceleratorTypeName name = + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + + AcceleratorType actualResponse = client.getAcceleratorType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAcceleratorTypeRequest actualRequest = ((GetAcceleratorTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAcceleratorTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + AcceleratorTypeName name = + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + client.getAcceleratorType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAcceleratorTypeTest2() throws Exception { + AcceleratorType expectedResponse = + AcceleratorType.newBuilder() + .setName( + AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString()) + .setType("type3575610") + .build(); + mockTpu.addResponse(expectedResponse); + + String name = "name3373707"; + + AcceleratorType actualResponse = client.getAcceleratorType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAcceleratorTypeRequest actualRequest = ((GetAcceleratorTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAcceleratorTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String name = "name3373707"; + client.getAcceleratorType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRuntimeVersionsTest() throws Exception { + RuntimeVersion responsesElement = RuntimeVersion.newBuilder().build(); + ListRuntimeVersionsResponse expectedResponse = + ListRuntimeVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllRuntimeVersions(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRuntimeVersionsPagedResponse pagedListResponse = client.listRuntimeVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuntimeVersionsList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRuntimeVersionsRequest actualRequest = ((ListRuntimeVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRuntimeVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRuntimeVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRuntimeVersionsTest2() throws Exception { + RuntimeVersion responsesElement = RuntimeVersion.newBuilder().build(); + ListRuntimeVersionsResponse expectedResponse = + ListRuntimeVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllRuntimeVersions(Arrays.asList(responsesElement)) + .build(); + mockTpu.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRuntimeVersionsPagedResponse pagedListResponse = client.listRuntimeVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuntimeVersionsList().get(0), resources.get(0)); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRuntimeVersionsRequest actualRequest = ((ListRuntimeVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRuntimeVersionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRuntimeVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRuntimeVersionTest() throws Exception { + RuntimeVersion expectedResponse = + RuntimeVersion.newBuilder() + .setName( + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .setVersion("version351608024") + .build(); + mockTpu.addResponse(expectedResponse); + + RuntimeVersionName name = RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + + RuntimeVersion actualResponse = client.getRuntimeVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRuntimeVersionRequest actualRequest = ((GetRuntimeVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRuntimeVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + RuntimeVersionName name = + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + client.getRuntimeVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRuntimeVersionTest2() throws Exception { + RuntimeVersion expectedResponse = + RuntimeVersion.newBuilder() + .setName( + RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .setVersion("version351608024") + .build(); + mockTpu.addResponse(expectedResponse); + + String name = "name3373707"; + + RuntimeVersion actualResponse = client.getRuntimeVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRuntimeVersionRequest actualRequest = ((GetRuntimeVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRuntimeVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + String name = "name3373707"; + client.getRuntimeVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGuestAttributesTest() throws Exception { + GetGuestAttributesResponse expectedResponse = + GetGuestAttributesResponse.newBuilder() + .addAllGuestAttributes(new ArrayList()) + .build(); + mockTpu.addResponse(expectedResponse); + + GetGuestAttributesRequest request = + GetGuestAttributesRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setQueryPath("queryPath-1807004403") + .addAllWorkerIds(new ArrayList()) + .build(); + + GetGuestAttributesResponse actualResponse = client.getGuestAttributes(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGuestAttributesRequest actualRequest = ((GetGuestAttributesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getQueryPath(), actualRequest.getQueryPath()); + Assert.assertEquals(request.getWorkerIdsList(), actualRequest.getWorkerIdsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGuestAttributesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + GetGuestAttributesRequest request = + GetGuestAttributesRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setQueryPath("queryPath-1807004403") + .addAllWorkerIds(new ArrayList()) + .build(); + client.getGuestAttributes(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void simulateMaintenanceEventTest() throws Exception { + Node expectedResponse = + Node.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setDescription("description-1724546052") + .setAcceleratorType("acceleratorType-82462651") + .setHealthDescription("healthDescription1231837184") + .setRuntimeVersion("runtimeVersion602071520") + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setCidrBlock("cidrBlock1646183801") + .setServiceAccount(ServiceAccount.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSchedulingConfig(SchedulingConfig.newBuilder().build()) + .addAllNetworkEndpoints(new ArrayList()) + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .setId(3355) + .addAllDataDisks(new ArrayList()) + .addAllSymptoms(new ArrayList()) + .setQueuedResource("queuedResource94310049") + .setShieldedInstanceConfig(ShieldedInstanceConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("simulateMaintenanceEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTpu.addResponse(resultOperation); + + SimulateMaintenanceEventRequest request = + SimulateMaintenanceEventRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .addAllWorkerIds(new ArrayList()) + .build(); + + Node actualResponse = client.simulateMaintenanceEventAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTpu.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SimulateMaintenanceEventRequest actualRequest = + ((SimulateMaintenanceEventRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getWorkerIdsList(), actualRequest.getWorkerIdsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void simulateMaintenanceEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTpu.addException(exception); + + try { + SimulateMaintenanceEventRequest request = + SimulateMaintenanceEventRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .addAllWorkerIds(new ArrayList()) + .build(); + client.simulateMaintenanceEventAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java b/owl-bot-staging/java-tpu/v2alpha1/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java new file mode 100644 index 000000000000..c81fdb7524bd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/grpc-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/TpuGrpc.java @@ -0,0 +1,1770 @@ +package com.google.cloud.tpu.v2alpha1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Manages TPU nodes and other resources
+ * TPU API v2alpha1
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/tpu/v2alpha1/cloud_tpu.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class TpuGrpc { + + private TpuGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.tpu.v2alpha1.Tpu"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListNodesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNodes", + requestType = com.google.cloud.tpu.v2alpha1.ListNodesRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.ListNodesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNodesMethod() { + io.grpc.MethodDescriptor getListNodesMethod; + if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListNodesMethod = TpuGrpc.getListNodesMethod) == null) { + TpuGrpc.getListNodesMethod = getListNodesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNodes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListNodesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListNodesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListNodes")) + .build(); + } + } + } + return getListNodesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNode", + requestType = com.google.cloud.tpu.v2alpha1.GetNodeRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.Node.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNodeMethod() { + io.grpc.MethodDescriptor getGetNodeMethod; + if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetNodeMethod = TpuGrpc.getGetNodeMethod) == null) { + TpuGrpc.getGetNodeMethod = getGetNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GetNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetNode")) + .build(); + } + } + } + return getGetNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNode", + requestType = com.google.cloud.tpu.v2alpha1.CreateNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateNodeMethod() { + io.grpc.MethodDescriptor getCreateNodeMethod; + if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getCreateNodeMethod = TpuGrpc.getCreateNodeMethod) == null) { + TpuGrpc.getCreateNodeMethod = getCreateNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.CreateNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("CreateNode")) + .build(); + } + } + } + return getCreateNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNode", + requestType = com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteNodeMethod() { + io.grpc.MethodDescriptor getDeleteNodeMethod; + if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getDeleteNodeMethod = TpuGrpc.getDeleteNodeMethod) == null) { + TpuGrpc.getDeleteNodeMethod = getDeleteNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("DeleteNode")) + .build(); + } + } + } + return getDeleteNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getStopNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopNode", + requestType = com.google.cloud.tpu.v2alpha1.StopNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getStopNodeMethod() { + io.grpc.MethodDescriptor getStopNodeMethod; + if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getStopNodeMethod = TpuGrpc.getStopNodeMethod) == null) { + TpuGrpc.getStopNodeMethod = getStopNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.StopNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StopNode")) + .build(); + } + } + } + return getStopNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getStartNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartNode", + requestType = com.google.cloud.tpu.v2alpha1.StartNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getStartNodeMethod() { + io.grpc.MethodDescriptor getStartNodeMethod; + if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getStartNodeMethod = TpuGrpc.getStartNodeMethod) == null) { + TpuGrpc.getStartNodeMethod = getStartNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.StartNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("StartNode")) + .build(); + } + } + } + return getStartNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateNodeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateNode", + requestType = com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateNodeMethod() { + io.grpc.MethodDescriptor getUpdateNodeMethod; + if ((getUpdateNodeMethod = TpuGrpc.getUpdateNodeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getUpdateNodeMethod = TpuGrpc.getUpdateNodeMethod) == null) { + TpuGrpc.getUpdateNodeMethod = getUpdateNodeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNode")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("UpdateNode")) + .build(); + } + } + } + return getUpdateNodeMethod; + } + + private static volatile io.grpc.MethodDescriptor getListQueuedResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListQueuedResources", + requestType = com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListQueuedResourcesMethod() { + io.grpc.MethodDescriptor getListQueuedResourcesMethod; + if ((getListQueuedResourcesMethod = TpuGrpc.getListQueuedResourcesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListQueuedResourcesMethod = TpuGrpc.getListQueuedResourcesMethod) == null) { + TpuGrpc.getListQueuedResourcesMethod = getListQueuedResourcesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListQueuedResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListQueuedResources")) + .build(); + } + } + } + return getListQueuedResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetQueuedResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetQueuedResource", + requestType = com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.QueuedResource.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetQueuedResourceMethod() { + io.grpc.MethodDescriptor getGetQueuedResourceMethod; + if ((getGetQueuedResourceMethod = TpuGrpc.getGetQueuedResourceMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetQueuedResourceMethod = TpuGrpc.getGetQueuedResourceMethod) == null) { + TpuGrpc.getGetQueuedResourceMethod = getGetQueuedResourceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetQueuedResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetQueuedResource")) + .build(); + } + } + } + return getGetQueuedResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateQueuedResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateQueuedResource", + requestType = com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateQueuedResourceMethod() { + io.grpc.MethodDescriptor getCreateQueuedResourceMethod; + if ((getCreateQueuedResourceMethod = TpuGrpc.getCreateQueuedResourceMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getCreateQueuedResourceMethod = TpuGrpc.getCreateQueuedResourceMethod) == null) { + TpuGrpc.getCreateQueuedResourceMethod = getCreateQueuedResourceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateQueuedResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("CreateQueuedResource")) + .build(); + } + } + } + return getCreateQueuedResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteQueuedResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteQueuedResource", + requestType = com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteQueuedResourceMethod() { + io.grpc.MethodDescriptor getDeleteQueuedResourceMethod; + if ((getDeleteQueuedResourceMethod = TpuGrpc.getDeleteQueuedResourceMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getDeleteQueuedResourceMethod = TpuGrpc.getDeleteQueuedResourceMethod) == null) { + TpuGrpc.getDeleteQueuedResourceMethod = getDeleteQueuedResourceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteQueuedResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("DeleteQueuedResource")) + .build(); + } + } + } + return getDeleteQueuedResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor getGenerateServiceIdentityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateServiceIdentity", + requestType = com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGenerateServiceIdentityMethod() { + io.grpc.MethodDescriptor getGenerateServiceIdentityMethod; + if ((getGenerateServiceIdentityMethod = TpuGrpc.getGenerateServiceIdentityMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGenerateServiceIdentityMethod = TpuGrpc.getGenerateServiceIdentityMethod) == null) { + TpuGrpc.getGenerateServiceIdentityMethod = getGenerateServiceIdentityMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateServiceIdentity")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GenerateServiceIdentity")) + .build(); + } + } + } + return getGenerateServiceIdentityMethod; + } + + private static volatile io.grpc.MethodDescriptor getListAcceleratorTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAcceleratorTypes", + requestType = com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListAcceleratorTypesMethod() { + io.grpc.MethodDescriptor getListAcceleratorTypesMethod; + if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListAcceleratorTypesMethod = TpuGrpc.getListAcceleratorTypesMethod) == null) { + TpuGrpc.getListAcceleratorTypesMethod = getListAcceleratorTypesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAcceleratorTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListAcceleratorTypes")) + .build(); + } + } + } + return getListAcceleratorTypesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAcceleratorTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAcceleratorType", + requestType = com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.AcceleratorType.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAcceleratorTypeMethod() { + io.grpc.MethodDescriptor getGetAcceleratorTypeMethod; + if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetAcceleratorTypeMethod = TpuGrpc.getGetAcceleratorTypeMethod) == null) { + TpuGrpc.getGetAcceleratorTypeMethod = getGetAcceleratorTypeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAcceleratorType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.AcceleratorType.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetAcceleratorType")) + .build(); + } + } + } + return getGetAcceleratorTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor getListRuntimeVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRuntimeVersions", + requestType = com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListRuntimeVersionsMethod() { + io.grpc.MethodDescriptor getListRuntimeVersionsMethod; + if ((getListRuntimeVersionsMethod = TpuGrpc.getListRuntimeVersionsMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getListRuntimeVersionsMethod = TpuGrpc.getListRuntimeVersionsMethod) == null) { + TpuGrpc.getListRuntimeVersionsMethod = getListRuntimeVersionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRuntimeVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("ListRuntimeVersions")) + .build(); + } + } + } + return getListRuntimeVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetRuntimeVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRuntimeVersion", + requestType = com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.RuntimeVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRuntimeVersionMethod() { + io.grpc.MethodDescriptor getGetRuntimeVersionMethod; + if ((getGetRuntimeVersionMethod = TpuGrpc.getGetRuntimeVersionMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetRuntimeVersionMethod = TpuGrpc.getGetRuntimeVersionMethod) == null) { + TpuGrpc.getGetRuntimeVersionMethod = getGetRuntimeVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRuntimeVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.RuntimeVersion.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetRuntimeVersion")) + .build(); + } + } + } + return getGetRuntimeVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetGuestAttributesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGuestAttributes", + requestType = com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.class, + responseType = com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetGuestAttributesMethod() { + io.grpc.MethodDescriptor getGetGuestAttributesMethod; + if ((getGetGuestAttributesMethod = TpuGrpc.getGetGuestAttributesMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getGetGuestAttributesMethod = TpuGrpc.getGetGuestAttributesMethod) == null) { + TpuGrpc.getGetGuestAttributesMethod = getGetGuestAttributesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGuestAttributes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("GetGuestAttributes")) + .build(); + } + } + } + return getGetGuestAttributesMethod; + } + + private static volatile io.grpc.MethodDescriptor getSimulateMaintenanceEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SimulateMaintenanceEvent", + requestType = com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSimulateMaintenanceEventMethod() { + io.grpc.MethodDescriptor getSimulateMaintenanceEventMethod; + if ((getSimulateMaintenanceEventMethod = TpuGrpc.getSimulateMaintenanceEventMethod) == null) { + synchronized (TpuGrpc.class) { + if ((getSimulateMaintenanceEventMethod = TpuGrpc.getSimulateMaintenanceEventMethod) == null) { + TpuGrpc.getSimulateMaintenanceEventMethod = getSimulateMaintenanceEventMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SimulateMaintenanceEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TpuMethodDescriptorSupplier("SimulateMaintenanceEvent")) + .build(); + } + } + } + return getSimulateMaintenanceEventMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static TpuStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuStub(channel, callOptions); + } + }; + return TpuStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TpuBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuBlockingStub(channel, callOptions); + } + }; + return TpuBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static TpuFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TpuFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuFutureStub(channel, callOptions); + } + }; + return TpuFutureStub.newStub(factory, channel); + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2alpha1
+   * 
+ */ + public static abstract class TpuImplBase implements io.grpc.BindableService { + + /** + *
+     * Lists nodes.
+     * 
+ */ + public void listNodes(com.google.cloud.tpu.v2alpha1.ListNodesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public void getNode(com.google.cloud.tpu.v2alpha1.GetNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public void createNode(com.google.cloud.tpu.v2alpha1.CreateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public void deleteNode(com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public void stopNode(com.google.cloud.tpu.v2alpha1.StopNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public void startNode(com.google.cloud.tpu.v2alpha1.StartNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public void updateNode(com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver); + } + + /** + *
+     * Lists queued resources.
+     * 
+ */ + public void listQueuedResources(com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListQueuedResourcesMethod(), responseObserver); + } + + /** + *
+     * Gets details of a queued resource.
+     * 
+ */ + public void getQueuedResource(com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetQueuedResourceMethod(), responseObserver); + } + + /** + *
+     * Creates a QueuedResource TPU instance.
+     * 
+ */ + public void createQueuedResource(com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateQueuedResourceMethod(), responseObserver); + } + + /** + *
+     * Deletes a QueuedResource TPU instance.
+     * 
+ */ + public void deleteQueuedResource(com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteQueuedResourceMethod(), responseObserver); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public void generateServiceIdentity(com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGenerateServiceIdentityMethod(), responseObserver); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public void listAcceleratorTypes(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAcceleratorTypesMethod(), responseObserver); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public void getAcceleratorType(com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAcceleratorTypeMethod(), responseObserver); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public void listRuntimeVersions(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListRuntimeVersionsMethod(), responseObserver); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public void getRuntimeVersion(com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRuntimeVersionMethod(), responseObserver); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public void getGuestAttributes(com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGuestAttributesMethod(), responseObserver); + } + + /** + *
+     * Simulates a maintenance event.
+     * 
+ */ + public void simulateMaintenanceEvent(com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSimulateMaintenanceEventMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListNodesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.ListNodesRequest, + com.google.cloud.tpu.v2alpha1.ListNodesResponse>( + this, METHODID_LIST_NODES))) + .addMethod( + getGetNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.GetNodeRequest, + com.google.cloud.tpu.v2alpha1.Node>( + this, METHODID_GET_NODE))) + .addMethod( + getCreateNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.CreateNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_NODE))) + .addMethod( + getDeleteNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.DeleteNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_NODE))) + .addMethod( + getStopNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.StopNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_STOP_NODE))) + .addMethod( + getStartNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.StartNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_START_NODE))) + .addMethod( + getUpdateNodeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.UpdateNodeRequest, + com.google.longrunning.Operation>( + this, METHODID_UPDATE_NODE))) + .addMethod( + getListQueuedResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest, + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse>( + this, METHODID_LIST_QUEUED_RESOURCES))) + .addMethod( + getGetQueuedResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest, + com.google.cloud.tpu.v2alpha1.QueuedResource>( + this, METHODID_GET_QUEUED_RESOURCE))) + .addMethod( + getCreateQueuedResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_QUEUED_RESOURCE))) + .addMethod( + getDeleteQueuedResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_QUEUED_RESOURCE))) + .addMethod( + getGenerateServiceIdentityMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest, + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>( + this, METHODID_GENERATE_SERVICE_IDENTITY))) + .addMethod( + getListAcceleratorTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest, + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>( + this, METHODID_LIST_ACCELERATOR_TYPES))) + .addMethod( + getGetAcceleratorTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest, + com.google.cloud.tpu.v2alpha1.AcceleratorType>( + this, METHODID_GET_ACCELERATOR_TYPE))) + .addMethod( + getListRuntimeVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest, + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>( + this, METHODID_LIST_RUNTIME_VERSIONS))) + .addMethod( + getGetRuntimeVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest, + com.google.cloud.tpu.v2alpha1.RuntimeVersion>( + this, METHODID_GET_RUNTIME_VERSION))) + .addMethod( + getGetGuestAttributesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest, + com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>( + this, METHODID_GET_GUEST_ATTRIBUTES))) + .addMethod( + getSimulateMaintenanceEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest, + com.google.longrunning.Operation>( + this, METHODID_SIMULATE_MAINTENANCE_EVENT))) + .build(); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2alpha1
+   * 
+ */ + public static final class TpuStub extends io.grpc.stub.AbstractAsyncStub { + private TpuStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public void listNodes(com.google.cloud.tpu.v2alpha1.ListNodesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNodesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public void getNode(com.google.cloud.tpu.v2alpha1.GetNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public void createNode(com.google.cloud.tpu.v2alpha1.CreateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public void deleteNode(com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public void stopNode(com.google.cloud.tpu.v2alpha1.StopNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public void startNode(com.google.cloud.tpu.v2alpha1.StartNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public void updateNode(com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateNodeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists queued resources.
+     * 
+ */ + public void listQueuedResources(com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListQueuedResourcesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a queued resource.
+     * 
+ */ + public void getQueuedResource(com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetQueuedResourceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a QueuedResource TPU instance.
+     * 
+ */ + public void createQueuedResource(com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateQueuedResourceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a QueuedResource TPU instance.
+     * 
+ */ + public void deleteQueuedResource(com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteQueuedResourceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public void generateServiceIdentity(com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateServiceIdentityMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public void listAcceleratorTypes(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public void getAcceleratorType(com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public void listRuntimeVersions(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRuntimeVersionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public void getRuntimeVersion(com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public void getGuestAttributes(com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGuestAttributesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Simulates a maintenance event.
+     * 
+ */ + public void simulateMaintenanceEvent(com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSimulateMaintenanceEventMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2alpha1
+   * 
+ */ + public static final class TpuBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private TpuBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.ListNodesResponse listNodes(com.google.cloud.tpu.v2alpha1.ListNodesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNodesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.Node getNode(com.google.cloud.tpu.v2alpha1.GetNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public com.google.longrunning.Operation createNode(com.google.cloud.tpu.v2alpha1.CreateNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public com.google.longrunning.Operation deleteNode(com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public com.google.longrunning.Operation stopNode(com.google.cloud.tpu.v2alpha1.StopNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public com.google.longrunning.Operation startNode(com.google.cloud.tpu.v2alpha1.StartNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public com.google.longrunning.Operation updateNode(com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateNodeMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists queued resources.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse listQueuedResources(com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListQueuedResourcesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a queued resource.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.QueuedResource getQueuedResource(com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetQueuedResourceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a QueuedResource TPU instance.
+     * 
+ */ + public com.google.longrunning.Operation createQueuedResource(com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateQueuedResourceMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a QueuedResource TPU instance.
+     * 
+ */ + public com.google.longrunning.Operation deleteQueuedResource(com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteQueuedResourceMethod(), getCallOptions(), request); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse generateServiceIdentity(com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateServiceIdentityMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse listAcceleratorTypes(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAcceleratorTypesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.AcceleratorType getAcceleratorType(com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAcceleratorTypeMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse listRuntimeVersions(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRuntimeVersionsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.RuntimeVersion getRuntimeVersion(com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRuntimeVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse getGuestAttributes(com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGuestAttributesMethod(), getCallOptions(), request); + } + + /** + *
+     * Simulates a maintenance event.
+     * 
+ */ + public com.google.longrunning.Operation simulateMaintenanceEvent(com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSimulateMaintenanceEventMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Manages TPU nodes and other resources
+   * TPU API v2alpha1
+   * 
+ */ + public static final class TpuFutureStub extends io.grpc.stub.AbstractFutureStub { + private TpuFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TpuFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TpuFutureStub(channel, callOptions); + } + + /** + *
+     * Lists nodes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNodes( + com.google.cloud.tpu.v2alpha1.ListNodesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNodesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNode( + com.google.cloud.tpu.v2alpha1.GetNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createNode( + com.google.cloud.tpu.v2alpha1.CreateNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteNode( + com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Stops a node. This operation is only available with single TPU nodes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture stopNode( + com.google.cloud.tpu.v2alpha1.StopNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Starts a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture startNode( + com.google.cloud.tpu.v2alpha1.StartNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the configurations of a node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateNode( + com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateNodeMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists queued resources.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listQueuedResources( + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListQueuedResourcesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a queued resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getQueuedResource( + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetQueuedResourceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a QueuedResource TPU instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createQueuedResource( + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateQueuedResourceMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a QueuedResource TPU instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteQueuedResource( + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteQueuedResourceMethod(), getCallOptions()), request); + } + + /** + *
+     * Generates the Cloud TPU service identity for the project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture generateServiceIdentity( + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateServiceIdentityMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists accelerator types supported by this API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listAcceleratorTypes( + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAcceleratorTypesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets AcceleratorType.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAcceleratorType( + com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAcceleratorTypeMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists runtime versions supported by this API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listRuntimeVersions( + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRuntimeVersionsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets a runtime version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getRuntimeVersion( + com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRuntimeVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Retrieves the guest attributes for the node.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getGuestAttributes( + com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGuestAttributesMethod(), getCallOptions()), request); + } + + /** + *
+     * Simulates a maintenance event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture simulateMaintenanceEvent( + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSimulateMaintenanceEventMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_NODES = 0; + private static final int METHODID_GET_NODE = 1; + private static final int METHODID_CREATE_NODE = 2; + private static final int METHODID_DELETE_NODE = 3; + private static final int METHODID_STOP_NODE = 4; + private static final int METHODID_START_NODE = 5; + private static final int METHODID_UPDATE_NODE = 6; + private static final int METHODID_LIST_QUEUED_RESOURCES = 7; + private static final int METHODID_GET_QUEUED_RESOURCE = 8; + private static final int METHODID_CREATE_QUEUED_RESOURCE = 9; + private static final int METHODID_DELETE_QUEUED_RESOURCE = 10; + private static final int METHODID_GENERATE_SERVICE_IDENTITY = 11; + private static final int METHODID_LIST_ACCELERATOR_TYPES = 12; + private static final int METHODID_GET_ACCELERATOR_TYPE = 13; + private static final int METHODID_LIST_RUNTIME_VERSIONS = 14; + private static final int METHODID_GET_RUNTIME_VERSION = 15; + private static final int METHODID_GET_GUEST_ATTRIBUTES = 16; + private static final int METHODID_SIMULATE_MAINTENANCE_EVENT = 17; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final TpuImplBase serviceImpl; + private final int methodId; + + MethodHandlers(TpuImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_NODES: + serviceImpl.listNodes((com.google.cloud.tpu.v2alpha1.ListNodesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NODE: + serviceImpl.getNode((com.google.cloud.tpu.v2alpha1.GetNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_NODE: + serviceImpl.createNode((com.google.cloud.tpu.v2alpha1.CreateNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NODE: + serviceImpl.deleteNode((com.google.cloud.tpu.v2alpha1.DeleteNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_STOP_NODE: + serviceImpl.stopNode((com.google.cloud.tpu.v2alpha1.StopNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_NODE: + serviceImpl.startNode((com.google.cloud.tpu.v2alpha1.StartNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_NODE: + serviceImpl.updateNode((com.google.cloud.tpu.v2alpha1.UpdateNodeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_QUEUED_RESOURCES: + serviceImpl.listQueuedResources((com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_QUEUED_RESOURCE: + serviceImpl.getQueuedResource((com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_QUEUED_RESOURCE: + serviceImpl.createQueuedResource((com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_QUEUED_RESOURCE: + serviceImpl.deleteQueuedResource((com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_SERVICE_IDENTITY: + serviceImpl.generateServiceIdentity((com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ACCELERATOR_TYPES: + serviceImpl.listAcceleratorTypes((com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ACCELERATOR_TYPE: + serviceImpl.getAcceleratorType((com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_RUNTIME_VERSIONS: + serviceImpl.listRuntimeVersions((com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RUNTIME_VERSION: + serviceImpl.getRuntimeVersion((com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_GUEST_ATTRIBUTES: + serviceImpl.getGuestAttributes((com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SIMULATE_MAINTENANCE_EVENT: + serviceImpl.simulateMaintenanceEvent((com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class TpuBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TpuBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Tpu"); + } + } + + private static final class TpuFileDescriptorSupplier + extends TpuBaseDescriptorSupplier { + TpuFileDescriptorSupplier() {} + } + + private static final class TpuMethodDescriptorSupplier + extends TpuBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TpuMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TpuGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TpuFileDescriptorSupplier()) + .addMethod(getListNodesMethod()) + .addMethod(getGetNodeMethod()) + .addMethod(getCreateNodeMethod()) + .addMethod(getDeleteNodeMethod()) + .addMethod(getStopNodeMethod()) + .addMethod(getStartNodeMethod()) + .addMethod(getUpdateNodeMethod()) + .addMethod(getListQueuedResourcesMethod()) + .addMethod(getGetQueuedResourceMethod()) + .addMethod(getCreateQueuedResourceMethod()) + .addMethod(getDeleteQueuedResourceMethod()) + .addMethod(getGenerateServiceIdentityMethod()) + .addMethod(getListAcceleratorTypesMethod()) + .addMethod(getGetAcceleratorTypeMethod()) + .addMethod(getListRuntimeVersionsMethod()) + .addMethod(getGetRuntimeVersionMethod()) + .addMethod(getGetGuestAttributesMethod()) + .addMethod(getSimulateMaintenanceEventMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorType.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorType.java similarity index 65% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorType.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorType.java index 72c0ba09017e..5d57eb174b0b 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorType.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorType.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A accelerator type that a Node can be configured with.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.AcceleratorType} */ -public final class AcceleratorType extends com.google.protobuf.GeneratedMessageV3 - implements +public final class AcceleratorType extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.AcceleratorType) AcceleratorTypeOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use AcceleratorType.newBuilder() to construct. private AcceleratorType(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AcceleratorType() { name_ = ""; type_ = ""; @@ -44,41 +26,37 @@ private AcceleratorType() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new AcceleratorType(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.AcceleratorType.class, - com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder.class); + com.google.cloud.tpu.v2alpha1.AcceleratorType.class, com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ @java.lang.Override @@ -87,29 +65,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -120,14 +98,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int TYPE_FIELD_NUMBER = 2; private volatile java.lang.Object type_; /** - * - * *
-   * the accelerator type.
+   * The accelerator type.
    * 
* * string type = 2; - * * @return The type. */ @java.lang.Override @@ -136,29 +111,29 @@ public java.lang.String getType() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); type_ = s; return s; } } /** - * - * *
-   * the accelerator type.
+   * The accelerator type.
    * 
* * string type = 2; - * * @return The bytes for type. */ @java.lang.Override - public com.google.protobuf.ByteString getTypeBytes() { + public com.google.protobuf.ByteString + getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); type_ = b; return b; } else { @@ -167,7 +142,6 @@ public com.google.protobuf.ByteString getTypeBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -179,7 +153,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -209,16 +184,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.AcceleratorType)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.AcceleratorType other = - (com.google.cloud.tpu.v2alpha1.AcceleratorType) obj; + com.google.cloud.tpu.v2alpha1.AcceleratorType other = (com.google.cloud.tpu.v2alpha1.AcceleratorType) obj; - if (!getName().equals(other.getName())) return false; - if (!getType().equals(other.getType())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getType() + .equals(other.getType())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -239,136 +215,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AcceleratorType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.AcceleratorType prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A accelerator type that a Node can be configured with.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.AcceleratorType} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.AcceleratorType) com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.AcceleratorType.class, - com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder.class); + com.google.cloud.tpu.v2alpha1.AcceleratorType.class, com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.AcceleratorType.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -380,9 +350,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; } @java.lang.Override @@ -401,8 +371,7 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.AcceleratorType buildPartial() { - com.google.cloud.tpu.v2alpha1.AcceleratorType result = - new com.google.cloud.tpu.v2alpha1.AcceleratorType(this); + com.google.cloud.tpu.v2alpha1.AcceleratorType result = new com.google.cloud.tpu.v2alpha1.AcceleratorType(this); result.name_ = name_; result.type_ = type_; onBuilt(); @@ -413,39 +382,38 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.AcceleratorType) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.AcceleratorType) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.AcceleratorType)other); } else { super.mergeFrom(other); return this; @@ -488,25 +456,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - type_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -519,20 +484,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -541,21 +504,20 @@ public java.lang.String getName() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -563,61 +525,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -625,20 +580,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object type_ = ""; /** - * - * *
-     * the accelerator type.
+     * The accelerator type.
      * 
* * string type = 2; - * * @return The type. */ public java.lang.String getType() { java.lang.Object ref = type_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); type_ = s; return s; @@ -647,21 +600,20 @@ public java.lang.String getType() { } } /** - * - * *
-     * the accelerator type.
+     * The accelerator type.
      * 
* * string type = 2; - * * @return The bytes for type. */ - public com.google.protobuf.ByteString getTypeBytes() { + public com.google.protobuf.ByteString + getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); type_ = b; return b; } else { @@ -669,68 +621,61 @@ public com.google.protobuf.ByteString getTypeBytes() { } } /** - * - * *
-     * the accelerator type.
+     * The accelerator type.
      * 
* * string type = 2; - * * @param value The type to set. * @return This builder for chaining. */ - public Builder setType(java.lang.String value) { + public Builder setType( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + type_ = value; onChanged(); return this; } /** - * - * *
-     * the accelerator type.
+     * The accelerator type.
      * 
* * string type = 2; - * * @return This builder for chaining. */ public Builder clearType() { - + type_ = getDefaultInstance().getType(); onChanged(); return this; } /** - * - * *
-     * the accelerator type.
+     * The accelerator type.
      * 
* * string type = 2; - * * @param value The bytes for type to set. * @return This builder for chaining. */ - public Builder setTypeBytes(com.google.protobuf.ByteString value) { + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -740,12 +685,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.AcceleratorType) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.AcceleratorType) private static final com.google.cloud.tpu.v2alpha1.AcceleratorType DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.AcceleratorType(); } @@ -754,27 +699,27 @@ public static com.google.cloud.tpu.v2alpha1.AcceleratorType getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AcceleratorType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceleratorType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -789,4 +734,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.AcceleratorType getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeName.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeName.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeName.java diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java new file mode 100644 index 000000000000..d3abf4c1597c --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AcceleratorTypeOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface AcceleratorTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.AcceleratorType) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The accelerator type.
+   * 
+ * + * string type = 2; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The accelerator type.
+   * 
+ * + * string type = 2; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfig.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfig.java similarity index 65% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfig.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfig.java index 20776242c2f4..86ba7798b946 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfig.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfig.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * An access config attached to the TPU worker.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.AccessConfig} */ -public final class AccessConfig extends com.google.protobuf.GeneratedMessageV3 - implements +public final class AccessConfig extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.AccessConfig) AccessConfigOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use AccessConfig.newBuilder() to construct. private AccessConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AccessConfig() { externalIp_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new AccessConfig(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AccessConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AccessConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.AccessConfig.class, - com.google.cloud.tpu.v2alpha1.AccessConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.AccessConfig.class, com.google.cloud.tpu.v2alpha1.AccessConfig.Builder.class); } public static final int EXTERNAL_IP_FIELD_NUMBER = 1; private volatile java.lang.Object externalIp_; /** - * - * *
    * Output only. An external IP address associated with the TPU worker.
    * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The externalIp. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getExternalIp() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); externalIp_ = s; return s; } } /** - * - * *
    * Output only. An external IP address associated with the TPU worker.
    * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for externalIp. */ @java.lang.Override - public com.google.protobuf.ByteString getExternalIpBytes() { + public com.google.protobuf.ByteString + getExternalIpBytes() { java.lang.Object ref = externalIp_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); externalIp_ = b; return b; } else { @@ -117,7 +95,6 @@ public com.google.protobuf.ByteString getExternalIpBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -129,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalIp_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, externalIp_); } @@ -153,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.AccessConfig)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.AccessConfig other = - (com.google.cloud.tpu.v2alpha1.AccessConfig) obj; + com.google.cloud.tpu.v2alpha1.AccessConfig other = (com.google.cloud.tpu.v2alpha1.AccessConfig) obj; - if (!getExternalIp().equals(other.getExternalIp())) return false; + if (!getExternalIp() + .equals(other.getExternalIp())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -180,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.AccessConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AccessConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.AccessConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * An access config attached to the TPU worker.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.AccessConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.AccessConfig) com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AccessConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AccessConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.AccessConfig.class, - com.google.cloud.tpu.v2alpha1.AccessConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.AccessConfig.class, com.google.cloud.tpu.v2alpha1.AccessConfig.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.AccessConfig.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -319,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; } @java.lang.Override @@ -340,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.AccessConfig build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.AccessConfig buildPartial() { - com.google.cloud.tpu.v2alpha1.AccessConfig result = - new com.google.cloud.tpu.v2alpha1.AccessConfig(this); + com.google.cloud.tpu.v2alpha1.AccessConfig result = new com.google.cloud.tpu.v2alpha1.AccessConfig(this); result.externalIp_ = externalIp_; onBuilt(); return result; @@ -351,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.AccessConfig buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.AccessConfig) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.AccessConfig) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.AccessConfig)other); } else { super.mergeFrom(other); return this; @@ -422,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - externalIp_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + externalIp_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -447,20 +415,18 @@ public Builder mergeFrom( private java.lang.Object externalIp_ = ""; /** - * - * *
      * Output only. An external IP address associated with the TPU worker.
      * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The externalIp. */ public java.lang.String getExternalIp() { java.lang.Object ref = externalIp_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); externalIp_ = s; return s; @@ -469,21 +435,20 @@ public java.lang.String getExternalIp() { } } /** - * - * *
      * Output only. An external IP address associated with the TPU worker.
      * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for externalIp. */ - public com.google.protobuf.ByteString getExternalIpBytes() { + public com.google.protobuf.ByteString + getExternalIpBytes() { java.lang.Object ref = externalIp_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); externalIp_ = b; return b; } else { @@ -491,68 +456,61 @@ public com.google.protobuf.ByteString getExternalIpBytes() { } } /** - * - * *
      * Output only. An external IP address associated with the TPU worker.
      * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The externalIp to set. * @return This builder for chaining. */ - public Builder setExternalIp(java.lang.String value) { + public Builder setExternalIp( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + externalIp_ = value; onChanged(); return this; } /** - * - * *
      * Output only. An external IP address associated with the TPU worker.
      * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return This builder for chaining. */ public Builder clearExternalIp() { - + externalIp_ = getDefaultInstance().getExternalIp(); onChanged(); return this; } /** - * - * *
      * Output only. An external IP address associated with the TPU worker.
      * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The bytes for externalIp to set. * @return This builder for chaining. */ - public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + public Builder setExternalIpBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIp_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -562,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.AccessConfig) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.AccessConfig) private static final com.google.cloud.tpu.v2alpha1.AccessConfig DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.AccessConfig(); } @@ -576,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.AccessConfig getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AccessConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -611,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.AccessConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfigOrBuilder.java similarity index 52% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfigOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfigOrBuilder.java index 3ff4351e51d5..f8ae5ed04810 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfigOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AccessConfigOrBuilder.java @@ -1,50 +1,29 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface AccessConfigOrBuilder - extends +public interface AccessConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.AccessConfig) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Output only. An external IP address associated with the TPU worker.
    * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The externalIp. */ java.lang.String getExternalIp(); /** - * - * *
    * Output only. An external IP address associated with the TPU worker.
    * 
* * string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for externalIp. */ - com.google.protobuf.ByteString getExternalIpBytes(); + com.google.protobuf.ByteString + getExternalIpBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDisk.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDisk.java similarity index 68% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDisk.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDisk.java index 4ac2559ad78c..0483efd2ab11 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDisk.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDisk.java @@ -1,26 +1,9 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A node-attached disk resource.
  * Next ID: 8;
@@ -28,16 +11,15 @@
  *
  * Protobuf type {@code google.cloud.tpu.v2alpha1.AttachedDisk}
  */
-public final class AttachedDisk extends com.google.protobuf.GeneratedMessageV3
-    implements
+public final class AttachedDisk extends
+    com.google.protobuf.GeneratedMessageV3 implements
     // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.AttachedDisk)
     AttachedDiskOrBuilder {
-  private static final long serialVersionUID = 0L;
+private static final long serialVersionUID = 0L;
   // Use AttachedDisk.newBuilder() to construct.
   private AttachedDisk(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     super(builder);
   }
-
   private AttachedDisk() {
     sourceDisk_ = "";
     mode_ = 0;
@@ -45,43 +27,39 @@ private AttachedDisk() {
 
   @java.lang.Override
   @SuppressWarnings({"unused"})
-  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+  protected java.lang.Object newInstance(
+      UnusedPrivateParameter unused) {
     return new AttachedDisk();
   }
 
   @java.lang.Override
-  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+  public final com.google.protobuf.UnknownFieldSet
+  getUnknownFields() {
     return this.unknownFields;
   }
-
-  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-    return com.google.cloud.tpu.v2alpha1.CloudTpuProto
-        .internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor;
+  public static final com.google.protobuf.Descriptors.Descriptor
+      getDescriptor() {
+    return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor;
   }
 
   @java.lang.Override
   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internalGetFieldAccessorTable() {
-    return com.google.cloud.tpu.v2alpha1.CloudTpuProto
-        .internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_fieldAccessorTable
+    return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_fieldAccessorTable
         .ensureFieldAccessorsInitialized(
-            com.google.cloud.tpu.v2alpha1.AttachedDisk.class,
-            com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder.class);
+            com.google.cloud.tpu.v2alpha1.AttachedDisk.class, com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder.class);
   }
 
   /**
-   *
-   *
    * 
    * The different mode of the attached disk.
    * 
* * Protobuf enum {@code google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode} */ - public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum { + public enum DiskMode + implements com.google.protobuf.ProtocolMessageEnum { /** - * - * *
      * The disk mode is not known/set.
      * 
@@ -90,8 +68,6 @@ public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum { */ DISK_MODE_UNSPECIFIED(0), /** - * - * *
      * Attaches the disk in read-write mode. Only one TPU node can attach a disk
      * in read-write mode at a time.
@@ -101,8 +77,6 @@ public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum {
      */
     READ_WRITE(1),
     /**
-     *
-     *
      * 
      * Attaches the disk in read-only mode. Multiple TPU nodes can attach
      * a disk in read-only mode at a time.
@@ -115,8 +89,6 @@ public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum {
     ;
 
     /**
-     *
-     *
      * 
      * The disk mode is not known/set.
      * 
@@ -125,8 +97,6 @@ public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum { */ public static final int DISK_MODE_UNSPECIFIED_VALUE = 0; /** - * - * *
      * Attaches the disk in read-write mode. Only one TPU node can attach a disk
      * in read-write mode at a time.
@@ -136,8 +106,6 @@ public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int READ_WRITE_VALUE = 1;
     /**
-     *
-     *
      * 
      * Attaches the disk in read-only mode. Multiple TPU nodes can attach
      * a disk in read-only mode at a time.
@@ -147,6 +115,7 @@ public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int READ_ONLY_VALUE = 2;
 
+
     public final int getNumber() {
       if (this == UNRECOGNIZED) {
         throw new java.lang.IllegalArgumentException(
@@ -171,49 +140,49 @@ public static DiskMode valueOf(int value) {
      */
     public static DiskMode forNumber(int value) {
       switch (value) {
-        case 0:
-          return DISK_MODE_UNSPECIFIED;
-        case 1:
-          return READ_WRITE;
-        case 2:
-          return READ_ONLY;
-        default:
-          return null;
+        case 0: return DISK_MODE_UNSPECIFIED;
+        case 1: return READ_WRITE;
+        case 2: return READ_ONLY;
+        default: return null;
       }
     }
 
-    public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
+    public static com.google.protobuf.Internal.EnumLiteMap
+        internalGetValueMap() {
       return internalValueMap;
     }
+    private static final com.google.protobuf.Internal.EnumLiteMap<
+        DiskMode> internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap() {
+            public DiskMode findValueByNumber(int number) {
+              return DiskMode.forNumber(number);
+            }
+          };
 
-    private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
-        new com.google.protobuf.Internal.EnumLiteMap() {
-          public DiskMode findValueByNumber(int number) {
-            return DiskMode.forNumber(number);
-          }
-        };
-
-    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
       if (this == UNRECOGNIZED) {
         throw new java.lang.IllegalStateException(
             "Can't get the descriptor of an unrecognized enum value.");
       }
       return getDescriptor().getValues().get(ordinal());
     }
-
-    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
       return getDescriptor();
     }
-
-    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
       return com.google.cloud.tpu.v2alpha1.AttachedDisk.getDescriptor().getEnumTypes().get(0);
     }
 
     private static final DiskMode[] VALUES = values();
 
-    public static DiskMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+    public static DiskMode valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
       if (desc.getType() != getDescriptor()) {
-        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
       }
       if (desc.getIndex() == -1) {
         return UNRECOGNIZED;
@@ -233,15 +202,12 @@ private DiskMode(int value) {
   public static final int SOURCE_DISK_FIELD_NUMBER = 3;
   private volatile java.lang.Object sourceDisk_;
   /**
-   *
-   *
    * 
    * Specifies the full path to an existing disk.
    * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
    * 
* * string source_disk = 3; - * * @return The sourceDisk. */ @java.lang.Override @@ -250,30 +216,30 @@ public java.lang.String getSourceDisk() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); sourceDisk_ = s; return s; } } /** - * - * *
    * Specifies the full path to an existing disk.
    * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
    * 
* * string source_disk = 3; - * * @return The bytes for sourceDisk. */ @java.lang.Override - public com.google.protobuf.ByteString getSourceDiskBytes() { + public com.google.protobuf.ByteString + getSourceDiskBytes() { java.lang.Object ref = sourceDisk_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); sourceDisk_ = b; return b; } else { @@ -284,8 +250,6 @@ public com.google.protobuf.ByteString getSourceDiskBytes() { public static final int MODE_FIELD_NUMBER = 4; private int mode_; /** - * - * *
    * The mode in which to attach this disk.
    * If not specified, the default is READ_WRITE mode.
@@ -293,16 +257,12 @@ public com.google.protobuf.ByteString getSourceDiskBytes() {
    * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @return The enum numeric value on the wire for mode. */ - @java.lang.Override - public int getModeValue() { + @java.lang.Override public int getModeValue() { return mode_; } /** - * - * *
    * The mode in which to attach this disk.
    * If not specified, the default is READ_WRITE mode.
@@ -310,21 +270,15 @@ public int getModeValue() {
    * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @return The mode. */ - @java.lang.Override - public com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode getMode() { + @java.lang.Override public com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode getMode() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode result = - com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.valueOf(mode_); - return result == null - ? com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.UNRECOGNIZED - : result; + com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode result = com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.valueOf(mode_); + return result == null ? com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -336,12 +290,12 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDisk_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceDisk_); } - if (mode_ - != com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.DISK_MODE_UNSPECIFIED.getNumber()) { + if (mode_ != com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.DISK_MODE_UNSPECIFIED.getNumber()) { output.writeEnum(4, mode_); } getUnknownFields().writeTo(output); @@ -356,9 +310,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDisk_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDisk_); } - if (mode_ - != com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.DISK_MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mode_); + if (mode_ != com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.DISK_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, mode_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -368,15 +322,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.AttachedDisk)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.AttachedDisk other = - (com.google.cloud.tpu.v2alpha1.AttachedDisk) obj; + com.google.cloud.tpu.v2alpha1.AttachedDisk other = (com.google.cloud.tpu.v2alpha1.AttachedDisk) obj; - if (!getSourceDisk().equals(other.getSourceDisk())) return false; + if (!getSourceDisk() + .equals(other.getSourceDisk())) return false; if (mode_ != other.mode_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -398,104 +352,97 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.AttachedDisk parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.AttachedDisk prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A node-attached disk resource.
    * Next ID: 8;
@@ -503,32 +450,33 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    * Protobuf type {@code google.cloud.tpu.v2alpha1.AttachedDisk}
    */
-  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
-      implements
+  public static final class Builder extends
+      com.google.protobuf.GeneratedMessageV3.Builder implements
       // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.AttachedDisk)
       com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return com.google.cloud.tpu.v2alpha1.CloudTpuProto
-          .internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor;
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return com.google.cloud.tpu.v2alpha1.CloudTpuProto
-          .internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_fieldAccessorTable
+      return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              com.google.cloud.tpu.v2alpha1.AttachedDisk.class,
-              com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder.class);
+              com.google.cloud.tpu.v2alpha1.AttachedDisk.class, com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder.class);
     }
 
     // Construct using com.google.cloud.tpu.v2alpha1.AttachedDisk.newBuilder()
-    private Builder() {}
+    private Builder() {
 
-    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      super(parent);
     }
 
+    private Builder(
+        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      super(parent);
+
+    }
     @java.lang.Override
     public Builder clear() {
       super.clear();
@@ -540,9 +488,9 @@ public Builder clear() {
     }
 
     @java.lang.Override
-    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-      return com.google.cloud.tpu.v2alpha1.CloudTpuProto
-          .internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor;
+    public com.google.protobuf.Descriptors.Descriptor
+        getDescriptorForType() {
+      return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor;
     }
 
     @java.lang.Override
@@ -561,8 +509,7 @@ public com.google.cloud.tpu.v2alpha1.AttachedDisk build() {
 
     @java.lang.Override
     public com.google.cloud.tpu.v2alpha1.AttachedDisk buildPartial() {
-      com.google.cloud.tpu.v2alpha1.AttachedDisk result =
-          new com.google.cloud.tpu.v2alpha1.AttachedDisk(this);
+      com.google.cloud.tpu.v2alpha1.AttachedDisk result = new com.google.cloud.tpu.v2alpha1.AttachedDisk(this);
       result.sourceDisk_ = sourceDisk_;
       result.mode_ = mode_;
       onBuilt();
@@ -573,39 +520,38 @@ public com.google.cloud.tpu.v2alpha1.AttachedDisk buildPartial() {
     public Builder clone() {
       return super.clone();
     }
-
     @java.lang.Override
     public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field,
+        java.lang.Object value) {
       return super.setField(field, value);
     }
-
     @java.lang.Override
-    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+    public Builder clearField(
+        com.google.protobuf.Descriptors.FieldDescriptor field) {
       return super.clearField(field);
     }
-
     @java.lang.Override
-    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+    public Builder clearOneof(
+        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
       return super.clearOneof(oneof);
     }
-
     @java.lang.Override
     public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field,
+        int index, java.lang.Object value) {
       return super.setRepeatedField(field, index, value);
     }
-
     @java.lang.Override
     public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field,
+        java.lang.Object value) {
       return super.addRepeatedField(field, value);
     }
-
     @java.lang.Override
     public Builder mergeFrom(com.google.protobuf.Message other) {
       if (other instanceof com.google.cloud.tpu.v2alpha1.AttachedDisk) {
-        return mergeFrom((com.google.cloud.tpu.v2alpha1.AttachedDisk) other);
+        return mergeFrom((com.google.cloud.tpu.v2alpha1.AttachedDisk)other);
       } else {
         super.mergeFrom(other);
         return this;
@@ -647,25 +593,22 @@ public Builder mergeFrom(
             case 0:
               done = true;
               break;
-            case 26:
-              {
-                sourceDisk_ = input.readStringRequireUtf8();
-
-                break;
-              } // case 26
-            case 32:
-              {
-                mode_ = input.readEnum();
-
-                break;
-              } // case 32
-            default:
-              {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
+            case 26: {
+              sourceDisk_ = input.readStringRequireUtf8();
+
+              break;
+            } // case 26
+            case 32: {
+              mode_ = input.readEnum();
+
+              break;
+            } // case 32
+            default: {
+              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                done = true; // was an endgroup tag
+              }
+              break;
+            } // default:
           } // switch (tag)
         } // while (!done)
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -678,21 +621,19 @@ public Builder mergeFrom(
 
     private java.lang.Object sourceDisk_ = "";
     /**
-     *
-     *
      * 
      * Specifies the full path to an existing disk.
      * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
      * 
* * string source_disk = 3; - * * @return The sourceDisk. */ public java.lang.String getSourceDisk() { java.lang.Object ref = sourceDisk_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); sourceDisk_ = s; return s; @@ -701,22 +642,21 @@ public java.lang.String getSourceDisk() { } } /** - * - * *
      * Specifies the full path to an existing disk.
      * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
      * 
* * string source_disk = 3; - * * @return The bytes for sourceDisk. */ - public com.google.protobuf.ByteString getSourceDiskBytes() { + public com.google.protobuf.ByteString + getSourceDiskBytes() { java.lang.Object ref = sourceDisk_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); sourceDisk_ = b; return b; } else { @@ -724,64 +664,57 @@ public com.google.protobuf.ByteString getSourceDiskBytes() { } } /** - * - * *
      * Specifies the full path to an existing disk.
      * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
      * 
* * string source_disk = 3; - * * @param value The sourceDisk to set. * @return This builder for chaining. */ - public Builder setSourceDisk(java.lang.String value) { + public Builder setSourceDisk( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + sourceDisk_ = value; onChanged(); return this; } /** - * - * *
      * Specifies the full path to an existing disk.
      * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
      * 
* * string source_disk = 3; - * * @return This builder for chaining. */ public Builder clearSourceDisk() { - + sourceDisk_ = getDefaultInstance().getSourceDisk(); onChanged(); return this; } /** - * - * *
      * Specifies the full path to an existing disk.
      * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
      * 
* * string source_disk = 3; - * * @param value The bytes for sourceDisk to set. * @return This builder for chaining. */ - public Builder setSourceDiskBytes(com.google.protobuf.ByteString value) { + public Builder setSourceDiskBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceDisk_ = value; onChanged(); return this; @@ -789,8 +722,6 @@ public Builder setSourceDiskBytes(com.google.protobuf.ByteString value) { private int mode_ = 0; /** - * - * *
      * The mode in which to attach this disk.
      * If not specified, the default is READ_WRITE mode.
@@ -798,16 +729,12 @@ public Builder setSourceDiskBytes(com.google.protobuf.ByteString value) {
      * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @return The enum numeric value on the wire for mode. */ - @java.lang.Override - public int getModeValue() { + @java.lang.Override public int getModeValue() { return mode_; } /** - * - * *
      * The mode in which to attach this disk.
      * If not specified, the default is READ_WRITE mode.
@@ -815,19 +742,16 @@ public int getModeValue() {
      * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @param value The enum numeric value on the wire for mode to set. * @return This builder for chaining. */ public Builder setModeValue(int value) { - + mode_ = value; onChanged(); return this; } /** - * - * *
      * The mode in which to attach this disk.
      * If not specified, the default is READ_WRITE mode.
@@ -835,21 +759,15 @@ public Builder setModeValue(int value) {
      * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @return The mode. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode getMode() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode result = - com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.valueOf(mode_); - return result == null - ? com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.UNRECOGNIZED - : result; + com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode result = com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.valueOf(mode_); + return result == null ? com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode.UNRECOGNIZED : result; } /** - * - * *
      * The mode in which to attach this disk.
      * If not specified, the default is READ_WRITE mode.
@@ -857,7 +775,6 @@ public com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode getMode() {
      * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @param value The mode to set. * @return This builder for chaining. */ @@ -865,14 +782,12 @@ public Builder setMode(com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode value if (value == null) { throw new NullPointerException(); } - + mode_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * The mode in which to attach this disk.
      * If not specified, the default is READ_WRITE mode.
@@ -880,18 +795,17 @@ public Builder setMode(com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode value
      * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @return This builder for chaining. */ public Builder clearMode() { - + mode_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -901,12 +815,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.AttachedDisk) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.AttachedDisk) private static final com.google.cloud.tpu.v2alpha1.AttachedDisk DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.AttachedDisk(); } @@ -915,27 +829,27 @@ public static com.google.cloud.tpu.v2alpha1.AttachedDisk getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttachedDisk parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttachedDisk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -950,4 +864,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.AttachedDisk getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDiskOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDiskOrBuilder.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDiskOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDiskOrBuilder.java index b7aebddde19b..e1a6a845faa7 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDiskOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/AttachedDiskOrBuilder.java @@ -1,58 +1,35 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface AttachedDiskOrBuilder - extends +public interface AttachedDiskOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.AttachedDisk) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Specifies the full path to an existing disk.
    * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
    * 
* * string source_disk = 3; - * * @return The sourceDisk. */ java.lang.String getSourceDisk(); /** - * - * *
    * Specifies the full path to an existing disk.
    * For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
    * 
* * string source_disk = 3; - * * @return The bytes for sourceDisk. */ - com.google.protobuf.ByteString getSourceDiskBytes(); + com.google.protobuf.ByteString + getSourceDiskBytes(); /** - * - * *
    * The mode in which to attach this disk.
    * If not specified, the default is READ_WRITE mode.
@@ -60,13 +37,10 @@ public interface AttachedDiskOrBuilder
    * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @return The enum numeric value on the wire for mode. */ int getModeValue(); /** - * - * *
    * The mode in which to attach this disk.
    * If not specified, the default is READ_WRITE mode.
@@ -74,7 +48,6 @@ public interface AttachedDiskOrBuilder
    * 
* * .google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode mode = 4; - * * @return The mode. */ com.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode getMode(); diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java new file mode 100644 index 000000000000..e780a71442e1 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CloudTpuProto.java @@ -0,0 +1,1014 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public final class CloudTpuProto { + private CloudTpuProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_AttachedDisk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_AccessConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_AccessConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_Node_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_Node_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_Node_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_Node_MetadataEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_Node_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_NodeSpec_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_NodeSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_BestEffort_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_BestEffort_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Guaranteed_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Guaranteed_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_QueueingPolicy_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResource_QueueingPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_CreatingData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_CreatingData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_AcceptedData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_AcceptedData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ProvisioningData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ProvisioningData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_FailedData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_FailedData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_DeletingData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_DeletingData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ActiveData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ActiveData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendingData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendingData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendedData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendedData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GetQueuedResourceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GetQueuedResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_CreateQueuedResourceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_CreateQueuedResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_DeleteQueuedResourceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_DeleteQueuedResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_AcceleratorType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_Symptom_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_SimulateMaintenanceEventRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_SimulateMaintenanceEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/tpu/v2alpha1/cloud_tpu.pr" + + "oto\022\031google.cloud.tpu.v2alpha1\032\034google/a" + + "pi/annotations.proto\032\027google/api/client." + + "proto\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032#google/longru" + + "nning/operations.proto\032\036google/protobuf/" + + "duration.proto\032 google/protobuf/field_ma" + + "sk.proto\032\037google/protobuf/timestamp.prot" + + "o\032\027google/rpc/status.proto\032\032google/type/" + + "interval.proto\"k\n\017GuestAttributes\022\022\n\nque" + + "ry_path\030\001 \001(\t\022D\n\013query_value\030\002 \001(\0132/.goo" + + "gle.cloud.tpu.v2alpha1.GuestAttributesVa" + + "lue\"V\n\024GuestAttributesValue\022>\n\005items\030\001 \003" + + "(\0132/.google.cloud.tpu.v2alpha1.GuestAttr" + + "ibutesEntry\"E\n\024GuestAttributesEntry\022\021\n\tn" + + "amespace\030\001 \001(\t\022\013\n\003key\030\002 \001(\t\022\r\n\005value\030\003 \001" + + "(\t\"\251\001\n\014AttachedDisk\022\023\n\013source_disk\030\003 \001(\t" + + "\022>\n\004mode\030\004 \001(\01620.google.cloud.tpu.v2alph" + + "a1.AttachedDisk.DiskMode\"D\n\010DiskMode\022\031\n\025" + + "DISK_MODE_UNSPECIFIED\020\000\022\016\n\nREAD_WRITE\020\001\022" + + "\r\n\tREAD_ONLY\020\002\"9\n\020SchedulingConfig\022\023\n\013pr" + + "eemptible\030\001 \001(\010\022\020\n\010reserved\030\002 \001(\010\"s\n\017Net" + + "workEndpoint\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port" + + "\030\002 \001(\005\022>\n\raccess_config\030\005 \001(\0132\'.google.c" + + "loud.tpu.v2alpha1.AccessConfig\"(\n\014Access" + + "Config\022\030\n\013external_ip\030\001 \001(\tB\003\340A\003\"i\n\rNetw" + + "orkConfig\022\017\n\007network\030\001 \001(\t\022\022\n\nsubnetwork" + + "\030\002 \001(\t\022\033\n\023enable_external_ips\030\003 \001(\010\022\026\n\016c" + + "an_ip_forward\030\004 \001(\010\".\n\016ServiceAccount\022\r\n" + + "\005email\030\001 \001(\t\022\r\n\005scope\030\002 \003(\t\"\211\r\n\004Node\022\024\n\004" + + "name\030\001 \001(\tB\006\340A\003\340A\005\022\023\n\013description\030\003 \001(\t\022" + + "\030\n\020accelerator_type\030\005 \001(\t\0229\n\005state\030\t \001(\016" + + "2%.google.cloud.tpu.v2alpha1.Node.StateB" + + "\003\340A\003\022\037\n\022health_description\030\n \001(\tB\003\340A\003\022\034\n" + + "\017runtime_version\030\013 \001(\tB\003\340A\002\022@\n\016network_c" + + "onfig\030$ \001(\0132(.google.cloud.tpu.v2alpha1." + + "NetworkConfig\022\022\n\ncidr_block\030\r \001(\t\022B\n\017ser" + + "vice_account\030% \001(\0132).google.cloud.tpu.v2" + + "alpha1.ServiceAccount\0224\n\013create_time\030\020 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022F\n\021s" + + "cheduling_config\030\021 \001(\0132+.google.cloud.tp" + + "u.v2alpha1.SchedulingConfig\022J\n\021network_e" + + "ndpoints\030\025 \003(\0132*.google.cloud.tpu.v2alph" + + "a1.NetworkEndpointB\003\340A\003\0226\n\006health\030\026 \001(\0162" + + "&.google.cloud.tpu.v2alpha1.Node.Health\022" + + ";\n\006labels\030\030 \003(\0132+.google.cloud.tpu.v2alp" + + "ha1.Node.LabelsEntry\022?\n\010metadata\030\" \003(\0132-" + + ".google.cloud.tpu.v2alpha1.Node.Metadata" + + "Entry\022\014\n\004tags\030( \003(\t\022\017\n\002id\030! \001(\003B\003\340A\003\022;\n\n" + + "data_disks\030) \003(\0132\'.google.cloud.tpu.v2al" + + "pha1.AttachedDisk\022D\n\013api_version\030& \001(\0162*" + + ".google.cloud.tpu.v2alpha1.Node.ApiVersi" + + "onB\003\340A\003\0229\n\010symptoms\030\' \003(\0132\".google.cloud" + + ".tpu.v2alpha1.SymptomB\003\340A\003\022\034\n\017queued_res" + + "ource\030+ \001(\tB\003\340A\003\022S\n\030shielded_instance_co" + + "nfig\030- \001(\01321.google.cloud.tpu.v2alpha1.S" + + "hieldedInstanceConfig\032-\n\013LabelsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032/\n\rMetadata" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\341\001" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATI" + + "NG\020\001\022\t\n\005READY\020\002\022\016\n\nRESTARTING\020\003\022\r\n\tREIMA" + + "GING\020\004\022\014\n\010DELETING\020\005\022\r\n\tREPAIRING\020\006\022\013\n\007S" + + "TOPPED\020\010\022\014\n\010STOPPING\020\t\022\014\n\010STARTING\020\n\022\r\n\t" + + "PREEMPTED\020\013\022\016\n\nTERMINATED\020\014\022\n\n\006HIDING\020\r\022" + + "\n\n\006HIDDEN\020\016\022\014\n\010UNHIDING\020\017\"o\n\006Health\022\026\n\022H" + + "EALTH_UNSPECIFIED\020\000\022\013\n\007HEALTHY\020\001\022\013\n\007TIME" + + "OUT\020\003\022\030\n\024UNHEALTHY_TENSORFLOW\020\004\022\031\n\025UNHEA" + + "LTHY_MAINTENANCE\020\005\"O\n\nApiVersion\022\033\n\027API_" + + "VERSION_UNSPECIFIED\020\000\022\r\n\tV1_ALPHA1\020\001\022\006\n\002" + + "V1\020\002\022\r\n\tV2_ALPHA1\020\003:R\352AO\n\027tpu.googleapis" + + ".com/Node\0224projects/{project}/locations/" + + "{location}/nodes/{node}\"\252\t\n\016QueuedResour" + + "ce\022\024\n\004name\030\001 \001(\tB\006\340A\003\340A\005\022<\n\003tpu\030\002 \001(\0132-." + + "google.cloud.tpu.v2alpha1.QueuedResource" + + ".TpuH\000\022K\n\013best_effort\030\003 \001(\01324.google.clo" + + "ud.tpu.v2alpha1.QueuedResource.BestEffor" + + "tH\001\022J\n\nguaranteed\030\004 \001(\01324.google.cloud.t" + + "pu.v2alpha1.QueuedResource.GuaranteedH\001\022" + + "Q\n\017queueing_policy\030\005 \001(\01328.google.cloud." + + "tpu.v2alpha1.QueuedResource.QueueingPoli" + + "cy\022B\n\005state\030\006 \001(\0132..google.cloud.tpu.v2a" + + "lpha1.QueuedResourceStateB\003\340A\003\032\335\001\n\003Tpu\022I" + + "\n\tnode_spec\030\001 \003(\01326.google.cloud.tpu.v2a" + + "lpha1.QueuedResource.Tpu.NodeSpec\032\212\001\n\010No" + + "deSpec\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\017\n\007node_id\030\002 \001" + + "(\t\0222\n\004node\030\003 \001(\0132\037.google.cloud.tpu.v2al" + + "pha1.NodeB\003\340A\002\032\014\n\nBestEffort\032Y\n\nGuarante" + + "ed\0224\n\014min_duration\030\001 \001(\0132\031.google.protob" + + "uf.DurationB\003\340A\001\022\025\n\010reserved\030\002 \001(\010B\003\340A\001\032" + + "\303\002\n\016QueueingPolicy\0229\n\024valid_until_durati" + + "on\030\001 \001(\0132\031.google.protobuf.DurationH\000\0226\n" + + "\020valid_until_time\030\002 \001(\0132\032.google.protobu" + + "f.TimestampH\000\0229\n\024valid_after_duration\030\003 " + + "\001(\0132\031.google.protobuf.DurationH\000\0226\n\020vali" + + "d_after_time\030\004 \001(\0132\032.google.protobuf.Tim" + + "estampH\000\022/\n\016valid_interval\030\005 \001(\0132\025.googl" + + "e.type.IntervalH\000B\032\n\030start_timing_constr" + + "aints:q\352An\n!tpu.googleapis.com/QueuedRes" + + "ource\022Iprojects/{project}/locations/{loc" + + "ation}/queuedResources/{queued_resource}" + + "B\n\n\010resourceB\006\n\004tier\"\330\010\n\023QueuedResourceS" + + "tate\022C\n\005state\030\001 \001(\01624.google.cloud.tpu.v" + + "2alpha1.QueuedResourceState.State\022T\n\rcre" + + "ating_data\030\002 \001(\0132;.google.cloud.tpu.v2al" + + "pha1.QueuedResourceState.CreatingDataH\000\022" + + "T\n\raccepted_data\030\003 \001(\0132;.google.cloud.tp" + + "u.v2alpha1.QueuedResourceState.AcceptedD" + + "ataH\000\022\\\n\021provisioning_data\030\004 \001(\0132?.googl" + + "e.cloud.tpu.v2alpha1.QueuedResourceState" + + ".ProvisioningDataH\000\022P\n\013failed_data\030\005 \001(\013" + + "29.google.cloud.tpu.v2alpha1.QueuedResou" + + "rceState.FailedDataH\000\022T\n\rdeleting_data\030\006" + + " \001(\0132;.google.cloud.tpu.v2alpha1.QueuedR" + + "esourceState.DeletingDataH\000\022P\n\013active_da" + + "ta\030\007 \001(\01329.google.cloud.tpu.v2alpha1.Que" + + "uedResourceState.ActiveDataH\000\022X\n\017suspend" + + "ing_data\030\010 \001(\0132=.google.cloud.tpu.v2alph" + + "a1.QueuedResourceState.SuspendingDataH\000\022" + + "V\n\016suspended_data\030\t \001(\0132<.google.cloud.t" + + "pu.v2alpha1.QueuedResourceState.Suspende" + + "dDataH\000\032\016\n\014CreatingData\032\016\n\014AcceptedData\032" + + "\022\n\020ProvisioningData\032/\n\nFailedData\022!\n\005err" + + "or\030\001 \001(\0132\022.google.rpc.Status\032\016\n\014Deleting" + + "Data\032\014\n\nActiveData\032\020\n\016SuspendingData\032\017\n\r" + + "SuspendedData\"\221\001\n\005State\022\025\n\021STATE_UNSPECI" + + "FIED\020\000\022\014\n\010CREATING\020\001\022\014\n\010ACCEPTED\020\002\022\020\n\014PR" + + "OVISIONING\020\003\022\n\n\006FAILED\020\004\022\014\n\010DELETING\020\005\022\n" + + "\n\006ACTIVE\020\006\022\016\n\nSUSPENDING\020\007\022\r\n\tSUSPENDED\020" + + "\010B\014\n\nstate_data\"j\n\020ListNodesRequest\022/\n\006p" + + "arent\030\001 \001(\tB\037\340A\002\372A\031\022\027tpu.googleapis.com/" + + "Node\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"q\n\021ListNodesResponse\022.\n\005nodes\030\001 \003(\0132" + + "\037.google.cloud.tpu.v2alpha1.Node\022\027\n\017next" + + "_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"?" + + "\n\016GetNodeRequest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027" + + "tpu.googleapis.com/Node\"\247\001\n\021CreateNodeRe" + + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + + ".googleapis.com/Location\022\017\n\007node_id\030\002 \001(" + + "\t\0222\n\004node\030\003 \001(\0132\037.google.cloud.tpu.v2alp" + + "ha1.NodeB\003\340A\002\022\022\n\nrequest_id\030\006 \001(\t\"V\n\021Del" + + "eteNodeRequest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tp" + + "u.googleapis.com/Node\022\022\n\nrequest_id\030\003 \001(" + + "\t\"@\n\017StopNodeRequest\022-\n\004name\030\001 \001(\tB\037\340A\002\372" + + "A\031\n\027tpu.googleapis.com/Node\"A\n\020StartNode" + + "Request\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googl" + + "eapis.com/Node\"}\n\021UpdateNodeRequest\0224\n\013u" + + "pdate_mask\030\001 \001(\0132\032.google.protobuf.Field" + + "MaskB\003\340A\002\0222\n\004node\030\002 \001(\0132\037.google.cloud.t" + + "pu.v2alpha1.NodeB\003\340A\002\"~\n\032ListQueuedResou" + + "rcesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!tpu" + + ".googleapis.com/QueuedResource\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\220\001\n\033ListQu" + + "euedResourcesResponse\022C\n\020queued_resource" + + "s\030\001 \003(\0132).google.cloud.tpu.v2alpha1.Queu" + + "edResource\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013u" + + "nreachable\030\003 \003(\t\"S\n\030GetQueuedResourceReq" + + "uest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!tpu.googleap" + + "is.com/QueuedResource\"\321\001\n\033CreateQueuedRe" + + "sourceRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!l" + + "ocations.googleapis.com/Location\022\032\n\022queu" + + "ed_resource_id\030\002 \001(\t\022G\n\017queued_resource\030" + + "\003 \001(\0132).google.cloud.tpu.v2alpha1.Queued" + + "ResourceB\003\340A\002\022\022\n\nrequest_id\030\004 \001(\t\"j\n\033Del" + + "eteQueuedResourceRequest\0227\n\004name\030\001 \001(\tB)" + + "\340A\002\372A#\n!tpu.googleapis.com/QueuedResourc" + + "e\022\022\n\nrequest_id\030\002 \001(\t\" \n\017ServiceIdentity" + + "\022\r\n\005email\030\001 \001(\t\"[\n\036GenerateServiceIdenti" + + "tyRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locat" + + "ions.googleapis.com/Location\"_\n\037Generate" + + "ServiceIdentityResponse\022<\n\010identity\030\001 \001(" + + "\0132*.google.cloud.tpu.v2alpha1.ServiceIde" + + "ntity\"\243\001\n\017AcceleratorType\022\014\n\004name\030\001 \001(\t\022" + + "\014\n\004type\030\002 \001(\t:t\352Aq\n\"tpu.googleapis.com/A" + + "cceleratorType\022Kprojects/{project}/locat" + + "ions/{location}/acceleratorTypes/{accele" + + "rator_type}\"U\n\031GetAcceleratorTypeRequest" + + "\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"tpu.googleapis.c" + + "om/AcceleratorType\"\242\001\n\033ListAcceleratorTy" + + "pesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"tpu." + + "googleapis.com/AcceleratorType\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030" + + "\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\223\001\n\034ListAccelera" + + "torTypesResponse\022E\n\021accelerator_types\030\001 " + + "\003(\0132*.google.cloud.tpu.v2alpha1.Accelera" + + "torType\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"\242\001\n\016RuntimeVersion\022\014\n\004name" + + "\030\001 \001(\t\022\017\n\007version\030\002 \001(\t:q\352An\n!tpu.google" + + "apis.com/RuntimeVersion\022Iprojects/{proje" + + "ct}/locations/{location}/runtimeVersions" + + "/{runtime_version}\"S\n\030GetRuntimeVersionR" + + "equest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!tpu.google" + + "apis.com/RuntimeVersion\"\240\001\n\032ListRuntimeV" + + "ersionsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!" + + "tpu.googleapis.com/RuntimeVersion\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + + "er\030\005 \001(\t\022\020\n\010order_by\030\006 \001(\t\"\220\001\n\033ListRunti" + + "meVersionsResponse\022C\n\020runtime_versions\030\001" + + " \003(\0132).google.cloud.tpu.v2alpha1.Runtime" + + "Version\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"\326\001\n\021OperationMetadata\022/\n\013c" + + "reate_time\030\001 \001(\0132\032.google.protobuf.Times" + + "tamp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf" + + ".Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004verb\030\004 \001(\t" + + "\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020cancel_reques" + + "ted\030\006 \001(\010\022\023\n\013api_version\030\007 \001(\t\"\313\002\n\007Sympt" + + "om\022/\n\013create_time\030\001 \001(\0132\032.google.protobu" + + "f.Timestamp\022D\n\014symptom_type\030\002 \001(\0162..goog" + + "le.cloud.tpu.v2alpha1.Symptom.SymptomTyp" + + "e\022\017\n\007details\030\003 \001(\t\022\021\n\tworker_id\030\004 \001(\t\"\244\001" + + "\n\013SymptomType\022\034\n\030SYMPTOM_TYPE_UNSPECIFIE" + + "D\020\000\022\016\n\nLOW_MEMORY\020\001\022\021\n\rOUT_OF_MEMORY\020\002\022\025" + + "\n\021EXECUTE_TIMED_OUT\020\003\022\023\n\017MESH_BUILD_FAIL" + + "\020\004\022\025\n\021HBM_OUT_OF_MEMORY\020\005\022\021\n\rPROJECT_ABU" + + "SE\020\006\"r\n\031GetGuestAttributesRequest\022-\n\004nam" + + "e\030\001 \001(\tB\037\340A\002\372A\031\n\027tpu.googleapis.com/Node" + + "\022\022\n\nquery_path\030\002 \001(\t\022\022\n\nworker_ids\030\003 \003(\t" + + "\"b\n\032GetGuestAttributesResponse\022D\n\020guest_" + + "attributes\030\001 \003(\0132*.google.cloud.tpu.v2al" + + "pha1.GuestAttributes\"d\n\037SimulateMaintena" + + "nceEventRequest\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027t" + + "pu.googleapis.com/Node\022\022\n\nworker_ids\030\002 \003" + + "(\t\"4\n\026ShieldedInstanceConfig\022\032\n\022enable_s" + + "ecure_boot\030\001 \001(\0102\267\035\n\003Tpu\022\250\001\n\tListNodes\022+" + + ".google.cloud.tpu.v2alpha1.ListNodesRequ" + + "est\032,.google.cloud.tpu.v2alpha1.ListNode" + + "sResponse\"@\202\323\344\223\0021\022//v2alpha1/{parent=pro" + + "jects/*/locations/*}/nodes\332A\006parent\022\225\001\n\007" + + "GetNode\022).google.cloud.tpu.v2alpha1.GetN" + + "odeRequest\032\037.google.cloud.tpu.v2alpha1.N" + + "ode\">\202\323\344\223\0021\022//v2alpha1/{name=projects/*/" + + "locations/*/nodes/*}\332A\004name\022\312\001\n\nCreateNo" + + "de\022,.google.cloud.tpu.v2alpha1.CreateNod" + + "eRequest\032\035.google.longrunning.Operation\"" + + "o\202\323\344\223\0027\"//v2alpha1/{parent=projects/*/lo" + + "cations/*}/nodes:\004node\332A\023parent,node,nod" + + "e_id\312A\031\n\004Node\022\021OperationMetadata\022\306\001\n\nDel" + + "eteNode\022,.google.cloud.tpu.v2alpha1.Dele" + + "teNodeRequest\032\035.google.longrunning.Opera" + + "tion\"k\202\323\344\223\0021*//v2alpha1/{name=projects/*" + + "/locations/*/nodes/*}\332A\004name\312A*\n\025google." + + "protobuf.Empty\022\021OperationMetadata\022\262\001\n\010St" + + "opNode\022*.google.cloud.tpu.v2alpha1.StopN" + + "odeRequest\032\035.google.longrunning.Operatio" + + "n\"[\202\323\344\223\0029\"4/v2alpha1/{name=projects/*/lo" + + "cations/*/nodes/*}:stop:\001*\312A\031\n\004Node\022\021Ope" + + "rationMetadata\022\265\001\n\tStartNode\022+.google.cl" + + "oud.tpu.v2alpha1.StartNodeRequest\032\035.goog" + + "le.longrunning.Operation\"\\\202\323\344\223\002:\"5/v2alp" + + "ha1/{name=projects/*/locations/*/nodes/*" + + "}:start:\001*\312A\031\n\004Node\022\021OperationMetadata\022\314" + + "\001\n\nUpdateNode\022,.google.cloud.tpu.v2alpha" + + "1.UpdateNodeRequest\032\035.google.longrunning" + + ".Operation\"q\202\323\344\223\002<24/v2alpha1/{node.name" + + "=projects/*/locations/*/nodes/*}:\004node\332A" + + "\020node,update_mask\312A\031\n\004Node\022\021OperationMet" + + "adata\022\320\001\n\023ListQueuedResources\0225.google.c" + + "loud.tpu.v2alpha1.ListQueuedResourcesReq" + + "uest\0326.google.cloud.tpu.v2alpha1.ListQue" + + "uedResourcesResponse\"J\202\323\344\223\002;\0229/v2alpha1/" + + "{parent=projects/*/locations/*}/queuedRe" + + "sources\332A\006parent\022\275\001\n\021GetQueuedResource\0223" + + ".google.cloud.tpu.v2alpha1.GetQueuedReso" + + "urceRequest\032).google.cloud.tpu.v2alpha1." + + "QueuedResource\"H\202\323\344\223\002;\0229/v2alpha1/{name=" + + "projects/*/locations/*/queuedResources/*" + + "}\332A\004name\022\224\002\n\024CreateQueuedResource\0226.goog" + + "le.cloud.tpu.v2alpha1.CreateQueuedResour" + + "ceRequest\032\035.google.longrunning.Operation" + + "\"\244\001\202\323\344\223\002L\"9/v2alpha1/{parent=projects/*/" + + "locations/*}/queuedResources:\017queued_res" + + "ource\332A)parent,queued_resource,queued_re" + + "source_id\312A#\n\016QueuedResource\022\021OperationM" + + "etadata\022\335\001\n\024DeleteQueuedResource\0226.googl" + + "e.cloud.tpu.v2alpha1.DeleteQueuedResourc" + + "eRequest\032\035.google.longrunning.Operation\"" + + "n\202\323\344\223\002;*9/v2alpha1/{name=projects/*/loca" + + "tions/*/queuedResources/*}\332A\004name\312A#\n\016Qu" + + "euedResource\022\021OperationMetadata\022\336\001\n\027Gene" + + "rateServiceIdentity\0229.google.cloud.tpu.v" + + "2alpha1.GenerateServiceIdentityRequest\032:" + + ".google.cloud.tpu.v2alpha1.GenerateServi" + + "ceIdentityResponse\"L\202\323\344\223\002F\"A/v2alpha1/{p" + + "arent=projects/*/locations/*}:generateSe" + + "rviceIdentity:\001*\022\324\001\n\024ListAcceleratorType" + + "s\0226.google.cloud.tpu.v2alpha1.ListAccele" + + "ratorTypesRequest\0327.google.cloud.tpu.v2a" + + "lpha1.ListAcceleratorTypesResponse\"K\202\323\344\223" + + "\002<\022:/v2alpha1/{parent=projects/*/locatio" + + "ns/*}/acceleratorTypes\332A\006parent\022\301\001\n\022GetA" + + "cceleratorType\0224.google.cloud.tpu.v2alph" + + "a1.GetAcceleratorTypeRequest\032*.google.cl" + + "oud.tpu.v2alpha1.AcceleratorType\"I\202\323\344\223\002<" + + "\022:/v2alpha1/{name=projects/*/locations/*" + + "/acceleratorTypes/*}\332A\004name\022\320\001\n\023ListRunt" + + "imeVersions\0225.google.cloud.tpu.v2alpha1." + + "ListRuntimeVersionsRequest\0326.google.clou" + + "d.tpu.v2alpha1.ListRuntimeVersionsRespon" + + "se\"J\202\323\344\223\002;\0229/v2alpha1/{parent=projects/*" + + "/locations/*}/runtimeVersions\332A\006parent\022\275" + + "\001\n\021GetRuntimeVersion\0223.google.cloud.tpu." + + "v2alpha1.GetRuntimeVersionRequest\032).goog" + + "le.cloud.tpu.v2alpha1.RuntimeVersion\"H\202\323" + + "\344\223\002;\0229/v2alpha1/{name=projects/*/locatio" + + "ns/*/runtimeVersions/*}\332A\004name\022\320\001\n\022GetGu" + + "estAttributes\0224.google.cloud.tpu.v2alpha" + + "1.GetGuestAttributesRequest\0325.google.clo" + + "ud.tpu.v2alpha1.GetGuestAttributesRespon" + + "se\"M\202\323\344\223\002G\"B/v2alpha1/{name=projects/*/l" + + "ocations/*/nodes/*}:getGuestAttributes:\001" + + "*\022\346\001\n\030SimulateMaintenanceEvent\022:.google." + + "cloud.tpu.v2alpha1.SimulateMaintenanceEv" + + "entRequest\032\035.google.longrunning.Operatio" + + "n\"o\202\323\344\223\002M\"H/v2alpha1/{name=projects/*/lo" + + "cations/*/nodes/*}:simulateMaintenanceEv" + + "ent:\001*\312A\031\n\004Node\022\021OperationMetadata\032F\312A\022t" + + "pu.googleapis.com\322A.https://www.googleap" + + "is.com/auth/cloud-platformBn\n\035com.google" + + ".cloud.tpu.v2alpha1B\rCloudTpuProtoP\001Z * Request for [CreateNode][google.cloud.tpu.v2alpha1.Tpu.CreateNode]. *
* * Protobuf type {@code google.cloud.tpu.v2alpha1.CreateNodeRequest} */ -public final class CreateNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class CreateNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.CreateNodeRequest) CreateNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use CreateNodeRequest.newBuilder() to construct. private CreateNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CreateNodeRequest() { parent_ = ""; nodeId_ = ""; + requestId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new CreateNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.CreateNodeRequest.class, - com.google.cloud.tpu.v2alpha1.CreateNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.CreateNodeRequest.class, com.google.cloud.tpu.v2alpha1.CreateNodeRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -89,31 +66,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -124,14 +99,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int NODE_ID_FIELD_NUMBER = 2; private volatile java.lang.Object nodeId_; /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The nodeId. */ @java.lang.Override @@ -140,29 +112,29 @@ public java.lang.String getNodeId() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nodeId_ = s; return s; } } /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The bytes for nodeId. */ @java.lang.Override - public com.google.protobuf.ByteString getNodeIdBytes() { + public com.google.protobuf.ByteString + getNodeIdBytes() { java.lang.Object ref = nodeId_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nodeId_ = b; return b; } else { @@ -173,15 +145,11 @@ public com.google.protobuf.ByteString getNodeIdBytes() { public static final int NODE_FIELD_NUMBER = 3; private com.google.cloud.tpu.v2alpha1.Node node_; /** - * - * *
    * Required. The node.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the node field is set. */ @java.lang.Override @@ -189,15 +157,11 @@ public boolean hasNode() { return node_ != null; } /** - * - * *
    * Required. The node.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; * @return The node. */ @java.lang.Override @@ -205,22 +169,64 @@ public com.google.cloud.tpu.v2alpha1.Node getNode() { return node_ == null ? com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; } /** - * - * *
    * Required. The node.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder() { return getNode(); } - private byte memoizedIsInitialized = -1; + public static final int REQUEST_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object requestId_; + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 6; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 6; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -232,7 +238,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -242,6 +249,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (node_ != null) { output.writeMessage(3, getNode()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, requestId_); + } getUnknownFields().writeTo(output); } @@ -258,7 +268,11 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nodeId_); } if (node_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNode()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNode()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, requestId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -268,20 +282,24 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.CreateNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.CreateNodeRequest other = - (com.google.cloud.tpu.v2alpha1.CreateNodeRequest) obj; + com.google.cloud.tpu.v2alpha1.CreateNodeRequest other = (com.google.cloud.tpu.v2alpha1.CreateNodeRequest) obj; - if (!getParent().equals(other.getParent())) return false; - if (!getNodeId().equals(other.getNodeId())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (!getNodeId() + .equals(other.getNodeId())) return false; if (hasNode() != other.hasNode()) return false; if (hasNode()) { - if (!getNode().equals(other.getNode())) return false; + if (!getNode() + .equals(other.getNode())) return false; } + if (!getRequestId() + .equals(other.getRequestId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -301,141 +319,137 @@ public int hashCode() { hash = (37 * hash) + NODE_FIELD_NUMBER; hash = (53 * hash) + getNode().hashCode(); } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.CreateNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [CreateNode][google.cloud.tpu.v2alpha1.Tpu.CreateNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.CreateNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.CreateNodeRequest) com.google.cloud.tpu.v2alpha1.CreateNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.CreateNodeRequest.class, - com.google.cloud.tpu.v2alpha1.CreateNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.CreateNodeRequest.class, com.google.cloud.tpu.v2alpha1.CreateNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.CreateNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -449,13 +463,15 @@ public Builder clear() { node_ = null; nodeBuilder_ = null; } + requestId_ = ""; + return this; } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateNodeRequest_descriptor; } @java.lang.Override @@ -474,8 +490,7 @@ public com.google.cloud.tpu.v2alpha1.CreateNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.CreateNodeRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.CreateNodeRequest result = - new com.google.cloud.tpu.v2alpha1.CreateNodeRequest(this); + com.google.cloud.tpu.v2alpha1.CreateNodeRequest result = new com.google.cloud.tpu.v2alpha1.CreateNodeRequest(this); result.parent_ = parent_; result.nodeId_ = nodeId_; if (nodeBuilder_ == null) { @@ -483,6 +498,7 @@ public com.google.cloud.tpu.v2alpha1.CreateNodeRequest buildPartial() { } else { result.node_ = nodeBuilder_.build(); } + result.requestId_ = requestId_; onBuilt(); return result; } @@ -491,39 +507,38 @@ public com.google.cloud.tpu.v2alpha1.CreateNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.CreateNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.CreateNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.CreateNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -531,8 +546,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.CreateNodeRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.CreateNodeRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.CreateNodeRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -544,6 +558,10 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.CreateNodeRequest other) if (other.hasNode()) { mergeNode(other.getNode()); } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -570,31 +588,34 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); + case 10: { + parent_ = input.readStringRequireUtf8(); - break; - } // case 10 - case 18: - { - nodeId_ = input.readStringRequireUtf8(); + break; + } // case 10 + case 18: { + nodeId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + input.readMessage( + getNodeFieldBuilder().getBuilder(), + extensionRegistry); - break; - } // case 18 - case 26: - { - input.readMessage(getNodeFieldBuilder().getBuilder(), extensionRegistry); + break; + } // case 26 + case 50: { + requestId_ = input.readStringRequireUtf8(); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -607,22 +628,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -631,23 +648,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -655,67 +669,54 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; @@ -723,20 +724,18 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { private java.lang.Object nodeId_ = ""; /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @return The nodeId. */ public java.lang.String getNodeId() { java.lang.Object ref = nodeId_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nodeId_ = s; return s; @@ -745,21 +744,20 @@ public java.lang.String getNodeId() { } } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @return The bytes for nodeId. */ - public com.google.protobuf.ByteString getNodeIdBytes() { + public com.google.protobuf.ByteString + getNodeIdBytes() { java.lang.Object ref = nodeId_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nodeId_ = b; return b; } else { @@ -767,61 +765,54 @@ public com.google.protobuf.ByteString getNodeIdBytes() { } } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @param value The nodeId to set. * @return This builder for chaining. */ - public Builder setNodeId(java.lang.String value) { + public Builder setNodeId( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nodeId_ = value; onChanged(); return this; } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @return This builder for chaining. */ public Builder clearNodeId() { - + nodeId_ = getDefaultInstance().getNodeId(); onChanged(); return this; } /** - * - * *
      * The unqualified resource name.
      * 
* * string node_id = 2; - * * @param value The bytes for nodeId to set. * @return This builder for chaining. */ - public Builder setNodeIdBytes(com.google.protobuf.ByteString value) { + public Builder setNodeIdBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nodeId_ = value; onChanged(); return this; @@ -829,35 +820,24 @@ public Builder setNodeIdBytes(com.google.protobuf.ByteString value) { private com.google.cloud.tpu.v2alpha1.Node node_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder> - nodeBuilder_; + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> nodeBuilder_; /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the node field is set. */ public boolean hasNode() { return nodeBuilder_ != null || node_ != null; } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; * @return The node. */ public com.google.cloud.tpu.v2alpha1.Node getNode() { @@ -868,14 +848,11 @@ public com.google.cloud.tpu.v2alpha1.Node getNode() { } } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setNode(com.google.cloud.tpu.v2alpha1.Node value) { if (nodeBuilder_ == null) { @@ -891,16 +868,14 @@ public Builder setNode(com.google.cloud.tpu.v2alpha1.Node value) { return this; } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ - public Builder setNode(com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { + public Builder setNode( + com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { if (nodeBuilder_ == null) { node_ = builderForValue.build(); onChanged(); @@ -911,20 +886,17 @@ public Builder setNode(com.google.cloud.tpu.v2alpha1.Node.Builder builderForValu return this; } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeNode(com.google.cloud.tpu.v2alpha1.Node value) { if (nodeBuilder_ == null) { if (node_ != null) { node_ = - com.google.cloud.tpu.v2alpha1.Node.newBuilder(node_).mergeFrom(value).buildPartial(); + com.google.cloud.tpu.v2alpha1.Node.newBuilder(node_).mergeFrom(value).buildPartial(); } else { node_ = value; } @@ -936,14 +908,11 @@ public Builder mergeNode(com.google.cloud.tpu.v2alpha1.Node value) { return this; } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearNode() { if (nodeBuilder_ == null) { @@ -957,66 +926,151 @@ public Builder clearNode() { return this; } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.cloud.tpu.v2alpha1.Node.Builder getNodeBuilder() { - + onChanged(); return getNodeFieldBuilder().getBuilder(); } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder() { if (nodeBuilder_ != null) { return nodeBuilder_.getMessageOrBuilder(); } else { - return node_ == null ? com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; + return node_ == null ? + com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; } } /** - * - * *
      * Required. The node.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder> + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> getNodeFieldBuilder() { if (nodeBuilder_ == null) { - nodeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder>( - getNode(), getParentForChildren(), isClean()); + nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder>( + getNode(), + getParentForChildren(), + isClean()); node_ = null; } return nodeBuilder_; } + private java.lang.Object requestId_ = ""; + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 6; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 6; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 6; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 6; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 6; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1026,12 +1080,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.CreateNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.CreateNodeRequest) private static final com.google.cloud.tpu.v2alpha1.CreateNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.CreateNodeRequest(); } @@ -1040,27 +1094,27 @@ public static com.google.cloud.tpu.v2alpha1.CreateNodeRequest getDefaultInstance return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1075,4 +1129,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.CreateNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequestOrBuilder.java similarity index 54% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequestOrBuilder.java index bdca5a4d9cef..0933cfaf4d4a 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateNodeRequestOrBuilder.java @@ -1,117 +1,96 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface CreateNodeRequestOrBuilder - extends +public interface CreateNodeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.CreateNodeRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The nodeId. */ java.lang.String getNodeId(); /** - * - * *
    * The unqualified resource name.
    * 
* * string node_id = 2; - * * @return The bytes for nodeId. */ - com.google.protobuf.ByteString getNodeIdBytes(); + com.google.protobuf.ByteString + getNodeIdBytes(); /** - * - * *
    * Required. The node.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the node field is set. */ boolean hasNode(); /** - * - * *
    * Required. The node.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; * @return The node. */ com.google.cloud.tpu.v2alpha1.Node getNode(); /** - * - * *
    * Required. The node.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; */ com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder(); + + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 6; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 6; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); } diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequest.java new file mode 100644 index 000000000000..8f4ceed36f32 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequest.java @@ -0,0 +1,1141 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * Request for [CreateQueuedResource][google.cloud.tpu.v2alpha1.Tpu.CreateQueuedResource].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest} + */ +public final class CreateQueuedResourceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) + CreateQueuedResourceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateQueuedResourceRequest.newBuilder() to construct. + private CreateQueuedResourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateQueuedResourceRequest() { + parent_ = ""; + queuedResourceId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateQueuedResourceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateQueuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateQueuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.class, com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUEUED_RESOURCE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object queuedResourceId_; + /** + *
+   * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+   * regex format.
+   * 
+ * + * string queued_resource_id = 2; + * @return The queuedResourceId. + */ + @java.lang.Override + public java.lang.String getQueuedResourceId() { + java.lang.Object ref = queuedResourceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queuedResourceId_ = s; + return s; + } + } + /** + *
+   * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+   * regex format.
+   * 
+ * + * string queued_resource_id = 2; + * @return The bytes for queuedResourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueuedResourceIdBytes() { + java.lang.Object ref = queuedResourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queuedResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUEUED_RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.tpu.v2alpha1.QueuedResource queuedResource_; + /** + *
+   * Required. The queued resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the queuedResource field is set. + */ + @java.lang.Override + public boolean hasQueuedResource() { + return queuedResource_ != null; + } + /** + *
+   * Required. The queued resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The queuedResource. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource getQueuedResource() { + return queuedResource_ == null ? com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance() : queuedResource_; + } + /** + *
+   * Required. The queued resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder getQueuedResourceOrBuilder() { + return getQueuedResource(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queuedResourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, queuedResourceId_); + } + if (queuedResource_ != null) { + output.writeMessage(3, getQueuedResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queuedResourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, queuedResourceId_); + } + if (queuedResource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getQueuedResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest other = (com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getQueuedResourceId() + .equals(other.getQueuedResourceId())) return false; + if (hasQueuedResource() != other.hasQueuedResource()) return false; + if (hasQueuedResource()) { + if (!getQueuedResource() + .equals(other.getQueuedResource())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + QUEUED_RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getQueuedResourceId().hashCode(); + if (hasQueuedResource()) { + hash = (37 * hash) + QUEUED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getQueuedResource().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [CreateQueuedResource][google.cloud.tpu.v2alpha1.Tpu.CreateQueuedResource].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateQueuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateQueuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.class, com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + queuedResourceId_ = ""; + + if (queuedResourceBuilder_ == null) { + queuedResource_ = null; + } else { + queuedResource_ = null; + queuedResourceBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_CreateQueuedResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest build() { + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest buildPartial() { + com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest result = new com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest(this); + result.parent_ = parent_; + result.queuedResourceId_ = queuedResourceId_; + if (queuedResourceBuilder_ == null) { + result.queuedResource_ = queuedResource_; + } else { + result.queuedResource_ = queuedResourceBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest other) { + if (other == com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getQueuedResourceId().isEmpty()) { + queuedResourceId_ = other.queuedResourceId_; + onChanged(); + } + if (other.hasQueuedResource()) { + mergeQueuedResource(other.getQueuedResource()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + queuedResourceId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + input.readMessage( + getQueuedResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object queuedResourceId_ = ""; + /** + *
+     * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+     * regex format.
+     * 
+ * + * string queued_resource_id = 2; + * @return The queuedResourceId. + */ + public java.lang.String getQueuedResourceId() { + java.lang.Object ref = queuedResourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queuedResourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+     * regex format.
+     * 
+ * + * string queued_resource_id = 2; + * @return The bytes for queuedResourceId. + */ + public com.google.protobuf.ByteString + getQueuedResourceIdBytes() { + java.lang.Object ref = queuedResourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queuedResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+     * regex format.
+     * 
+ * + * string queued_resource_id = 2; + * @param value The queuedResourceId to set. + * @return This builder for chaining. + */ + public Builder setQueuedResourceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + queuedResourceId_ = value; + onChanged(); + return this; + } + /** + *
+     * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+     * regex format.
+     * 
+ * + * string queued_resource_id = 2; + * @return This builder for chaining. + */ + public Builder clearQueuedResourceId() { + + queuedResourceId_ = getDefaultInstance().getQueuedResourceId(); + onChanged(); + return this; + } + /** + *
+     * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+     * regex format.
+     * 
+ * + * string queued_resource_id = 2; + * @param value The bytes for queuedResourceId to set. + * @return This builder for chaining. + */ + public Builder setQueuedResourceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + queuedResourceId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2alpha1.QueuedResource queuedResource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder> queuedResourceBuilder_; + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the queuedResource field is set. + */ + public boolean hasQueuedResource() { + return queuedResourceBuilder_ != null || queuedResource_ != null; + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The queuedResource. + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource getQueuedResource() { + if (queuedResourceBuilder_ == null) { + return queuedResource_ == null ? com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance() : queuedResource_; + } else { + return queuedResourceBuilder_.getMessage(); + } + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQueuedResource(com.google.cloud.tpu.v2alpha1.QueuedResource value) { + if (queuedResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queuedResource_ = value; + onChanged(); + } else { + queuedResourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQueuedResource( + com.google.cloud.tpu.v2alpha1.QueuedResource.Builder builderForValue) { + if (queuedResourceBuilder_ == null) { + queuedResource_ = builderForValue.build(); + onChanged(); + } else { + queuedResourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeQueuedResource(com.google.cloud.tpu.v2alpha1.QueuedResource value) { + if (queuedResourceBuilder_ == null) { + if (queuedResource_ != null) { + queuedResource_ = + com.google.cloud.tpu.v2alpha1.QueuedResource.newBuilder(queuedResource_).mergeFrom(value).buildPartial(); + } else { + queuedResource_ = value; + } + onChanged(); + } else { + queuedResourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearQueuedResource() { + if (queuedResourceBuilder_ == null) { + queuedResource_ = null; + onChanged(); + } else { + queuedResource_ = null; + queuedResourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Builder getQueuedResourceBuilder() { + + onChanged(); + return getQueuedResourceFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder getQueuedResourceOrBuilder() { + if (queuedResourceBuilder_ != null) { + return queuedResourceBuilder_.getMessageOrBuilder(); + } else { + return queuedResource_ == null ? + com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance() : queuedResource_; + } + } + /** + *
+     * Required. The queued resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder> + getQueuedResourceFieldBuilder() { + if (queuedResourceBuilder_ == null) { + queuedResourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder>( + getQueuedResource(), + getParentForChildren(), + isClean()); + queuedResource_ = null; + } + return queuedResourceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) + private static final com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest(); + } + + public static com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateQueuedResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequestOrBuilder.java new file mode 100644 index 000000000000..2a64d2b7ed8a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/CreateQueuedResourceRequestOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface CreateQueuedResourceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+   * regex format.
+   * 
+ * + * string queued_resource_id = 2; + * @return The queuedResourceId. + */ + java.lang.String getQueuedResourceId(); + /** + *
+   * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+   * regex format.
+   * 
+ * + * string queued_resource_id = 2; + * @return The bytes for queuedResourceId. + */ + com.google.protobuf.ByteString + getQueuedResourceIdBytes(); + + /** + *
+   * Required. The queued resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the queuedResource field is set. + */ + boolean hasQueuedResource(); + /** + *
+   * Required. The queued resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The queuedResource. + */ + com.google.cloud.tpu.v2alpha1.QueuedResource getQueuedResource(); + /** + *
+   * Required. The queued resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource queued_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder getQueuedResourceOrBuilder(); + + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequest.java similarity index 52% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequest.java index f3bf6d5c885c..82aa632bb00d 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequest.java @@ -1,85 +1,62 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Request for [DeleteNode][google.cloud.tpu.v2alpha1.Tpu.DeleteNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.DeleteNodeRequest} */ -public final class DeleteNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class DeleteNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.DeleteNodeRequest) DeleteNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use DeleteNodeRequest.newBuilder() to construct. private DeleteNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteNodeRequest() { name_ = ""; + requestId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new DeleteNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.class, - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.class, com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -88,31 +65,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -120,8 +95,53 @@ public com.google.protobuf.ByteString getNameBytes() { } } - private byte memoizedIsInitialized = -1; + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -133,10 +153,14 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } getUnknownFields().writeTo(output); } @@ -149,6 +173,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -157,15 +184,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.DeleteNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest other = - (com.google.cloud.tpu.v2alpha1.DeleteNodeRequest) obj; + com.google.cloud.tpu.v2alpha1.DeleteNodeRequest other = (com.google.cloud.tpu.v2alpha1.DeleteNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -179,153 +208,151 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.DeleteNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [DeleteNode][google.cloud.tpu.v2alpha1.Tpu.DeleteNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.DeleteNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.DeleteNodeRequest) com.google.cloud.tpu.v2alpha1.DeleteNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.class, - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.class, com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; + requestId_ = ""; + return this; } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteNodeRequest_descriptor; } @java.lang.Override @@ -344,9 +371,9 @@ public com.google.cloud.tpu.v2alpha1.DeleteNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.DeleteNodeRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.DeleteNodeRequest result = - new com.google.cloud.tpu.v2alpha1.DeleteNodeRequest(this); + com.google.cloud.tpu.v2alpha1.DeleteNodeRequest result = new com.google.cloud.tpu.v2alpha1.DeleteNodeRequest(this); result.name_ = name_; + result.requestId_ = requestId_; onBuilt(); return result; } @@ -355,39 +382,38 @@ public com.google.cloud.tpu.v2alpha1.DeleteNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.DeleteNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.DeleteNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.DeleteNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -395,12 +421,15 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.DeleteNodeRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.DeleteNodeRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -427,19 +456,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -452,22 +484,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -476,23 +504,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -500,74 +525,157 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } + private java.lang.Object requestId_ = ""; + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -577,12 +685,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.DeleteNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.DeleteNodeRequest) private static final com.google.cloud.tpu.v2alpha1.DeleteNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.DeleteNodeRequest(); } @@ -591,27 +699,27 @@ public static com.google.cloud.tpu.v2alpha1.DeleteNodeRequest getDefaultInstance return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -626,4 +734,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.DeleteNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequestOrBuilder.java new file mode 100644 index 000000000000..731cf96d28f6 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteNodeRequestOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface DeleteNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.DeleteNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequest.java new file mode 100644 index 000000000000..a52f1163da42 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequest.java @@ -0,0 +1,739 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * Request for [DeleteQueuedResource][google.cloud.tpu.v2alpha1.Tpu.DeleteQueuedResource].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest} + */ +public final class DeleteQueuedResourceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) + DeleteQueuedResourceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteQueuedResourceRequest.newBuilder() to construct. + private DeleteQueuedResourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteQueuedResourceRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteQueuedResourceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteQueuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteQueuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.class, com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest other = (com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [DeleteQueuedResource][google.cloud.tpu.v2alpha1.Tpu.DeleteQueuedResource].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteQueuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteQueuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.class, com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_DeleteQueuedResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest build() { + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest buildPartial() { + com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest result = new com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest other) { + if (other == com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) + private static final com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest(); + } + + public static com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteQueuedResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequestOrBuilder.java new file mode 100644 index 000000000000..3e6be93c1cc1 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/DeleteQueuedResourceRequestOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface DeleteQueuedResourceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequest.java similarity index 59% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequest.java index 7ce9f18f94d0..589c67e98708 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequest.java @@ -1,87 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Request for
- * [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
+ * Request for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest} */ -public final class GenerateServiceIdentityRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GenerateServiceIdentityRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) GenerateServiceIdentityRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GenerateServiceIdentityRequest.newBuilder() to construct. - private GenerateServiceIdentityRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GenerateServiceIdentityRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GenerateServiceIdentityRequest() { parent_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GenerateServiceIdentityRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.class, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.class, com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -90,31 +64,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -123,7 +95,6 @@ public com.google.protobuf.ByteString getParentBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -135,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -159,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest other = - (com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) obj; + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest other = (com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) obj; - if (!getParent().equals(other.getParent())) return false; + if (!getParent() + .equals(other.getParent())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -187,137 +159,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Request for
-   * [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
+   * Request for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.class, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.class, com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -327,14 +291,13 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityRequest_descriptor; } @java.lang.Override - public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest - getDefaultInstanceForType() { + public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest getDefaultInstanceForType() { return com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.getDefaultInstance(); } @@ -349,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest result = - new com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest(this); + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest result = new com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest(this); result.parent_ = parent_; onBuilt(); return result; @@ -360,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest buildPartial public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest)other); } else { super.mergeFrom(other); return this; @@ -400,9 +361,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest other) { - if (other - == com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -433,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -458,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -482,23 +435,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -506,74 +456,61 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -583,13 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) - private static final com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest - DEFAULT_INSTANCE; - + private static final com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest(); } @@ -598,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest getDe return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GenerateServiceIdentityRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateServiceIdentityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -633,4 +569,6 @@ public com.google.protobuf.Parser getParserForTy public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java new file mode 100644 index 000000000000..d8435479991d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface GenerateServiceIdentityRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponse.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponse.java similarity index 64% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponse.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponse.java index 2addba1f4403..a05fb56362d2 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponse.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponse.java @@ -1,83 +1,60 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Response for
- * [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
+ * Response for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse} */ -public final class GenerateServiceIdentityResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GenerateServiceIdentityResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) GenerateServiceIdentityResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GenerateServiceIdentityResponse.newBuilder() to construct. - private GenerateServiceIdentityResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GenerateServiceIdentityResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - - private GenerateServiceIdentityResponse() {} + private GenerateServiceIdentityResponse() { + } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GenerateServiceIdentityResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.class, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.class, com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.Builder.class); } public static final int IDENTITY_FIELD_NUMBER = 1; private com.google.cloud.tpu.v2alpha1.ServiceIdentity identity_; /** - * - * *
    * ServiceIdentity that was created or retrieved.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; - * * @return Whether the identity field is set. */ @java.lang.Override @@ -85,25 +62,18 @@ public boolean hasIdentity() { return identity_ != null; } /** - * - * *
    * ServiceIdentity that was created or retrieved.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; - * * @return The identity. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.ServiceIdentity getIdentity() { - return identity_ == null - ? com.google.cloud.tpu.v2alpha1.ServiceIdentity.getDefaultInstance() - : identity_; + return identity_ == null ? com.google.cloud.tpu.v2alpha1.ServiceIdentity.getDefaultInstance() : identity_; } /** - * - * *
    * ServiceIdentity that was created or retrieved.
    * 
@@ -116,7 +86,6 @@ public com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder getIdentityOrBuild } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -128,7 +97,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (identity_ != null) { output.writeMessage(1, getIdentity()); } @@ -142,7 +112,8 @@ public int getSerializedSize() { size = 0; if (identity_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIdentity()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getIdentity()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -152,17 +123,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse other = - (com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) obj; + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse other = (com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) obj; if (hasIdentity() != other.hasIdentity()) return false; if (hasIdentity()) { - if (!getIdentity().equals(other.getIdentity())) return false; + if (!getIdentity() + .equals(other.getIdentity())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -185,137 +156,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Response for
-   * [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
+   * Response for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.class, - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.class, com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -329,14 +292,13 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GenerateServiceIdentityResponse_descriptor; } @java.lang.Override - public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse - getDefaultInstanceForType() { + public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse getDefaultInstanceForType() { return com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.getDefaultInstance(); } @@ -351,8 +313,7 @@ public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse buildPartial() { - com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse result = - new com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse(this); + com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse result = new com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse(this); if (identityBuilder_ == null) { result.identity_ = identity_; } else { @@ -366,39 +327,38 @@ public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse buildPartia public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse)other); } else { super.mergeFrom(other); return this; @@ -406,9 +366,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse other) { - if (other - == com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse.getDefaultInstance()) return this; if (other.hasIdentity()) { mergeIdentity(other.getIdentity()); } @@ -438,19 +396,19 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - input.readMessage(getIdentityFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + input.readMessage( + getIdentityFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -463,47 +421,34 @@ public Builder mergeFrom( private com.google.cloud.tpu.v2alpha1.ServiceIdentity identity_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.ServiceIdentity, - com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder, - com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder> - identityBuilder_; + com.google.cloud.tpu.v2alpha1.ServiceIdentity, com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder, com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder> identityBuilder_; /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
* * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; - * * @return Whether the identity field is set. */ public boolean hasIdentity() { return identityBuilder_ != null || identity_ != null; } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
* * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; - * * @return The identity. */ public com.google.cloud.tpu.v2alpha1.ServiceIdentity getIdentity() { if (identityBuilder_ == null) { - return identity_ == null - ? com.google.cloud.tpu.v2alpha1.ServiceIdentity.getDefaultInstance() - : identity_; + return identity_ == null ? com.google.cloud.tpu.v2alpha1.ServiceIdentity.getDefaultInstance() : identity_; } else { return identityBuilder_.getMessage(); } } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
@@ -524,8 +469,6 @@ public Builder setIdentity(com.google.cloud.tpu.v2alpha1.ServiceIdentity value) return this; } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
@@ -544,8 +487,6 @@ public Builder setIdentity( return this; } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
@@ -556,9 +497,7 @@ public Builder mergeIdentity(com.google.cloud.tpu.v2alpha1.ServiceIdentity value if (identityBuilder_ == null) { if (identity_ != null) { identity_ = - com.google.cloud.tpu.v2alpha1.ServiceIdentity.newBuilder(identity_) - .mergeFrom(value) - .buildPartial(); + com.google.cloud.tpu.v2alpha1.ServiceIdentity.newBuilder(identity_).mergeFrom(value).buildPartial(); } else { identity_ = value; } @@ -570,8 +509,6 @@ public Builder mergeIdentity(com.google.cloud.tpu.v2alpha1.ServiceIdentity value return this; } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
@@ -590,8 +527,6 @@ public Builder clearIdentity() { return this; } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
@@ -599,13 +534,11 @@ public Builder clearIdentity() { * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; */ public com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder getIdentityBuilder() { - + onChanged(); return getIdentityFieldBuilder().getBuilder(); } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
@@ -616,14 +549,11 @@ public com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder getIdentityOrBuild if (identityBuilder_ != null) { return identityBuilder_.getMessageOrBuilder(); } else { - return identity_ == null - ? com.google.cloud.tpu.v2alpha1.ServiceIdentity.getDefaultInstance() - : identity_; + return identity_ == null ? + com.google.cloud.tpu.v2alpha1.ServiceIdentity.getDefaultInstance() : identity_; } } /** - * - * *
      * ServiceIdentity that was created or retrieved.
      * 
@@ -631,24 +561,21 @@ public com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder getIdentityOrBuild * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.ServiceIdentity, - com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder, - com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder> + com.google.cloud.tpu.v2alpha1.ServiceIdentity, com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder, com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder> getIdentityFieldBuilder() { if (identityBuilder_ == null) { - identityBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.ServiceIdentity, - com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder, - com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder>( - getIdentity(), getParentForChildren(), isClean()); + identityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.ServiceIdentity, com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder, com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder>( + getIdentity(), + getParentForChildren(), + isClean()); identity_ = null; } return identityBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -658,13 +585,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) - private static final com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse - DEFAULT_INSTANCE; - + private static final com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse(); } @@ -673,27 +599,27 @@ public static com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse getD return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GenerateServiceIdentityResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateServiceIdentityResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -708,4 +634,6 @@ public com.google.protobuf.Parser getParserForT public com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponseOrBuilder.java similarity index 59% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponseOrBuilder.java index f6187e11e0a6..60569c6ed088 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GenerateServiceIdentityResponseOrBuilder.java @@ -1,55 +1,31 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface GenerateServiceIdentityResponseOrBuilder - extends +public interface GenerateServiceIdentityResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * ServiceIdentity that was created or retrieved.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; - * * @return Whether the identity field is set. */ boolean hasIdentity(); /** - * - * *
    * ServiceIdentity that was created or retrieved.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceIdentity identity = 1; - * * @return The identity. */ com.google.cloud.tpu.v2alpha1.ServiceIdentity getIdentity(); /** - * - * *
    * ServiceIdentity that was created or retrieved.
    * 
diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequest.java similarity index 60% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequest.java index 0ea8f88362a0..20111eb92684 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequest.java @@ -1,86 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Request for
- * [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType].
+ * Request for [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest} */ -public final class GetAcceleratorTypeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetAcceleratorTypeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) GetAcceleratorTypeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetAcceleratorTypeRequest.newBuilder() to construct. private GetAcceleratorTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetAcceleratorTypeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetAcceleratorTypeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.class, - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.class, com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -89,31 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -122,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -134,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -158,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest other = - (com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) obj; + com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest other = (com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -186,137 +159,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Request for
-   * [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType].
+   * Request for [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.class, - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.class, com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -326,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetAcceleratorTypeRequest_descriptor; } @java.lang.Override @@ -347,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest result = - new com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest(this); + com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest result = new com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -358,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest)other); } else { super.mergeFrom(other); return this; @@ -398,8 +361,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); @@ -430,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -455,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -479,23 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -503,74 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -580,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) private static final com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest(); } @@ -594,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest getDefault return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAcceleratorTypeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAcceleratorTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -629,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() public com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java new file mode 100644 index 000000000000..a52d77c225d3 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetAcceleratorTypeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface GetAcceleratorTypeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequest.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequest.java index 116002d7c025..3d0abd8def4f 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequest.java @@ -1,43 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Request for
- * [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
+ * Request for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetGuestAttributesRequest} */ -public final class GetGuestAttributesRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetGuestAttributesRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) GetGuestAttributesRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetGuestAttributesRequest.newBuilder() to construct. private GetGuestAttributesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetGuestAttributesRequest() { name_ = ""; queryPath_ = ""; @@ -46,43 +27,37 @@ private GetGuestAttributesRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetGuestAttributesRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.class, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.class, com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -91,31 +66,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -126,14 +99,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int QUERY_PATH_FIELD_NUMBER = 2; private volatile java.lang.Object queryPath_; /** - * - * *
    * The guest attributes path to be queried.
    * 
* * string query_path = 2; - * * @return The queryPath. */ @java.lang.Override @@ -142,29 +112,29 @@ public java.lang.String getQueryPath() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queryPath_ = s; return s; } } /** - * - * *
    * The guest attributes path to be queried.
    * 
* * string query_path = 2; - * * @return The bytes for queryPath. */ @java.lang.Override - public com.google.protobuf.ByteString getQueryPathBytes() { + public com.google.protobuf.ByteString + getQueryPathBytes() { java.lang.Object ref = queryPath_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); queryPath_ = b; return b; } else { @@ -175,45 +145,37 @@ public com.google.protobuf.ByteString getQueryPathBytes() { public static final int WORKER_IDS_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList workerIds_; /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @return A list containing the workerIds. */ - public com.google.protobuf.ProtocolStringList getWorkerIdsList() { + public com.google.protobuf.ProtocolStringList + getWorkerIdsList() { return workerIds_; } /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @return The count of workerIds. */ public int getWorkerIdsCount() { return workerIds_.size(); } /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @param index The index of the element to return. * @return The workerIds at the given index. */ @@ -221,24 +183,21 @@ public java.lang.String getWorkerIds(int index) { return workerIds_.get(index); } /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @param index The index of the value to return. * @return The bytes of the workerIds at the given index. */ - public com.google.protobuf.ByteString getWorkerIdsBytes(int index) { + public com.google.protobuf.ByteString + getWorkerIdsBytes(int index) { return workerIds_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -250,7 +209,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -291,17 +251,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest other = - (com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) obj; + com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest other = (com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) obj; - if (!getName().equals(other.getName())) return false; - if (!getQueryPath().equals(other.getQueryPath())) return false; - if (!getWorkerIdsList().equals(other.getWorkerIdsList())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getQueryPath() + .equals(other.getQueryPath())) return false; + if (!getWorkerIdsList() + .equals(other.getWorkerIdsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,137 +289,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Request for
-   * [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
+   * Request for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetGuestAttributesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.class, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.class, com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -471,9 +425,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesRequest_descriptor; } @java.lang.Override @@ -492,8 +446,7 @@ public com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest result = - new com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest(this); + com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest result = new com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest(this); int from_bitField0_ = bitField0_; result.name_ = name_; result.queryPath_ = queryPath_; @@ -510,39 +463,38 @@ public com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest)other); } else { super.mergeFrom(other); return this; @@ -550,8 +502,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); @@ -596,32 +547,28 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); + case 10: { + name_ = input.readStringRequireUtf8(); - break; - } // case 10 - case 18: - { - queryPath_ = input.readStringRequireUtf8(); + break; + } // case 10 + case 18: { + queryPath_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureWorkerIdsIsMutable(); - workerIds_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureWorkerIdsIsMutable(); + workerIds_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -631,27 +578,22 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -660,23 +602,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -684,67 +623,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -752,20 +678,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object queryPath_ = ""; /** - * - * *
      * The guest attributes path to be queried.
      * 
* * string query_path = 2; - * * @return The queryPath. */ public java.lang.String getQueryPath() { java.lang.Object ref = queryPath_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queryPath_ = s; return s; @@ -774,21 +698,20 @@ public java.lang.String getQueryPath() { } } /** - * - * *
      * The guest attributes path to be queried.
      * 
* * string query_path = 2; - * * @return The bytes for queryPath. */ - public com.google.protobuf.ByteString getQueryPathBytes() { + public com.google.protobuf.ByteString + getQueryPathBytes() { java.lang.Object ref = queryPath_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); queryPath_ = b; return b; } else { @@ -796,115 +719,98 @@ public com.google.protobuf.ByteString getQueryPathBytes() { } } /** - * - * *
      * The guest attributes path to be queried.
      * 
* * string query_path = 2; - * * @param value The queryPath to set. * @return This builder for chaining. */ - public Builder setQueryPath(java.lang.String value) { + public Builder setQueryPath( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + queryPath_ = value; onChanged(); return this; } /** - * - * *
      * The guest attributes path to be queried.
      * 
* * string query_path = 2; - * * @return This builder for chaining. */ public Builder clearQueryPath() { - + queryPath_ = getDefaultInstance().getQueryPath(); onChanged(); return this; } /** - * - * *
      * The guest attributes path to be queried.
      * 
* * string query_path = 2; - * * @param value The bytes for queryPath to set. * @return This builder for chaining. */ - public Builder setQueryPathBytes(com.google.protobuf.ByteString value) { + public Builder setQueryPathBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryPath_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList workerIds_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureWorkerIdsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { workerIds_ = new com.google.protobuf.LazyStringArrayList(workerIds_); bitField0_ |= 0x00000001; - } + } } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @return A list containing the workerIds. */ - public com.google.protobuf.ProtocolStringList getWorkerIdsList() { + public com.google.protobuf.ProtocolStringList + getWorkerIdsList() { return workerIds_.getUnmodifiableView(); } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @return The count of workerIds. */ public int getWorkerIdsCount() { return workerIds_.size(); } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @param index The index of the element to return. * @return The workerIds at the given index. */ @@ -912,95 +818,85 @@ public java.lang.String getWorkerIds(int index) { return workerIds_.get(index); } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @param index The index of the value to return. * @return The bytes of the workerIds at the given index. */ - public com.google.protobuf.ByteString getWorkerIdsBytes(int index) { + public com.google.protobuf.ByteString + getWorkerIdsBytes(int index) { return workerIds_.getByteString(index); } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @param index The index to set the value at. * @param value The workerIds to set. * @return This builder for chaining. */ - public Builder setWorkerIds(int index, java.lang.String value) { + public Builder setWorkerIds( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureWorkerIdsIsMutable(); + throw new NullPointerException(); + } + ensureWorkerIdsIsMutable(); workerIds_.set(index, value); onChanged(); return this; } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @param value The workerIds to add. * @return This builder for chaining. */ - public Builder addWorkerIds(java.lang.String value) { + public Builder addWorkerIds( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureWorkerIdsIsMutable(); + throw new NullPointerException(); + } + ensureWorkerIdsIsMutable(); workerIds_.add(value); onChanged(); return this; } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @param values The workerIds to add. * @return This builder for chaining. */ - public Builder addAllWorkerIds(java.lang.Iterable values) { + public Builder addAllWorkerIds( + java.lang.Iterable values) { ensureWorkerIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, workerIds_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, workerIds_); onChanged(); return this; } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @return This builder for chaining. */ public Builder clearWorkerIds() { @@ -1010,31 +906,29 @@ public Builder clearWorkerIds() { return this; } /** - * - * *
      * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
      * returned.
      * 
* * repeated string worker_ids = 3; - * * @param value The bytes of the workerIds to add. * @return This builder for chaining. */ - public Builder addWorkerIdsBytes(com.google.protobuf.ByteString value) { + public Builder addWorkerIdsBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureWorkerIdsIsMutable(); workerIds_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1044,12 +938,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) private static final com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest(); } @@ -1058,27 +952,27 @@ public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest getDefault return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetGuestAttributesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGuestAttributesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1093,4 +987,6 @@ public com.google.protobuf.Parser getParserForType() public com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequestOrBuilder.java similarity index 61% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequestOrBuilder.java index 27f8fc2ae1d0..aef6790d7f31 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesRequestOrBuilder.java @@ -1,134 +1,94 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface GetGuestAttributesRequestOrBuilder - extends +public interface GetGuestAttributesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetGuestAttributesRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ java.lang.String getName(); /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString + getNameBytes(); /** - * - * *
    * The guest attributes path to be queried.
    * 
* * string query_path = 2; - * * @return The queryPath. */ java.lang.String getQueryPath(); /** - * - * *
    * The guest attributes path to be queried.
    * 
* * string query_path = 2; - * * @return The bytes for queryPath. */ - com.google.protobuf.ByteString getQueryPathBytes(); + com.google.protobuf.ByteString + getQueryPathBytes(); /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @return A list containing the workerIds. */ - java.util.List getWorkerIdsList(); + java.util.List + getWorkerIdsList(); /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @return The count of workerIds. */ int getWorkerIdsCount(); /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @param index The index of the element to return. * @return The workerIds at the given index. */ java.lang.String getWorkerIds(int index); /** - * - * *
    * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be
    * returned.
    * 
* * repeated string worker_ids = 3; - * * @param index The index of the value to return. * @return The bytes of the workerIds at the given index. */ - com.google.protobuf.ByteString getWorkerIdsBytes(int index); + com.google.protobuf.ByteString + getWorkerIdsBytes(int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponse.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponse.java similarity index 71% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponse.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponse.java index c8fdd1ac7bda..79b0fdf5487e 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponse.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponse.java @@ -1,78 +1,56 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Response for
- * [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
+ * Response for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetGuestAttributesResponse} */ -public final class GetGuestAttributesResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetGuestAttributesResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) GetGuestAttributesResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetGuestAttributesResponse.newBuilder() to construct. private GetGuestAttributesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetGuestAttributesResponse() { guestAttributes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetGuestAttributesResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.class, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.class, com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.Builder.class); } public static final int GUEST_ATTRIBUTES_FIELD_NUMBER = 1; private java.util.List guestAttributes_; /** - * - * *
    * The guest attributes for the TPU workers.
    * 
@@ -84,8 +62,6 @@ public java.util.List getGuestAtt return guestAttributes_; } /** - * - * *
    * The guest attributes for the TPU workers.
    * 
@@ -93,13 +69,11 @@ public java.util.List getGuestAtt * repeated .google.cloud.tpu.v2alpha1.GuestAttributes guest_attributes = 1; */ @java.lang.Override - public java.util.List + public java.util.List getGuestAttributesOrBuilderList() { return guestAttributes_; } /** - * - * *
    * The guest attributes for the TPU workers.
    * 
@@ -111,8 +85,6 @@ public int getGuestAttributesCount() { return guestAttributes_.size(); } /** - * - * *
    * The guest attributes for the TPU workers.
    * 
@@ -124,8 +96,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes getGuestAttributes(int inde return guestAttributes_.get(index); } /** - * - * *
    * The guest attributes for the TPU workers.
    * 
@@ -139,7 +109,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder getGuestAttributes } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -151,7 +120,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < guestAttributes_.size(); i++) { output.writeMessage(1, guestAttributes_.get(i)); } @@ -165,7 +135,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < guestAttributes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, guestAttributes_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, guestAttributes_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -175,15 +146,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse other = - (com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) obj; + com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse other = (com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) obj; - if (!getGuestAttributesList().equals(other.getGuestAttributesList())) return false; + if (!getGuestAttributesList() + .equals(other.getGuestAttributesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -205,137 +176,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Response for
-   * [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
+   * Response for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetGuestAttributesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.class, - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.class, com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -350,9 +313,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetGuestAttributesResponse_descriptor; } @java.lang.Override @@ -371,8 +334,7 @@ public com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse buildPartial() { - com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse result = - new com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse(this); + com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse result = new com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse(this); int from_bitField0_ = bitField0_; if (guestAttributesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -391,39 +353,38 @@ public com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse)other); } else { super.mergeFrom(other); return this; @@ -431,8 +392,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse other) { - if (other == com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse.getDefaultInstance()) return this; if (guestAttributesBuilder_ == null) { if (!other.guestAttributes_.isEmpty()) { if (guestAttributes_.isEmpty()) { @@ -451,10 +411,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GetGuestAttributesRespons guestAttributesBuilder_ = null; guestAttributes_ = other.guestAttributes_; bitField0_ = (bitField0_ & ~0x00000001); - guestAttributesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getGuestAttributesFieldBuilder() - : null; + guestAttributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGuestAttributesFieldBuilder() : null; } else { guestAttributesBuilder_.addAllMessages(other.guestAttributes_); } @@ -486,26 +445,25 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v2alpha1.GuestAttributes m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.GuestAttributes.parser(), extensionRegistry); - if (guestAttributesBuilder_ == null) { - ensureGuestAttributesIsMutable(); - guestAttributes_.add(m); - } else { - guestAttributesBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + com.google.cloud.tpu.v2alpha1.GuestAttributes m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.GuestAttributes.parser(), + extensionRegistry); + if (guestAttributesBuilder_ == null) { + ensureGuestAttributesIsMutable(); + guestAttributes_.add(m); + } else { + guestAttributesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -515,30 +473,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.util.List guestAttributes_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureGuestAttributesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - guestAttributes_ = - new java.util.ArrayList( - guestAttributes_); + guestAttributes_ = new java.util.ArrayList(guestAttributes_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributes, - com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder> - guestAttributesBuilder_; + com.google.cloud.tpu.v2alpha1.GuestAttributes, com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder> guestAttributesBuilder_; /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -553,8 +502,6 @@ public java.util.List getGuestAtt } } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -569,8 +516,6 @@ public int getGuestAttributesCount() { } } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -585,8 +530,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes getGuestAttributes(int inde } } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -608,8 +551,6 @@ public Builder setGuestAttributes( return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -628,8 +569,6 @@ public Builder setGuestAttributes( return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -650,8 +589,6 @@ public Builder addGuestAttributes(com.google.cloud.tpu.v2alpha1.GuestAttributes return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -673,8 +610,6 @@ public Builder addGuestAttributes( return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -693,8 +628,6 @@ public Builder addGuestAttributes( return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -713,8 +646,6 @@ public Builder addGuestAttributes( return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -725,7 +656,8 @@ public Builder addAllGuestAttributes( java.lang.Iterable values) { if (guestAttributesBuilder_ == null) { ensureGuestAttributesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestAttributes_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, guestAttributes_); onChanged(); } else { guestAttributesBuilder_.addAllMessages(values); @@ -733,8 +665,6 @@ public Builder addAllGuestAttributes( return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -752,8 +682,6 @@ public Builder clearGuestAttributes() { return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -771,8 +699,6 @@ public Builder removeGuestAttributes(int index) { return this; } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -784,8 +710,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder getGuestAttributesB return getGuestAttributesFieldBuilder().getBuilder(index); } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -795,22 +719,19 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder getGuestAttributesB public com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder getGuestAttributesOrBuilder( int index) { if (guestAttributesBuilder_ == null) { - return guestAttributes_.get(index); - } else { + return guestAttributes_.get(index); } else { return guestAttributesBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributes guest_attributes = 1; */ - public java.util.List - getGuestAttributesOrBuilderList() { + public java.util.List + getGuestAttributesOrBuilderList() { if (guestAttributesBuilder_ != null) { return guestAttributesBuilder_.getMessageOrBuilderList(); } else { @@ -818,8 +739,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder getGuestAttributes } } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -827,12 +746,10 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder getGuestAttributes * repeated .google.cloud.tpu.v2alpha1.GuestAttributes guest_attributes = 1; */ public com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder addGuestAttributesBuilder() { - return getGuestAttributesFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.GuestAttributes.getDefaultInstance()); + return getGuestAttributesFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.GuestAttributes.getDefaultInstance()); } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
@@ -841,34 +758,26 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder addGuestAttributesB */ public com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder addGuestAttributesBuilder( int index) { - return getGuestAttributesFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v2alpha1.GuestAttributes.getDefaultInstance()); + return getGuestAttributesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.GuestAttributes.getDefaultInstance()); } /** - * - * *
      * The guest attributes for the TPU workers.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributes guest_attributes = 1; */ - public java.util.List - getGuestAttributesBuilderList() { + public java.util.List + getGuestAttributesBuilderList() { return getGuestAttributesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributes, - com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder> + com.google.cloud.tpu.v2alpha1.GuestAttributes, com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder> getGuestAttributesFieldBuilder() { if (guestAttributesBuilder_ == null) { - guestAttributesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributes, - com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder>( + guestAttributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.GuestAttributes, com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder>( guestAttributes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -877,9 +786,9 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder addGuestAttributesB } return guestAttributesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -889,12 +798,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) private static final com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse(); } @@ -903,27 +812,27 @@ public static com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse getDefaul return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetGuestAttributesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGuestAttributesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -938,4 +847,6 @@ public com.google.protobuf.Parser getParserForType() public com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponseOrBuilder.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponseOrBuilder.java index cdfa7425d3e8..34ae4e22da30 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetGuestAttributesResponseOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface GetGuestAttributesResponseOrBuilder - extends +public interface GetGuestAttributesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetGuestAttributesResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The guest attributes for the TPU workers.
    * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributes guest_attributes = 1; */ - java.util.List getGuestAttributesList(); + java.util.List + getGuestAttributesList(); /** - * - * *
    * The guest attributes for the TPU workers.
    * 
@@ -44,8 +25,6 @@ public interface GetGuestAttributesResponseOrBuilder */ com.google.cloud.tpu.v2alpha1.GuestAttributes getGuestAttributes(int index); /** - * - * *
    * The guest attributes for the TPU workers.
    * 
@@ -54,24 +33,21 @@ public interface GetGuestAttributesResponseOrBuilder */ int getGuestAttributesCount(); /** - * - * *
    * The guest attributes for the TPU workers.
    * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributes guest_attributes = 1; */ - java.util.List + java.util.List getGuestAttributesOrBuilderList(); /** - * - * *
    * The guest attributes for the TPU workers.
    * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributes guest_attributes = 1; */ - com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder getGuestAttributesOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder getGuestAttributesOrBuilder( + int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequest.java similarity index 61% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequest.java index 83488aaf27c0..1ccfbd7a1f82 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequest.java @@ -1,85 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Request for [GetNode][google.cloud.tpu.v2alpha1.Tpu.GetNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetNodeRequest} */ -public final class GetNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GetNodeRequest) GetNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetNodeRequest.newBuilder() to construct. private GetNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetNodeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetNodeRequest.class, - com.google.cloud.tpu.v2alpha1.GetNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetNodeRequest.class, com.google.cloud.tpu.v2alpha1.GetNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -88,31 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -121,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -133,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -157,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GetNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GetNodeRequest other = - (com.google.cloud.tpu.v2alpha1.GetNodeRequest) obj; + com.google.cloud.tpu.v2alpha1.GetNodeRequest other = (com.google.cloud.tpu.v2alpha1.GetNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -184,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GetNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [GetNode][google.cloud.tpu.v2alpha1.Tpu.GetNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GetNodeRequest) com.google.cloud.tpu.v2alpha1.GetNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetNodeRequest.class, - com.google.cloud.tpu.v2alpha1.GetNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetNodeRequest.class, com.google.cloud.tpu.v2alpha1.GetNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GetNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -323,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetNodeRequest_descriptor; } @java.lang.Override @@ -344,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.GetNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GetNodeRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.GetNodeRequest result = - new com.google.cloud.tpu.v2alpha1.GetNodeRequest(this); + com.google.cloud.tpu.v2alpha1.GetNodeRequest result = new com.google.cloud.tpu.v2alpha1.GetNodeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -355,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.GetNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GetNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GetNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GetNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -426,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -451,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -475,23 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -499,74 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -576,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GetNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GetNodeRequest) private static final com.google.cloud.tpu.v2alpha1.GetNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GetNodeRequest(); } @@ -590,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.GetNodeRequest getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -625,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.GetNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java new file mode 100644 index 000000000000..4374797464d5 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface GetNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequest.java new file mode 100644 index 000000000000..1eb80ca1c928 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequest.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * Request for [GetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.GetQueuedResource]
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.GetQueuedResourceRequest} + */ +public final class GetQueuedResourceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) + GetQueuedResourceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetQueuedResourceRequest.newBuilder() to construct. + private GetQueuedResourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetQueuedResourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetQueuedResourceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetQueuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetQueuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.class, com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest other = (com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [GetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.GetQueuedResource]
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.GetQueuedResourceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetQueuedResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetQueuedResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.class, com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetQueuedResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest build() { + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest buildPartial() { + com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest result = new com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest other) { + if (other == com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) + private static final com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest(); + } + + public static com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetQueuedResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequestOrBuilder.java new file mode 100644 index 000000000000..d0dbed79514d --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetQueuedResourceRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface GetQueuedResourceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetQueuedResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequest.java similarity index 60% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequest.java index 121a75455b0a..20573f130cc7 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequest.java @@ -1,86 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Request for
- * [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion].
+ * Request for [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest} */ -public final class GetRuntimeVersionRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GetRuntimeVersionRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) GetRuntimeVersionRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GetRuntimeVersionRequest.newBuilder() to construct. private GetRuntimeVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetRuntimeVersionRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GetRuntimeVersionRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.class, - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.class, com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -89,31 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Required. The resource name.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -122,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -134,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -158,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest other = - (com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) obj; + com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest other = (com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -186,137 +159,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Request for
-   * [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion].
+   * Request for [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.class, - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.class, com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -326,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GetRuntimeVersionRequest_descriptor; } @java.lang.Override @@ -347,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest result = - new com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest(this); + com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest result = new com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest(this); result.name_ = name_; onBuilt(); return result; @@ -358,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest)other); } else { super.mergeFrom(other); return this; @@ -398,8 +361,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); @@ -430,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -455,22 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -479,23 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -503,74 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Required. The resource name.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -580,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) private static final com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest(); } @@ -594,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest getDefaultI return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetRuntimeVersionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRuntimeVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -629,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java new file mode 100644 index 000000000000..e5e3a11c3528 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GetRuntimeVersionRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface GetRuntimeVersionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributes.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributes.java similarity index 69% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributes.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributes.java index 48d10eaa053e..6d707c91bd12 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributes.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributes.java @@ -1,77 +1,56 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A guest attributes.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GuestAttributes} */ -public final class GuestAttributes extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GuestAttributes extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GuestAttributes) GuestAttributesOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GuestAttributes.newBuilder() to construct. private GuestAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GuestAttributes() { queryPath_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GuestAttributes(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GuestAttributes.class, - com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder.class); + com.google.cloud.tpu.v2alpha1.GuestAttributes.class, com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder.class); } public static final int QUERY_PATH_FIELD_NUMBER = 1; private volatile java.lang.Object queryPath_; /** - * - * *
    * The path to be queried. This can be the default namespace ('/') or a
    * nested namespace ('/\<namespace\>/') or a specified key
@@ -79,7 +58,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * 
* * string query_path = 1; - * * @return The queryPath. */ @java.lang.Override @@ -88,15 +66,14 @@ public java.lang.String getQueryPath() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queryPath_ = s; return s; } } /** - * - * *
    * The path to be queried. This can be the default namespace ('/') or a
    * nested namespace ('/\<namespace\>/') or a specified key
@@ -104,15 +81,16 @@ public java.lang.String getQueryPath() {
    * 
* * string query_path = 1; - * * @return The bytes for queryPath. */ @java.lang.Override - public com.google.protobuf.ByteString getQueryPathBytes() { + public com.google.protobuf.ByteString + getQueryPathBytes() { java.lang.Object ref = queryPath_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); queryPath_ = b; return b; } else { @@ -123,14 +101,11 @@ public com.google.protobuf.ByteString getQueryPathBytes() { public static final int QUERY_VALUE_FIELD_NUMBER = 2; private com.google.cloud.tpu.v2alpha1.GuestAttributesValue queryValue_; /** - * - * *
    * The value of the requested queried path.
    * 
* * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; - * * @return Whether the queryValue field is set. */ @java.lang.Override @@ -138,25 +113,18 @@ public boolean hasQueryValue() { return queryValue_ != null; } /** - * - * *
    * The value of the requested queried path.
    * 
* * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; - * * @return The queryValue. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.GuestAttributesValue getQueryValue() { - return queryValue_ == null - ? com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance() - : queryValue_; + return queryValue_ == null ? com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance() : queryValue_; } /** - * - * *
    * The value of the requested queried path.
    * 
@@ -169,7 +137,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder getQueryValue } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -181,7 +148,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryPath_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryPath_); } @@ -201,7 +169,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryPath_); } if (queryValue_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQueryValue()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getQueryValue()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -211,18 +180,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GuestAttributes)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GuestAttributes other = - (com.google.cloud.tpu.v2alpha1.GuestAttributes) obj; + com.google.cloud.tpu.v2alpha1.GuestAttributes other = (com.google.cloud.tpu.v2alpha1.GuestAttributes) obj; - if (!getQueryPath().equals(other.getQueryPath())) return false; + if (!getQueryPath() + .equals(other.getQueryPath())) return false; if (hasQueryValue() != other.hasQueryValue()) return false; if (hasQueryValue()) { - if (!getQueryValue().equals(other.getQueryValue())) return false; + if (!getQueryValue() + .equals(other.getQueryValue())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -246,136 +216,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributes parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GuestAttributes prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A guest attributes.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GuestAttributes} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GuestAttributes) com.google.cloud.tpu.v2alpha1.GuestAttributesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GuestAttributes.class, - com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder.class); + com.google.cloud.tpu.v2alpha1.GuestAttributes.class, com.google.cloud.tpu.v2alpha1.GuestAttributes.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GuestAttributes.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -391,9 +355,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributes_descriptor; } @java.lang.Override @@ -412,8 +376,7 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GuestAttributes buildPartial() { - com.google.cloud.tpu.v2alpha1.GuestAttributes result = - new com.google.cloud.tpu.v2alpha1.GuestAttributes(this); + com.google.cloud.tpu.v2alpha1.GuestAttributes result = new com.google.cloud.tpu.v2alpha1.GuestAttributes(this); result.queryPath_ = queryPath_; if (queryValueBuilder_ == null) { result.queryValue_ = queryValue_; @@ -428,39 +391,38 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributes buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GuestAttributes) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GuestAttributes) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GuestAttributes)other); } else { super.mergeFrom(other); return this; @@ -502,25 +464,24 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - queryPath_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getQueryValueFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + queryPath_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + input.readMessage( + getQueryValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -533,8 +494,6 @@ public Builder mergeFrom( private java.lang.Object queryPath_ = ""; /** - * - * *
      * The path to be queried. This can be the default namespace ('/') or a
      * nested namespace ('/\<namespace\>/') or a specified key
@@ -542,13 +501,13 @@ public Builder mergeFrom(
      * 
* * string query_path = 1; - * * @return The queryPath. */ public java.lang.String getQueryPath() { java.lang.Object ref = queryPath_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queryPath_ = s; return s; @@ -557,8 +516,6 @@ public java.lang.String getQueryPath() { } } /** - * - * *
      * The path to be queried. This can be the default namespace ('/') or a
      * nested namespace ('/\<namespace\>/') or a specified key
@@ -566,14 +523,15 @@ public java.lang.String getQueryPath() {
      * 
* * string query_path = 1; - * * @return The bytes for queryPath. */ - public com.google.protobuf.ByteString getQueryPathBytes() { + public com.google.protobuf.ByteString + getQueryPathBytes() { java.lang.Object ref = queryPath_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); queryPath_ = b; return b; } else { @@ -581,8 +539,6 @@ public com.google.protobuf.ByteString getQueryPathBytes() { } } /** - * - * *
      * The path to be queried. This can be the default namespace ('/') or a
      * nested namespace ('/\<namespace\>/') or a specified key
@@ -590,22 +546,20 @@ public com.google.protobuf.ByteString getQueryPathBytes() {
      * 
* * string query_path = 1; - * * @param value The queryPath to set. * @return This builder for chaining. */ - public Builder setQueryPath(java.lang.String value) { + public Builder setQueryPath( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + queryPath_ = value; onChanged(); return this; } /** - * - * *
      * The path to be queried. This can be the default namespace ('/') or a
      * nested namespace ('/\<namespace\>/') or a specified key
@@ -613,18 +567,15 @@ public Builder setQueryPath(java.lang.String value) {
      * 
* * string query_path = 1; - * * @return This builder for chaining. */ public Builder clearQueryPath() { - + queryPath_ = getDefaultInstance().getQueryPath(); onChanged(); return this; } /** - * - * *
      * The path to be queried. This can be the default namespace ('/') or a
      * nested namespace ('/\<namespace\>/') or a specified key
@@ -632,16 +583,16 @@ public Builder clearQueryPath() {
      * 
* * string query_path = 1; - * * @param value The bytes for queryPath to set. * @return This builder for chaining. */ - public Builder setQueryPathBytes(com.google.protobuf.ByteString value) { + public Builder setQueryPathBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryPath_ = value; onChanged(); return this; @@ -649,47 +600,34 @@ public Builder setQueryPathBytes(com.google.protobuf.ByteString value) { private com.google.cloud.tpu.v2alpha1.GuestAttributesValue queryValue_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributesValue, - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder> - queryValueBuilder_; + com.google.cloud.tpu.v2alpha1.GuestAttributesValue, com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder> queryValueBuilder_; /** - * - * *
      * The value of the requested queried path.
      * 
* * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; - * * @return Whether the queryValue field is set. */ public boolean hasQueryValue() { return queryValueBuilder_ != null || queryValue_ != null; } /** - * - * *
      * The value of the requested queried path.
      * 
* * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; - * * @return The queryValue. */ public com.google.cloud.tpu.v2alpha1.GuestAttributesValue getQueryValue() { if (queryValueBuilder_ == null) { - return queryValue_ == null - ? com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance() - : queryValue_; + return queryValue_ == null ? com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance() : queryValue_; } else { return queryValueBuilder_.getMessage(); } } /** - * - * *
      * The value of the requested queried path.
      * 
@@ -710,8 +648,6 @@ public Builder setQueryValue(com.google.cloud.tpu.v2alpha1.GuestAttributesValue return this; } /** - * - * *
      * The value of the requested queried path.
      * 
@@ -730,8 +666,6 @@ public Builder setQueryValue( return this; } /** - * - * *
      * The value of the requested queried path.
      * 
@@ -742,9 +676,7 @@ public Builder mergeQueryValue(com.google.cloud.tpu.v2alpha1.GuestAttributesValu if (queryValueBuilder_ == null) { if (queryValue_ != null) { queryValue_ = - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.newBuilder(queryValue_) - .mergeFrom(value) - .buildPartial(); + com.google.cloud.tpu.v2alpha1.GuestAttributesValue.newBuilder(queryValue_).mergeFrom(value).buildPartial(); } else { queryValue_ = value; } @@ -756,8 +688,6 @@ public Builder mergeQueryValue(com.google.cloud.tpu.v2alpha1.GuestAttributesValu return this; } /** - * - * *
      * The value of the requested queried path.
      * 
@@ -776,8 +706,6 @@ public Builder clearQueryValue() { return this; } /** - * - * *
      * The value of the requested queried path.
      * 
@@ -785,13 +713,11 @@ public Builder clearQueryValue() { * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; */ public com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder getQueryValueBuilder() { - + onChanged(); return getQueryValueFieldBuilder().getBuilder(); } /** - * - * *
      * The value of the requested queried path.
      * 
@@ -802,14 +728,11 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder getQueryValue if (queryValueBuilder_ != null) { return queryValueBuilder_.getMessageOrBuilder(); } else { - return queryValue_ == null - ? com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance() - : queryValue_; + return queryValue_ == null ? + com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance() : queryValue_; } } /** - * - * *
      * The value of the requested queried path.
      * 
@@ -817,24 +740,21 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder getQueryValue * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributesValue, - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder> + com.google.cloud.tpu.v2alpha1.GuestAttributesValue, com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder> getQueryValueFieldBuilder() { if (queryValueBuilder_ == null) { - queryValueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributesValue, - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder>( - getQueryValue(), getParentForChildren(), isClean()); + queryValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.GuestAttributesValue, com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder>( + getQueryValue(), + getParentForChildren(), + isClean()); queryValue_ = null; } return queryValueBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -844,12 +764,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GuestAttributes) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GuestAttributes) private static final com.google.cloud.tpu.v2alpha1.GuestAttributes DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GuestAttributes(); } @@ -858,27 +778,27 @@ public static com.google.cloud.tpu.v2alpha1.GuestAttributes getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GuestAttributes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -893,4 +813,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.GuestAttributes getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntry.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntry.java similarity index 67% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntry.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntry.java index f8c3d3fce975..eb15d11e005a 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntry.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntry.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A guest attributes namespace/key/value entry.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GuestAttributesEntry} */ -public final class GuestAttributesEntry extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GuestAttributesEntry extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GuestAttributesEntry) GuestAttributesEntryOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GuestAttributesEntry.newBuilder() to construct. private GuestAttributesEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GuestAttributesEntry() { namespace_ = ""; key_ = ""; @@ -45,41 +27,37 @@ private GuestAttributesEntry() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GuestAttributesEntry(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.class, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder.class); + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.class, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder.class); } public static final int NAMESPACE_FIELD_NUMBER = 1; private volatile java.lang.Object namespace_; /** - * - * *
    * Namespace for the guest attribute entry.
    * 
* * string namespace = 1; - * * @return The namespace. */ @java.lang.Override @@ -88,29 +66,29 @@ public java.lang.String getNamespace() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); namespace_ = s; return s; } } /** - * - * *
    * Namespace for the guest attribute entry.
    * 
* * string namespace = 1; - * * @return The bytes for namespace. */ @java.lang.Override - public com.google.protobuf.ByteString getNamespaceBytes() { + public com.google.protobuf.ByteString + getNamespaceBytes() { java.lang.Object ref = namespace_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); namespace_ = b; return b; } else { @@ -121,14 +99,11 @@ public com.google.protobuf.ByteString getNamespaceBytes() { public static final int KEY_FIELD_NUMBER = 2; private volatile java.lang.Object key_; /** - * - * *
    * Key for the guest attribute entry.
    * 
* * string key = 2; - * * @return The key. */ @java.lang.Override @@ -137,29 +112,29 @@ public java.lang.String getKey() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } } /** - * - * *
    * Key for the guest attribute entry.
    * 
* * string key = 2; - * * @return The bytes for key. */ @java.lang.Override - public com.google.protobuf.ByteString getKeyBytes() { + public com.google.protobuf.ByteString + getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); key_ = b; return b; } else { @@ -170,14 +145,11 @@ public com.google.protobuf.ByteString getKeyBytes() { public static final int VALUE_FIELD_NUMBER = 3; private volatile java.lang.Object value_; /** - * - * *
    * Value for the guest attribute entry.
    * 
* * string value = 3; - * * @return The value. */ @java.lang.Override @@ -186,29 +158,29 @@ public java.lang.String getValue() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); value_ = s; return s; } } /** - * - * *
    * Value for the guest attribute entry.
    * 
* * string value = 3; - * * @return The bytes for value. */ @java.lang.Override - public com.google.protobuf.ByteString getValueBytes() { + public com.google.protobuf.ByteString + getValueBytes() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); value_ = b; return b; } else { @@ -217,7 +189,6 @@ public com.google.protobuf.ByteString getValueBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -229,7 +200,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); } @@ -265,17 +237,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GuestAttributesEntry)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry other = - (com.google.cloud.tpu.v2alpha1.GuestAttributesEntry) obj; + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry other = (com.google.cloud.tpu.v2alpha1.GuestAttributesEntry) obj; - if (!getNamespace().equals(other.getNamespace())) return false; - if (!getKey().equals(other.getKey())) return false; - if (!getValue().equals(other.getValue())) return false; + if (!getNamespace() + .equals(other.getNamespace())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getValue() + .equals(other.getValue())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -299,135 +273,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GuestAttributesEntry prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A guest attributes namespace/key/value entry.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GuestAttributesEntry} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GuestAttributesEntry) com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.class, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder.class); + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.class, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -441,9 +409,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesEntry_descriptor; } @java.lang.Override @@ -462,8 +430,7 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry buildPartial() { - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry result = - new com.google.cloud.tpu.v2alpha1.GuestAttributesEntry(this); + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry result = new com.google.cloud.tpu.v2alpha1.GuestAttributesEntry(this); result.namespace_ = namespace_; result.key_ = key_; result.value_ = value_; @@ -475,39 +442,38 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GuestAttributesEntry) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GuestAttributesEntry) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GuestAttributesEntry)other); } else { super.mergeFrom(other); return this; @@ -515,8 +481,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GuestAttributesEntry other) { - if (other == com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.getDefaultInstance()) return this; if (!other.getNamespace().isEmpty()) { namespace_ = other.namespace_; onChanged(); @@ -555,31 +520,27 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - namespace_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - key_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - value_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + namespace_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + key_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + value_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -592,20 +553,18 @@ public Builder mergeFrom( private java.lang.Object namespace_ = ""; /** - * - * *
      * Namespace for the guest attribute entry.
      * 
* * string namespace = 1; - * * @return The namespace. */ public java.lang.String getNamespace() { java.lang.Object ref = namespace_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); namespace_ = s; return s; @@ -614,21 +573,20 @@ public java.lang.String getNamespace() { } } /** - * - * *
      * Namespace for the guest attribute entry.
      * 
* * string namespace = 1; - * * @return The bytes for namespace. */ - public com.google.protobuf.ByteString getNamespaceBytes() { + public com.google.protobuf.ByteString + getNamespaceBytes() { java.lang.Object ref = namespace_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); namespace_ = b; return b; } else { @@ -636,61 +594,54 @@ public com.google.protobuf.ByteString getNamespaceBytes() { } } /** - * - * *
      * Namespace for the guest attribute entry.
      * 
* * string namespace = 1; - * * @param value The namespace to set. * @return This builder for chaining. */ - public Builder setNamespace(java.lang.String value) { + public Builder setNamespace( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + namespace_ = value; onChanged(); return this; } /** - * - * *
      * Namespace for the guest attribute entry.
      * 
* * string namespace = 1; - * * @return This builder for chaining. */ public Builder clearNamespace() { - + namespace_ = getDefaultInstance().getNamespace(); onChanged(); return this; } /** - * - * *
      * Namespace for the guest attribute entry.
      * 
* * string namespace = 1; - * * @param value The bytes for namespace to set. * @return This builder for chaining. */ - public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { + public Builder setNamespaceBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + namespace_ = value; onChanged(); return this; @@ -698,20 +649,18 @@ public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { private java.lang.Object key_ = ""; /** - * - * *
      * Key for the guest attribute entry.
      * 
* * string key = 2; - * * @return The key. */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; @@ -720,21 +669,20 @@ public java.lang.String getKey() { } } /** - * - * *
      * Key for the guest attribute entry.
      * 
* * string key = 2; - * * @return The bytes for key. */ - public com.google.protobuf.ByteString getKeyBytes() { + public com.google.protobuf.ByteString + getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); key_ = b; return b; } else { @@ -742,61 +690,54 @@ public com.google.protobuf.ByteString getKeyBytes() { } } /** - * - * *
      * Key for the guest attribute entry.
      * 
* * string key = 2; - * * @param value The key to set. * @return This builder for chaining. */ - public Builder setKey(java.lang.String value) { + public Builder setKey( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + key_ = value; onChanged(); return this; } /** - * - * *
      * Key for the guest attribute entry.
      * 
* * string key = 2; - * * @return This builder for chaining. */ public Builder clearKey() { - + key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** - * - * *
      * Key for the guest attribute entry.
      * 
* * string key = 2; - * * @param value The bytes for key to set. * @return This builder for chaining. */ - public Builder setKeyBytes(com.google.protobuf.ByteString value) { + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; onChanged(); return this; @@ -804,20 +745,18 @@ public Builder setKeyBytes(com.google.protobuf.ByteString value) { private java.lang.Object value_ = ""; /** - * - * *
      * Value for the guest attribute entry.
      * 
* * string value = 3; - * * @return The value. */ public java.lang.String getValue() { java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); value_ = s; return s; @@ -826,21 +765,20 @@ public java.lang.String getValue() { } } /** - * - * *
      * Value for the guest attribute entry.
      * 
* * string value = 3; - * * @return The bytes for value. */ - public com.google.protobuf.ByteString getValueBytes() { + public com.google.protobuf.ByteString + getValueBytes() { java.lang.Object ref = value_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); value_ = b; return b; } else { @@ -848,68 +786,61 @@ public com.google.protobuf.ByteString getValueBytes() { } } /** - * - * *
      * Value for the guest attribute entry.
      * 
* * string value = 3; - * * @param value The value to set. * @return This builder for chaining. */ - public Builder setValue(java.lang.String value) { + public Builder setValue( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + value_ = value; onChanged(); return this; } /** - * - * *
      * Value for the guest attribute entry.
      * 
* * string value = 3; - * * @return This builder for chaining. */ public Builder clearValue() { - + value_ = getDefaultInstance().getValue(); onChanged(); return this; } /** - * - * *
      * Value for the guest attribute entry.
      * 
* * string value = 3; - * * @param value The bytes for value to set. * @return This builder for chaining. */ - public Builder setValueBytes(com.google.protobuf.ByteString value) { + public Builder setValueBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -919,12 +850,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GuestAttributesEntry) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GuestAttributesEntry) private static final com.google.cloud.tpu.v2alpha1.GuestAttributesEntry DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GuestAttributesEntry(); } @@ -933,27 +864,27 @@ public static com.google.cloud.tpu.v2alpha1.GuestAttributesEntry getDefaultInsta return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GuestAttributesEntry parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestAttributesEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -968,4 +899,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntryOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntryOrBuilder.java similarity index 58% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntryOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntryOrBuilder.java index 8860e13076f0..415dc3dc7b86 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntryOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesEntryOrBuilder.java @@ -1,100 +1,69 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface GuestAttributesEntryOrBuilder - extends +public interface GuestAttributesEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GuestAttributesEntry) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Namespace for the guest attribute entry.
    * 
* * string namespace = 1; - * * @return The namespace. */ java.lang.String getNamespace(); /** - * - * *
    * Namespace for the guest attribute entry.
    * 
* * string namespace = 1; - * * @return The bytes for namespace. */ - com.google.protobuf.ByteString getNamespaceBytes(); + com.google.protobuf.ByteString + getNamespaceBytes(); /** - * - * *
    * Key for the guest attribute entry.
    * 
* * string key = 2; - * * @return The key. */ java.lang.String getKey(); /** - * - * *
    * Key for the guest attribute entry.
    * 
* * string key = 2; - * * @return The bytes for key. */ - com.google.protobuf.ByteString getKeyBytes(); + com.google.protobuf.ByteString + getKeyBytes(); /** - * - * *
    * Value for the guest attribute entry.
    * 
* * string value = 3; - * * @return The value. */ java.lang.String getValue(); /** - * - * *
    * Value for the guest attribute entry.
    * 
* * string value = 3; - * * @return The bytes for value. */ - com.google.protobuf.ByteString getValueBytes(); + com.google.protobuf.ByteString + getValueBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesOrBuilder.java similarity index 69% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesOrBuilder.java index 62180b5195d1..e233695fde73 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesOrBuilder.java @@ -1,31 +1,13 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface GuestAttributesOrBuilder - extends +public interface GuestAttributesOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GuestAttributes) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The path to be queried. This can be the default namespace ('/') or a
    * nested namespace ('/\<namespace\>/') or a specified key
@@ -33,13 +15,10 @@ public interface GuestAttributesOrBuilder
    * 
* * string query_path = 1; - * * @return The queryPath. */ java.lang.String getQueryPath(); /** - * - * *
    * The path to be queried. This can be the default namespace ('/') or a
    * nested namespace ('/\<namespace\>/') or a specified key
@@ -47,38 +26,30 @@ public interface GuestAttributesOrBuilder
    * 
* * string query_path = 1; - * * @return The bytes for queryPath. */ - com.google.protobuf.ByteString getQueryPathBytes(); + com.google.protobuf.ByteString + getQueryPathBytes(); /** - * - * *
    * The value of the requested queried path.
    * 
* * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; - * * @return Whether the queryValue field is set. */ boolean hasQueryValue(); /** - * - * *
    * The value of the requested queried path.
    * 
* * .google.cloud.tpu.v2alpha1.GuestAttributesValue query_value = 2; - * * @return The queryValue. */ com.google.cloud.tpu.v2alpha1.GuestAttributesValue getQueryValue(); /** - * - * *
    * The value of the requested queried path.
    * 
diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValue.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValue.java similarity index 70% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValue.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValue.java index 3c40ae78da87..c31c19d9f9d1 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValue.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValue.java @@ -1,77 +1,56 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Array of guest attribute namespace/key/value tuples.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GuestAttributesValue} */ -public final class GuestAttributesValue extends com.google.protobuf.GeneratedMessageV3 - implements +public final class GuestAttributesValue extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.GuestAttributesValue) GuestAttributesValueOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use GuestAttributesValue.newBuilder() to construct. private GuestAttributesValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GuestAttributesValue() { items_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new GuestAttributesValue(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.class, - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder.class); + com.google.cloud.tpu.v2alpha1.GuestAttributesValue.class, com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder.class); } public static final int ITEMS_FIELD_NUMBER = 1; private java.util.List items_; /** - * - * *
    * The list of guest attributes entries.
    * 
@@ -83,8 +62,6 @@ public java.util.List getIte return items_; } /** - * - * *
    * The list of guest attributes entries.
    * 
@@ -92,13 +69,11 @@ public java.util.List getIte * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ @java.lang.Override - public java.util.List + public java.util.List getItemsOrBuilderList() { return items_; } /** - * - * *
    * The list of guest attributes entries.
    * 
@@ -110,8 +85,6 @@ public int getItemsCount() { return items_.size(); } /** - * - * *
    * The list of guest attributes entries.
    * 
@@ -123,8 +96,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry getItems(int index) { return items_.get(index); } /** - * - * *
    * The list of guest attributes entries.
    * 
@@ -132,12 +103,12 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry getItems(int index) { * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ @java.lang.Override - public com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder getItemsOrBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder getItemsOrBuilder( + int index) { return items_.get(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -149,7 +120,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < items_.size(); i++) { output.writeMessage(1, items_.get(i)); } @@ -163,7 +135,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < items_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, items_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, items_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -173,15 +146,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.GuestAttributesValue)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.GuestAttributesValue other = - (com.google.cloud.tpu.v2alpha1.GuestAttributesValue) obj; + com.google.cloud.tpu.v2alpha1.GuestAttributesValue other = (com.google.cloud.tpu.v2alpha1.GuestAttributesValue) obj; - if (!getItemsList().equals(other.getItemsList())) return false; + if (!getItemsList() + .equals(other.getItemsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -203,135 +176,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.GuestAttributesValue prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Array of guest attribute namespace/key/value tuples.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.GuestAttributesValue} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.GuestAttributesValue) com.google.cloud.tpu.v2alpha1.GuestAttributesValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.class, - com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder.class); + com.google.cloud.tpu.v2alpha1.GuestAttributesValue.class, com.google.cloud.tpu.v2alpha1.GuestAttributesValue.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.GuestAttributesValue.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -346,9 +313,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_GuestAttributesValue_descriptor; } @java.lang.Override @@ -367,8 +334,7 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesValue build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.GuestAttributesValue buildPartial() { - com.google.cloud.tpu.v2alpha1.GuestAttributesValue result = - new com.google.cloud.tpu.v2alpha1.GuestAttributesValue(this); + com.google.cloud.tpu.v2alpha1.GuestAttributesValue result = new com.google.cloud.tpu.v2alpha1.GuestAttributesValue(this); int from_bitField0_ = bitField0_; if (itemsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -387,39 +353,38 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesValue buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.GuestAttributesValue) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.GuestAttributesValue) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.GuestAttributesValue)other); } else { super.mergeFrom(other); return this; @@ -427,8 +392,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GuestAttributesValue other) { - if (other == com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.GuestAttributesValue.getDefaultInstance()) return this; if (itemsBuilder_ == null) { if (!other.items_.isEmpty()) { if (items_.isEmpty()) { @@ -447,10 +411,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.GuestAttributesValue othe itemsBuilder_ = null; items_ = other.items_; bitField0_ = (bitField0_ & ~0x00000001); - itemsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getItemsFieldBuilder() - : null; + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getItemsFieldBuilder() : null; } else { itemsBuilder_.addAllMessages(other.items_); } @@ -482,27 +445,25 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.parser(), - extensionRegistry); - if (itemsBuilder_ == null) { - ensureItemsIsMutable(); - items_.add(m); - } else { - itemsBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -512,29 +473,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.util.List items_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureItemsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - items_ = - new java.util.ArrayList(items_); + items_ = new java.util.ArrayList(items_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder> - itemsBuilder_; + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder> itemsBuilder_; /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -549,8 +502,6 @@ public java.util.List getIte } } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -565,8 +516,6 @@ public int getItemsCount() { } } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -581,15 +530,14 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry getItems(int index) { } } /** - * - * *
      * The list of guest attributes entries.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - public Builder setItems(int index, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry value) { + public Builder setItems( + int index, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry value) { if (itemsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -603,8 +551,6 @@ public Builder setItems(int index, com.google.cloud.tpu.v2alpha1.GuestAttributes return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -623,8 +569,6 @@ public Builder setItems( return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -645,15 +589,14 @@ public Builder addItems(com.google.cloud.tpu.v2alpha1.GuestAttributesEntry value return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - public Builder addItems(int index, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry value) { + public Builder addItems( + int index, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry value) { if (itemsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -667,8 +610,6 @@ public Builder addItems(int index, com.google.cloud.tpu.v2alpha1.GuestAttributes return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -687,8 +628,6 @@ public Builder addItems( return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -707,8 +646,6 @@ public Builder addItems( return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -719,7 +656,8 @@ public Builder addAllItems( java.lang.Iterable values) { if (itemsBuilder_ == null) { ensureItemsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, items_); onChanged(); } else { itemsBuilder_.addAllMessages(values); @@ -727,8 +665,6 @@ public Builder addAllItems( return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -746,8 +682,6 @@ public Builder clearItems() { return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -765,20 +699,17 @@ public Builder removeItems(int index) { return this; } /** - * - * *
      * The list of guest attributes entries.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder getItemsBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder getItemsBuilder( + int index) { return getItemsFieldBuilder().getBuilder(index); } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -788,22 +719,19 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder getItemsBuilde public com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder getItemsOrBuilder( int index) { if (itemsBuilder_ == null) { - return items_.get(index); - } else { + return items_.get(index); } else { return itemsBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The list of guest attributes entries.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - public java.util.List - getItemsOrBuilderList() { + public java.util.List + getItemsOrBuilderList() { if (itemsBuilder_ != null) { return itemsBuilder_.getMessageOrBuilderList(); } else { @@ -811,8 +739,6 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder getItemsOrBui } } /** - * - * *
      * The list of guest attributes entries.
      * 
@@ -820,56 +746,49 @@ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder getItemsOrBui * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder addItemsBuilder() { - return getItemsFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.getDefaultInstance()); + return getItemsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.getDefaultInstance()); } /** - * - * *
      * The list of guest attributes entries.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder addItemsBuilder(int index) { - return getItemsFieldBuilder() - .addBuilder( - index, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.getDefaultInstance()); + public com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder addItemsBuilder( + int index) { + return getItemsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.getDefaultInstance()); } /** - * - * *
      * The list of guest attributes entries.
      * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - public java.util.List - getItemsBuilderList() { + public java.util.List + getItemsBuilderList() { return getItemsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder> + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder> getItemsFieldBuilder() { if (itemsBuilder_ == null) { - itemsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder, - com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder>( - items_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.GuestAttributesEntry, com.google.cloud.tpu.v2alpha1.GuestAttributesEntry.Builder, com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder>( + items_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); items_ = null; } return itemsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -879,12 +798,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.GuestAttributesValue) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.GuestAttributesValue) private static final com.google.cloud.tpu.v2alpha1.GuestAttributesValue DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.GuestAttributesValue(); } @@ -893,27 +812,27 @@ public static com.google.cloud.tpu.v2alpha1.GuestAttributesValue getDefaultInsta return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GuestAttributesValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestAttributesValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -928,4 +847,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.GuestAttributesValue getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValueOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValueOrBuilder.java similarity index 65% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValueOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValueOrBuilder.java index 4a7326237d67..d7a9b5abe4f8 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValueOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/GuestAttributesValueOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface GuestAttributesValueOrBuilder - extends +public interface GuestAttributesValueOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.GuestAttributesValue) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The list of guest attributes entries.
    * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - java.util.List getItemsList(); + java.util.List + getItemsList(); /** - * - * *
    * The list of guest attributes entries.
    * 
@@ -44,8 +25,6 @@ public interface GuestAttributesValueOrBuilder */ com.google.cloud.tpu.v2alpha1.GuestAttributesEntry getItems(int index); /** - * - * *
    * The list of guest attributes entries.
    * 
@@ -54,24 +33,21 @@ public interface GuestAttributesValueOrBuilder */ int getItemsCount(); /** - * - * *
    * The list of guest attributes entries.
    * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - java.util.List + java.util.List getItemsOrBuilderList(); /** - * - * *
    * The list of guest attributes entries.
    * 
* * repeated .google.cloud.tpu.v2alpha1.GuestAttributesEntry items = 1; */ - com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder getItemsOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.GuestAttributesEntryOrBuilder getItemsOrBuilder( + int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequest.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequest.java index b82b55daf02a..924722274296 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequest.java @@ -1,43 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Request for
- * [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
+ * Request for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest} */ -public final class ListAcceleratorTypesRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListAcceleratorTypesRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) ListAcceleratorTypesRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListAcceleratorTypesRequest.newBuilder() to construct. private ListAcceleratorTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListAcceleratorTypesRequest() { parent_ = ""; pageToken_ = ""; @@ -47,43 +28,37 @@ private ListAcceleratorTypesRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListAcceleratorTypesRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.class, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.class, com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -92,31 +67,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -127,14 +100,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_; /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -145,14 +115,11 @@ public int getPageSize() { public static final int PAGE_TOKEN_FIELD_NUMBER = 3; private volatile java.lang.Object pageToken_; /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ @java.lang.Override @@ -161,29 +128,29 @@ public java.lang.String getPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; } } /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -194,14 +161,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public static final int FILTER_FIELD_NUMBER = 5; private volatile java.lang.Object filter_; /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ @java.lang.Override @@ -210,29 +174,29 @@ public java.lang.String getFilter() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; } } /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -243,14 +207,11 @@ public com.google.protobuf.ByteString getFilterBytes() { public static final int ORDER_BY_FIELD_NUMBER = 6; private volatile java.lang.Object orderBy_; /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ @java.lang.Override @@ -259,29 +220,29 @@ public java.lang.String getOrderBy() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; } } /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -290,7 +251,6 @@ public com.google.protobuf.ByteString getOrderByBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -302,7 +262,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -331,7 +292,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); @@ -350,19 +312,23 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest other = - (com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest other = (com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -390,137 +356,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Request for
-   * [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
+   * Request for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.class, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.class, com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -538,9 +496,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesRequest_descriptor; } @java.lang.Override @@ -559,8 +517,7 @@ public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest result = - new com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest(this); + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest result = new com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; @@ -574,39 +531,38 @@ public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest buildPartial() public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest)other); } else { super.mergeFrom(other); return this; @@ -614,8 +570,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -661,43 +616,37 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); + case 10: { + parent_ = input.readStringRequireUtf8(); - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); - break; - } // case 26 - case 42: - { - filter_ = input.readStringRequireUtf8(); + break; + } // case 26 + case 42: { + filter_ = input.readStringRequireUtf8(); - break; - } // case 42 - case 50: - { - orderBy_ = input.readStringRequireUtf8(); + break; + } // case 42 + case 50: { + orderBy_ = input.readStringRequireUtf8(); - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -710,22 +659,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -734,23 +679,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -758,82 +700,66 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; } - private int pageSize_; + private int pageSize_ ; /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -841,36 +767,30 @@ public int getPageSize() { return pageSize_; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @param value The pageSize to set. * @return This builder for chaining. */ public Builder setPageSize(int value) { - + pageSize_ = value; onChanged(); return this; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return This builder for chaining. */ public Builder clearPageSize() { - + pageSize_ = 0; onChanged(); return this; @@ -878,20 +798,18 @@ public Builder clearPageSize() { private java.lang.Object pageToken_ = ""; /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The pageToken. */ public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; @@ -900,21 +818,20 @@ public java.lang.String getPageToken() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -922,61 +839,54 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The pageToken to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + pageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return This builder for chaining. */ public Builder clearPageToken() { - + pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; onChanged(); return this; @@ -984,20 +894,18 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { private java.lang.Object filter_ = ""; /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; @@ -1006,21 +914,20 @@ public java.lang.String getFilter() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The bytes for filter. */ - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -1028,61 +935,54 @@ public com.google.protobuf.ByteString getFilterBytes() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The filter to set. * @return This builder for chaining. */ - public Builder setFilter(java.lang.String value) { + public Builder setFilter( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + filter_ = value; onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return This builder for chaining. */ public Builder clearFilter() { - + filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The bytes for filter to set. * @return This builder for chaining. */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; onChanged(); return this; @@ -1090,20 +990,18 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { private java.lang.Object orderBy_ = ""; /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The orderBy. */ public java.lang.String getOrderBy() { java.lang.Object ref = orderBy_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; @@ -1112,21 +1010,20 @@ public java.lang.String getOrderBy() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -1134,68 +1031,61 @@ public com.google.protobuf.ByteString getOrderByBytes() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The orderBy to set. * @return This builder for chaining. */ - public Builder setOrderBy(java.lang.String value) { + public Builder setOrderBy( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + orderBy_ = value; onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return This builder for chaining. */ public Builder clearOrderBy() { - + orderBy_ = getDefaultInstance().getOrderBy(); onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The bytes for orderBy to set. * @return This builder for chaining. */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1205,12 +1095,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) private static final com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest(); } @@ -1219,27 +1109,27 @@ public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest getDefau return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAcceleratorTypesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAcceleratorTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1254,4 +1144,6 @@ public com.google.protobuf.Parser getParserForType( public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequestOrBuilder.java similarity index 57% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequestOrBuilder.java index 491c119887f9..2c6486a70c5f 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesRequestOrBuilder.java @@ -1,142 +1,99 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface ListAcceleratorTypesRequestOrBuilder - extends +public interface ListAcceleratorTypesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ int getPageSize(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ java.lang.String getPageToken(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - com.google.protobuf.ByteString getPageTokenBytes(); + com.google.protobuf.ByteString + getPageTokenBytes(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ java.lang.String getFilter(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ - com.google.protobuf.ByteString getFilterBytes(); + com.google.protobuf.ByteString + getFilterBytes(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ java.lang.String getOrderBy(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - com.google.protobuf.ByteString getOrderByBytes(); + com.google.protobuf.ByteString + getOrderByBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponse.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponse.java similarity index 72% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponse.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponse.java index 198eceaf6b7c..52da602aaf9b 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponse.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponse.java @@ -1,43 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Response for
- * [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
+ * Response for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse} */ -public final class ListAcceleratorTypesResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListAcceleratorTypesResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) ListAcceleratorTypesResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListAcceleratorTypesResponse.newBuilder() to construct. private ListAcceleratorTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListAcceleratorTypesResponse() { acceleratorTypes_ = java.util.Collections.emptyList(); nextPageToken_ = ""; @@ -46,35 +27,32 @@ private ListAcceleratorTypesResponse() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListAcceleratorTypesResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.class, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.class, com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.Builder.class); } public static final int ACCELERATOR_TYPES_FIELD_NUMBER = 1; private java.util.List acceleratorTypes_; /** - * - * *
    * The listed nodes.
    * 
@@ -86,8 +64,6 @@ public java.util.List getAccelera return acceleratorTypes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -95,13 +71,11 @@ public java.util.List getAccelera * repeated .google.cloud.tpu.v2alpha1.AcceleratorType accelerator_types = 1; */ @java.lang.Override - public java.util.List + public java.util.List getAcceleratorTypesOrBuilderList() { return acceleratorTypes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -113,8 +87,6 @@ public int getAcceleratorTypesCount() { return acceleratorTypes_.size(); } /** - * - * *
    * The listed nodes.
    * 
@@ -126,8 +98,6 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType getAcceleratorTypes(int ind return acceleratorTypes_.get(index); } /** - * - * *
    * The listed nodes.
    * 
@@ -143,14 +113,11 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder getAcceleratorType public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; private volatile java.lang.Object nextPageToken_; /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ @java.lang.Override @@ -159,29 +126,29 @@ public java.lang.String getNextPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; } } /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -192,42 +159,34 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public static final int UNREACHABLE_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList unreachable_; /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_; } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -235,23 +194,20 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -263,7 +219,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < acceleratorTypes_.size(); i++) { output.writeMessage(1, acceleratorTypes_.get(i)); } @@ -283,7 +240,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < acceleratorTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, acceleratorTypes_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, acceleratorTypes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -304,17 +262,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse other = - (com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) obj; + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse other = (com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) obj; - if (!getAcceleratorTypesList().equals(other.getAcceleratorTypesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getAcceleratorTypesList() + .equals(other.getAcceleratorTypesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,137 +302,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Response for
-   * [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
+   * Response for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.class, - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.class, com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -491,9 +443,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListAcceleratorTypesResponse_descriptor; } @java.lang.Override @@ -512,8 +464,7 @@ public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse buildPartial() { - com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse result = - new com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse(this); + com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse result = new com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse(this); int from_bitField0_ = bitField0_; if (acceleratorTypesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -538,39 +489,38 @@ public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse buildPartial() public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse)other); } else { super.mergeFrom(other); return this; @@ -578,8 +528,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse other) { - if (other == com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse.getDefaultInstance()) return this; if (acceleratorTypesBuilder_ == null) { if (!other.acceleratorTypes_.isEmpty()) { if (acceleratorTypes_.isEmpty()) { @@ -598,10 +547,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRespo acceleratorTypesBuilder_ = null; acceleratorTypes_ = other.acceleratorTypes_; bitField0_ = (bitField0_ & ~0x00000001); - acceleratorTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAcceleratorTypesFieldBuilder() - : null; + acceleratorTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAcceleratorTypesFieldBuilder() : null; } else { acceleratorTypesBuilder_.addAllMessages(other.acceleratorTypes_); } @@ -647,39 +595,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v2alpha1.AcceleratorType m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.AcceleratorType.parser(), extensionRegistry); - if (acceleratorTypesBuilder_ == null) { - ensureAcceleratorTypesIsMutable(); - acceleratorTypes_.add(m); - } else { - acceleratorTypesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); + case 10: { + com.google.cloud.tpu.v2alpha1.AcceleratorType m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.AcceleratorType.parser(), + extensionRegistry); + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(m); + } else { + acceleratorTypesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -689,30 +634,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.util.List acceleratorTypes_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureAcceleratorTypesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - acceleratorTypes_ = - new java.util.ArrayList( - acceleratorTypes_); + acceleratorTypes_ = new java.util.ArrayList(acceleratorTypes_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AcceleratorType, - com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder, - com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder> - acceleratorTypesBuilder_; + com.google.cloud.tpu.v2alpha1.AcceleratorType, com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder, com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder> acceleratorTypesBuilder_; /** - * - * *
      * The listed nodes.
      * 
@@ -727,8 +663,6 @@ public java.util.List getAccelera } } /** - * - * *
      * The listed nodes.
      * 
@@ -743,8 +677,6 @@ public int getAcceleratorTypesCount() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -759,8 +691,6 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType getAcceleratorTypes(int ind } } /** - * - * *
      * The listed nodes.
      * 
@@ -782,8 +712,6 @@ public Builder setAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -802,8 +730,6 @@ public Builder setAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -824,8 +750,6 @@ public Builder addAcceleratorTypes(com.google.cloud.tpu.v2alpha1.AcceleratorType return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -847,8 +771,6 @@ public Builder addAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -867,8 +789,6 @@ public Builder addAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -887,8 +807,6 @@ public Builder addAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -899,7 +817,8 @@ public Builder addAllAcceleratorTypes( java.lang.Iterable values) { if (acceleratorTypesBuilder_ == null) { ensureAcceleratorTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, acceleratorTypes_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, acceleratorTypes_); onChanged(); } else { acceleratorTypesBuilder_.addAllMessages(values); @@ -907,8 +826,6 @@ public Builder addAllAcceleratorTypes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -926,8 +843,6 @@ public Builder clearAcceleratorTypes() { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -945,8 +860,6 @@ public Builder removeAcceleratorTypes(int index) { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -958,8 +871,6 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder getAcceleratorTypes return getAcceleratorTypesFieldBuilder().getBuilder(index); } /** - * - * *
      * The listed nodes.
      * 
@@ -969,22 +880,19 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder getAcceleratorTypes public com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( int index) { if (acceleratorTypesBuilder_ == null) { - return acceleratorTypes_.get(index); - } else { + return acceleratorTypes_.get(index); } else { return acceleratorTypesBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AcceleratorType accelerator_types = 1; */ - public java.util.List - getAcceleratorTypesOrBuilderList() { + public java.util.List + getAcceleratorTypesOrBuilderList() { if (acceleratorTypesBuilder_ != null) { return acceleratorTypesBuilder_.getMessageOrBuilderList(); } else { @@ -992,8 +900,6 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder getAcceleratorType } } /** - * - * *
      * The listed nodes.
      * 
@@ -1001,12 +907,10 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder getAcceleratorType * repeated .google.cloud.tpu.v2alpha1.AcceleratorType accelerator_types = 1; */ public com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder addAcceleratorTypesBuilder() { - return getAcceleratorTypesFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.AcceleratorType.getDefaultInstance()); + return getAcceleratorTypesFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.AcceleratorType.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
@@ -1015,34 +919,26 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder addAcceleratorTypes */ public com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder addAcceleratorTypesBuilder( int index) { - return getAcceleratorTypesFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v2alpha1.AcceleratorType.getDefaultInstance()); + return getAcceleratorTypesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.AcceleratorType.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AcceleratorType accelerator_types = 1; */ - public java.util.List - getAcceleratorTypesBuilderList() { + public java.util.List + getAcceleratorTypesBuilderList() { return getAcceleratorTypesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AcceleratorType, - com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder, - com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder> + com.google.cloud.tpu.v2alpha1.AcceleratorType, com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder, com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder> getAcceleratorTypesFieldBuilder() { if (acceleratorTypesBuilder_ == null) { - acceleratorTypesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AcceleratorType, - com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder, - com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder>( + acceleratorTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.AcceleratorType, com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder, com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder>( acceleratorTypes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -1054,20 +950,18 @@ public com.google.cloud.tpu.v2alpha1.AcceleratorType.Builder addAcceleratorTypes private java.lang.Object nextPageToken_ = ""; /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; @@ -1076,21 +970,20 @@ public java.lang.String getNextPageToken() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -1098,112 +991,95 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageToken(java.lang.String value) { + public Builder setNextPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nextPageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return This builder for chaining. */ public Builder clearNextPageToken() { - + nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The bytes for nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureUnreachableIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); bitField0_ |= 0x00000002; - } + } } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_.getUnmodifiableView(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -1211,90 +1087,80 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index to set the value at. * @param value The unreachable to set. * @return This builder for chaining. */ - public Builder setUnreachable(int index, java.lang.String value) { + public Builder setUnreachable( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.set(index, value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachable(java.lang.String value) { + public Builder addUnreachable( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param values The unreachable to add. * @return This builder for chaining. */ - public Builder addAllUnreachable(java.lang.Iterable values) { + public Builder addAllUnreachable( + java.lang.Iterable values) { ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return This builder for chaining. */ public Builder clearUnreachable() { @@ -1304,30 +1170,28 @@ public Builder clearUnreachable() { return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The bytes of the unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1337,12 +1201,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) private static final com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse(); } @@ -1351,27 +1215,27 @@ public static com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse getDefa return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAcceleratorTypesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAcceleratorTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1386,4 +1250,6 @@ public com.google.protobuf.Parser getParserForType public com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponseOrBuilder.java similarity index 71% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponseOrBuilder.java index 7865d157b9e9..9bcc0f264186 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListAcceleratorTypesResponseOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface ListAcceleratorTypesResponseOrBuilder - extends +public interface ListAcceleratorTypesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.AcceleratorType accelerator_types = 1; */ - java.util.List getAcceleratorTypesList(); + java.util.List + getAcceleratorTypesList(); /** - * - * *
    * The listed nodes.
    * 
@@ -44,8 +25,6 @@ public interface ListAcceleratorTypesResponseOrBuilder */ com.google.cloud.tpu.v2alpha1.AcceleratorType getAcceleratorTypes(int index); /** - * - * *
    * The listed nodes.
    * 
@@ -54,100 +33,82 @@ public interface ListAcceleratorTypesResponseOrBuilder */ int getAcceleratorTypesCount(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.AcceleratorType accelerator_types = 1; */ - java.util.List + java.util.List getAcceleratorTypesOrBuilderList(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.AcceleratorType accelerator_types = 1; */ - com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.AcceleratorTypeOrBuilder getAcceleratorTypesOrBuilder( + int index); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - com.google.protobuf.ByteString getNextPageTokenBytes(); + com.google.protobuf.ByteString + getNextPageTokenBytes(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - java.util.List getUnreachableList(); + java.util.List + getUnreachableList(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ int getUnreachableCount(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - com.google.protobuf.ByteString getUnreachableBytes(int index); + com.google.protobuf.ByteString + getUnreachableBytes(int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequest.java similarity index 65% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequest.java index 67e7475d4aad..9fd3150c41b4 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequest.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Request for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListNodesRequest} */ -public final class ListNodesRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListNodesRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListNodesRequest) ListNodesRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListNodesRequest.newBuilder() to construct. private ListNodesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListNodesRequest() { parent_ = ""; pageToken_ = ""; @@ -44,43 +26,37 @@ private ListNodesRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListNodesRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListNodesRequest.class, - com.google.cloud.tpu.v2alpha1.ListNodesRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.ListNodesRequest.class, com.google.cloud.tpu.v2alpha1.ListNodesRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -89,31 +65,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -124,14 +98,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_; /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -142,14 +113,11 @@ public int getPageSize() { public static final int PAGE_TOKEN_FIELD_NUMBER = 3; private volatile java.lang.Object pageToken_; /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ @java.lang.Override @@ -158,29 +126,29 @@ public java.lang.String getPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; } } /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -189,7 +157,6 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -201,7 +168,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -224,7 +192,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); @@ -237,17 +206,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListNodesRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ListNodesRequest other = - (com.google.cloud.tpu.v2alpha1.ListNodesRequest) obj; + com.google.cloud.tpu.v2alpha1.ListNodesRequest other = (com.google.cloud.tpu.v2alpha1.ListNodesRequest) obj; - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -270,136 +241,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListNodesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListNodesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListNodesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListNodesRequest) com.google.cloud.tpu.v2alpha1.ListNodesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListNodesRequest.class, - com.google.cloud.tpu.v2alpha1.ListNodesRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.ListNodesRequest.class, com.google.cloud.tpu.v2alpha1.ListNodesRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ListNodesRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -413,9 +378,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesRequest_descriptor; } @java.lang.Override @@ -434,8 +399,7 @@ public com.google.cloud.tpu.v2alpha1.ListNodesRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ListNodesRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.ListNodesRequest result = - new com.google.cloud.tpu.v2alpha1.ListNodesRequest(this); + com.google.cloud.tpu.v2alpha1.ListNodesRequest result = new com.google.cloud.tpu.v2alpha1.ListNodesRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; @@ -447,39 +411,38 @@ public com.google.cloud.tpu.v2alpha1.ListNodesRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ListNodesRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ListNodesRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListNodesRequest)other); } else { super.mergeFrom(other); return this; @@ -525,31 +488,27 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -562,22 +521,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -586,23 +541,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -610,82 +562,66 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; } - private int pageSize_; + private int pageSize_ ; /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -693,36 +629,30 @@ public int getPageSize() { return pageSize_; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @param value The pageSize to set. * @return This builder for chaining. */ public Builder setPageSize(int value) { - + pageSize_ = value; onChanged(); return this; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return This builder for chaining. */ public Builder clearPageSize() { - + pageSize_ = 0; onChanged(); return this; @@ -730,20 +660,18 @@ public Builder clearPageSize() { private java.lang.Object pageToken_ = ""; /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The pageToken. */ public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; @@ -752,21 +680,20 @@ public java.lang.String getPageToken() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -774,68 +701,61 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The pageToken to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + pageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return This builder for chaining. */ public Builder clearPageToken() { - + pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -845,12 +765,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListNodesRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListNodesRequest) private static final com.google.cloud.tpu.v2alpha1.ListNodesRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListNodesRequest(); } @@ -859,27 +779,27 @@ public static com.google.cloud.tpu.v2alpha1.ListNodesRequest getDefaultInstance( return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNodesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNodesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -894,4 +814,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.ListNodesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequestOrBuilder.java similarity index 50% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequestOrBuilder.java index 66910ddbb0cd..6ccc65aa25cd 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesRequestOrBuilder.java @@ -1,92 +1,59 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface ListNodesRequestOrBuilder - extends +public interface ListNodesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListNodesRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ int getPageSize(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ java.lang.String getPageToken(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - com.google.protobuf.ByteString getPageTokenBytes(); + com.google.protobuf.ByteString + getPageTokenBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponse.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponse.java similarity index 71% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponse.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponse.java index cfa5591b5b42..89cce064fb3f 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponse.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponse.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Response for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListNodesResponse} */ -public final class ListNodesResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListNodesResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListNodesResponse) ListNodesResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListNodesResponse.newBuilder() to construct. private ListNodesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListNodesResponse() { nodes_ = java.util.Collections.emptyList(); nextPageToken_ = ""; @@ -45,35 +27,32 @@ private ListNodesResponse() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListNodesResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListNodesResponse.class, - com.google.cloud.tpu.v2alpha1.ListNodesResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.ListNodesResponse.class, com.google.cloud.tpu.v2alpha1.ListNodesResponse.Builder.class); } public static final int NODES_FIELD_NUMBER = 1; private java.util.List nodes_; /** - * - * *
    * The listed nodes.
    * 
@@ -85,8 +64,6 @@ public java.util.List getNodesList() { return nodes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -94,13 +71,11 @@ public java.util.List getNodesList() { * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ @java.lang.Override - public java.util.List + public java.util.List getNodesOrBuilderList() { return nodes_; } /** - * - * *
    * The listed nodes.
    * 
@@ -112,8 +87,6 @@ public int getNodesCount() { return nodes_.size(); } /** - * - * *
    * The listed nodes.
    * 
@@ -125,8 +98,6 @@ public com.google.cloud.tpu.v2alpha1.Node getNodes(int index) { return nodes_.get(index); } /** - * - * *
    * The listed nodes.
    * 
@@ -134,21 +105,19 @@ public com.google.cloud.tpu.v2alpha1.Node getNodes(int index) { * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ @java.lang.Override - public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder( + int index) { return nodes_.get(index); } public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; private volatile java.lang.Object nextPageToken_; /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ @java.lang.Override @@ -157,29 +126,29 @@ public java.lang.String getNextPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; } } /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -190,42 +159,34 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public static final int UNREACHABLE_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList unreachable_; /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_; } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -233,23 +194,20 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -261,7 +219,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < nodes_.size(); i++) { output.writeMessage(1, nodes_.get(i)); } @@ -281,7 +240,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < nodes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nodes_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, nodes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -302,17 +262,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListNodesResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ListNodesResponse other = - (com.google.cloud.tpu.v2alpha1.ListNodesResponse) obj; + com.google.cloud.tpu.v2alpha1.ListNodesResponse other = (com.google.cloud.tpu.v2alpha1.ListNodesResponse) obj; - if (!getNodesList().equals(other.getNodesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getNodesList() + .equals(other.getNodesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,136 +301,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListNodesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListNodesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Response for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListNodesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListNodesResponse) com.google.cloud.tpu.v2alpha1.ListNodesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListNodesResponse.class, - com.google.cloud.tpu.v2alpha1.ListNodesResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.ListNodesResponse.class, com.google.cloud.tpu.v2alpha1.ListNodesResponse.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ListNodesResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -487,9 +443,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListNodesResponse_descriptor; } @java.lang.Override @@ -508,8 +464,7 @@ public com.google.cloud.tpu.v2alpha1.ListNodesResponse build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ListNodesResponse buildPartial() { - com.google.cloud.tpu.v2alpha1.ListNodesResponse result = - new com.google.cloud.tpu.v2alpha1.ListNodesResponse(this); + com.google.cloud.tpu.v2alpha1.ListNodesResponse result = new com.google.cloud.tpu.v2alpha1.ListNodesResponse(this); int from_bitField0_ = bitField0_; if (nodesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -534,39 +489,38 @@ public com.google.cloud.tpu.v2alpha1.ListNodesResponse buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ListNodesResponse) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ListNodesResponse) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListNodesResponse)other); } else { super.mergeFrom(other); return this; @@ -574,8 +528,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListNodesResponse other) { - if (other == com.google.cloud.tpu.v2alpha1.ListNodesResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.ListNodesResponse.getDefaultInstance()) return this; if (nodesBuilder_ == null) { if (!other.nodes_.isEmpty()) { if (nodes_.isEmpty()) { @@ -594,10 +547,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListNodesResponse other) nodesBuilder_ = null; nodes_ = other.nodes_; bitField0_ = (bitField0_ & ~0x00000001); - nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNodesFieldBuilder() - : null; + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodesFieldBuilder() : null; } else { nodesBuilder_.addAllMessages(other.nodes_); } @@ -643,39 +595,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v2alpha1.Node m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.Node.parser(), extensionRegistry); - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(m); - } else { - nodesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); + case 10: { + com.google.cloud.tpu.v2alpha1.Node m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.Node.parser(), + extensionRegistry); + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(m); + } else { + nodesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -685,28 +634,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.util.List nodes_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureNodesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { nodes_ = new java.util.ArrayList(nodes_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder> - nodesBuilder_; + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> nodesBuilder_; /** - * - * *
      * The listed nodes.
      * 
@@ -721,8 +663,6 @@ public java.util.List getNodesList() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -737,8 +677,6 @@ public int getNodesCount() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -753,15 +691,14 @@ public com.google.cloud.tpu.v2alpha1.Node getNodes(int index) { } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public Builder setNodes(int index, com.google.cloud.tpu.v2alpha1.Node value) { + public Builder setNodes( + int index, com.google.cloud.tpu.v2alpha1.Node value) { if (nodesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -775,15 +712,14 @@ public Builder setNodes(int index, com.google.cloud.tpu.v2alpha1.Node value) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public Builder setNodes(int index, com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { + public Builder setNodes( + int index, com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.set(index, builderForValue.build()); @@ -794,8 +730,6 @@ public Builder setNodes(int index, com.google.cloud.tpu.v2alpha1.Node.Builder bu return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -816,15 +750,14 @@ public Builder addNodes(com.google.cloud.tpu.v2alpha1.Node value) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public Builder addNodes(int index, com.google.cloud.tpu.v2alpha1.Node value) { + public Builder addNodes( + int index, com.google.cloud.tpu.v2alpha1.Node value) { if (nodesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -838,15 +771,14 @@ public Builder addNodes(int index, com.google.cloud.tpu.v2alpha1.Node value) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public Builder addNodes(com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { + public Builder addNodes( + com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.add(builderForValue.build()); @@ -857,15 +789,14 @@ public Builder addNodes(com.google.cloud.tpu.v2alpha1.Node.Builder builderForVal return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public Builder addNodes(int index, com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { + public Builder addNodes( + int index, com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.add(index, builderForValue.build()); @@ -876,8 +807,6 @@ public Builder addNodes(int index, com.google.cloud.tpu.v2alpha1.Node.Builder bu return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -888,7 +817,8 @@ public Builder addAllNodes( java.lang.Iterable values) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodes_); onChanged(); } else { nodesBuilder_.addAllMessages(values); @@ -896,8 +826,6 @@ public Builder addAllNodes( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -915,8 +843,6 @@ public Builder clearNodes() { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -934,44 +860,39 @@ public Builder removeNodes(int index) { return this; } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public com.google.cloud.tpu.v2alpha1.Node.Builder getNodesBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.Node.Builder getNodesBuilder( + int index) { return getNodesFieldBuilder().getBuilder(index); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder( + int index) { if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { + return nodes_.get(index); } else { return nodesBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public java.util.List - getNodesOrBuilderList() { + public java.util.List + getNodesOrBuilderList() { if (nodesBuilder_ != null) { return nodesBuilder_.getMessageOrBuilderList(); } else { @@ -979,8 +900,6 @@ public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder(int index) } } /** - * - * *
      * The listed nodes.
      * 
@@ -988,47 +907,42 @@ public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder(int index) * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ public com.google.cloud.tpu.v2alpha1.Node.Builder addNodesBuilder() { - return getNodesFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance()); + return getNodesFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public com.google.cloud.tpu.v2alpha1.Node.Builder addNodesBuilder(int index) { - return getNodesFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance()); + public com.google.cloud.tpu.v2alpha1.Node.Builder addNodesBuilder( + int index) { + return getNodesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - public java.util.List getNodesBuilderList() { + public java.util.List + getNodesBuilderList() { return getNodesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder> + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> getNodesFieldBuilder() { if (nodesBuilder_ == null) { - nodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder>( - nodes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder>( + nodes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); nodes_ = null; } return nodesBuilder_; @@ -1036,20 +950,18 @@ public java.util.List getNodesBuilde private java.lang.Object nextPageToken_ = ""; /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; @@ -1058,21 +970,20 @@ public java.lang.String getNextPageToken() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -1080,112 +991,95 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageToken(java.lang.String value) { + public Builder setNextPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nextPageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return This builder for chaining. */ public Builder clearNextPageToken() { - + nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The bytes for nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureUnreachableIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); bitField0_ |= 0x00000002; - } + } } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_.getUnmodifiableView(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -1193,90 +1087,80 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index to set the value at. * @param value The unreachable to set. * @return This builder for chaining. */ - public Builder setUnreachable(int index, java.lang.String value) { + public Builder setUnreachable( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.set(index, value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachable(java.lang.String value) { + public Builder addUnreachable( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param values The unreachable to add. * @return This builder for chaining. */ - public Builder addAllUnreachable(java.lang.Iterable values) { + public Builder addAllUnreachable( + java.lang.Iterable values) { ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return This builder for chaining. */ public Builder clearUnreachable() { @@ -1286,30 +1170,28 @@ public Builder clearUnreachable() { return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The bytes of the unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1319,12 +1201,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListNodesResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListNodesResponse) private static final com.google.cloud.tpu.v2alpha1.ListNodesResponse DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListNodesResponse(); } @@ -1333,27 +1215,27 @@ public static com.google.cloud.tpu.v2alpha1.ListNodesResponse getDefaultInstance return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNodesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNodesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1368,4 +1250,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.ListNodesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponseOrBuilder.java similarity index 69% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponseOrBuilder.java index 7922b1ee0a15..90a441f2b160 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListNodesResponseOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface ListNodesResponseOrBuilder - extends +public interface ListNodesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListNodesResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - java.util.List getNodesList(); + java.util.List + getNodesList(); /** - * - * *
    * The listed nodes.
    * 
@@ -44,8 +25,6 @@ public interface ListNodesResponseOrBuilder */ com.google.cloud.tpu.v2alpha1.Node getNodes(int index); /** - * - * *
    * The listed nodes.
    * 
@@ -54,99 +33,82 @@ public interface ListNodesResponseOrBuilder */ int getNodesCount(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - java.util.List getNodesOrBuilderList(); + java.util.List + getNodesOrBuilderList(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.Node nodes = 1; */ - com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodesOrBuilder( + int index); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - com.google.protobuf.ByteString getNextPageTokenBytes(); + com.google.protobuf.ByteString + getNextPageTokenBytes(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - java.util.List getUnreachableList(); + java.util.List + getUnreachableList(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ int getUnreachableCount(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - com.google.protobuf.ByteString getUnreachableBytes(int index); + com.google.protobuf.ByteString + getUnreachableBytes(int index); } diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequest.java new file mode 100644 index 000000000000..19359a61e488 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequest.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * Request for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest} + */ +public final class ListQueuedResourcesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) + ListQueuedResourcesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListQueuedResourcesRequest.newBuilder() to construct. + private ListQueuedResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListQueuedResourcesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListQueuedResourcesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.class, com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest other = (com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.class, com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest build() { + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest buildPartial() { + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest result = new com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest other) { + if (other == com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent resource name.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) + private static final com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest(); + } + + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListQueuedResourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequestOrBuilder.java new file mode 100644 index 000000000000..7dfe33465e21 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesRequestOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface ListQueuedResourcesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent resource name.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponse.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponse.java new file mode 100644 index 000000000000..37e43ae4a9a3 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponse.java @@ -0,0 +1,1255 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * Response for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse} + */ +public final class ListQueuedResourcesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse) + ListQueuedResourcesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListQueuedResourcesResponse.newBuilder() to construct. + private ListQueuedResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListQueuedResourcesResponse() { + queuedResources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListQueuedResourcesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.class, com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.Builder.class); + } + + public static final int QUEUED_RESOURCES_FIELD_NUMBER = 1; + private java.util.List queuedResources_; + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + @java.lang.Override + public java.util.List getQueuedResourcesList() { + return queuedResources_; + } + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + @java.lang.Override + public java.util.List + getQueuedResourcesOrBuilderList() { + return queuedResources_; + } + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + @java.lang.Override + public int getQueuedResourcesCount() { + return queuedResources_.size(); + } + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource getQueuedResources(int index) { + return queuedResources_.get(index); + } + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder getQueuedResourcesOrBuilder( + int index) { + return queuedResources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < queuedResources_.size(); i++) { + output.writeMessage(1, queuedResources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < queuedResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, queuedResources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse other = (com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse) obj; + + if (!getQueuedResourcesList() + .equals(other.getQueuedResourcesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQueuedResourcesCount() > 0) { + hash = (37 * hash) + QUEUED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getQueuedResourcesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse) + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.class, com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (queuedResourcesBuilder_ == null) { + queuedResources_ = java.util.Collections.emptyList(); + } else { + queuedResources_ = null; + queuedResourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListQueuedResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse build() { + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse buildPartial() { + com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse result = new com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse(this); + int from_bitField0_ = bitField0_; + if (queuedResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + queuedResources_ = java.util.Collections.unmodifiableList(queuedResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.queuedResources_ = queuedResources_; + } else { + result.queuedResources_ = queuedResourcesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse other) { + if (other == com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse.getDefaultInstance()) return this; + if (queuedResourcesBuilder_ == null) { + if (!other.queuedResources_.isEmpty()) { + if (queuedResources_.isEmpty()) { + queuedResources_ = other.queuedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQueuedResourcesIsMutable(); + queuedResources_.addAll(other.queuedResources_); + } + onChanged(); + } + } else { + if (!other.queuedResources_.isEmpty()) { + if (queuedResourcesBuilder_.isEmpty()) { + queuedResourcesBuilder_.dispose(); + queuedResourcesBuilder_ = null; + queuedResources_ = other.queuedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + queuedResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQueuedResourcesFieldBuilder() : null; + } else { + queuedResourcesBuilder_.addAllMessages(other.queuedResources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.tpu.v2alpha1.QueuedResource m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.QueuedResource.parser(), + extensionRegistry); + if (queuedResourcesBuilder_ == null) { + ensureQueuedResourcesIsMutable(); + queuedResources_.add(m); + } else { + queuedResourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List queuedResources_ = + java.util.Collections.emptyList(); + private void ensureQueuedResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + queuedResources_ = new java.util.ArrayList(queuedResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder> queuedResourcesBuilder_; + + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public java.util.List getQueuedResourcesList() { + if (queuedResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(queuedResources_); + } else { + return queuedResourcesBuilder_.getMessageList(); + } + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public int getQueuedResourcesCount() { + if (queuedResourcesBuilder_ == null) { + return queuedResources_.size(); + } else { + return queuedResourcesBuilder_.getCount(); + } + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource getQueuedResources(int index) { + if (queuedResourcesBuilder_ == null) { + return queuedResources_.get(index); + } else { + return queuedResourcesBuilder_.getMessage(index); + } + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder setQueuedResources( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource value) { + if (queuedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueuedResourcesIsMutable(); + queuedResources_.set(index, value); + onChanged(); + } else { + queuedResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder setQueuedResources( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder builderForValue) { + if (queuedResourcesBuilder_ == null) { + ensureQueuedResourcesIsMutable(); + queuedResources_.set(index, builderForValue.build()); + onChanged(); + } else { + queuedResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder addQueuedResources(com.google.cloud.tpu.v2alpha1.QueuedResource value) { + if (queuedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueuedResourcesIsMutable(); + queuedResources_.add(value); + onChanged(); + } else { + queuedResourcesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder addQueuedResources( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource value) { + if (queuedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueuedResourcesIsMutable(); + queuedResources_.add(index, value); + onChanged(); + } else { + queuedResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder addQueuedResources( + com.google.cloud.tpu.v2alpha1.QueuedResource.Builder builderForValue) { + if (queuedResourcesBuilder_ == null) { + ensureQueuedResourcesIsMutable(); + queuedResources_.add(builderForValue.build()); + onChanged(); + } else { + queuedResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder addQueuedResources( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder builderForValue) { + if (queuedResourcesBuilder_ == null) { + ensureQueuedResourcesIsMutable(); + queuedResources_.add(index, builderForValue.build()); + onChanged(); + } else { + queuedResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder addAllQueuedResources( + java.lang.Iterable values) { + if (queuedResourcesBuilder_ == null) { + ensureQueuedResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, queuedResources_); + onChanged(); + } else { + queuedResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder clearQueuedResources() { + if (queuedResourcesBuilder_ == null) { + queuedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + queuedResourcesBuilder_.clear(); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public Builder removeQueuedResources(int index) { + if (queuedResourcesBuilder_ == null) { + ensureQueuedResourcesIsMutable(); + queuedResources_.remove(index); + onChanged(); + } else { + queuedResourcesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Builder getQueuedResourcesBuilder( + int index) { + return getQueuedResourcesFieldBuilder().getBuilder(index); + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder getQueuedResourcesOrBuilder( + int index) { + if (queuedResourcesBuilder_ == null) { + return queuedResources_.get(index); } else { + return queuedResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public java.util.List + getQueuedResourcesOrBuilderList() { + if (queuedResourcesBuilder_ != null) { + return queuedResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(queuedResources_); + } + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Builder addQueuedResourcesBuilder() { + return getQueuedResourcesFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance()); + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Builder addQueuedResourcesBuilder( + int index) { + return getQueuedResourcesFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance()); + } + /** + *
+     * The listed queued resources.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + public java.util.List + getQueuedResourcesBuilderList() { + return getQueuedResourcesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder> + getQueuedResourcesFieldBuilder() { + if (queuedResourcesBuilder_ == null) { + queuedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder>( + queuedResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + queuedResources_ = null; + } + return queuedResourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next page token or empty if none.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse) + private static final com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse(); + } + + public static com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListQueuedResourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponseOrBuilder.java new file mode 100644 index 000000000000..0b37e10641ba --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListQueuedResourcesResponseOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface ListQueuedResourcesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + java.util.List + getQueuedResourcesList(); + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + com.google.cloud.tpu.v2alpha1.QueuedResource getQueuedResources(int index); + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + int getQueuedResourcesCount(); + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + java.util.List + getQueuedResourcesOrBuilderList(); + /** + *
+   * The listed queued resources.
+   * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource queued_resources = 1; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder getQueuedResourcesOrBuilder( + int index); + + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next page token or empty if none.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequest.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequest.java index 2b8243436636..6c80d7522af6 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequest.java @@ -1,43 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Request for
- * [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
+ * Request for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest} */ -public final class ListRuntimeVersionsRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListRuntimeVersionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) ListRuntimeVersionsRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListRuntimeVersionsRequest.newBuilder() to construct. private ListRuntimeVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListRuntimeVersionsRequest() { parent_ = ""; pageToken_ = ""; @@ -47,43 +28,37 @@ private ListRuntimeVersionsRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListRuntimeVersionsRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.class, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.class, com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -92,31 +67,29 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -127,14 +100,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_; /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -145,14 +115,11 @@ public int getPageSize() { public static final int PAGE_TOKEN_FIELD_NUMBER = 3; private volatile java.lang.Object pageToken_; /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ @java.lang.Override @@ -161,29 +128,29 @@ public java.lang.String getPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; } } /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -194,14 +161,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public static final int FILTER_FIELD_NUMBER = 5; private volatile java.lang.Object filter_; /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ @java.lang.Override @@ -210,29 +174,29 @@ public java.lang.String getFilter() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; } } /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -243,14 +207,11 @@ public com.google.protobuf.ByteString getFilterBytes() { public static final int ORDER_BY_FIELD_NUMBER = 6; private volatile java.lang.Object orderBy_; /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ @java.lang.Override @@ -259,29 +220,29 @@ public java.lang.String getOrderBy() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; } } /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -290,7 +251,6 @@ public com.google.protobuf.ByteString getOrderByBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -302,7 +262,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -331,7 +292,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); @@ -350,19 +312,23 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest other = - (com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest other = (com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -390,137 +356,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Request for
-   * [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
+   * Request for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.class, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.class, com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -538,9 +496,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsRequest_descriptor; } @java.lang.Override @@ -559,8 +517,7 @@ public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest result = - new com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest(this); + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest result = new com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest(this); result.parent_ = parent_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; @@ -574,39 +531,38 @@ public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest)other); } else { super.mergeFrom(other); return this; @@ -614,8 +570,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -661,43 +616,37 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - parent_ = input.readStringRequireUtf8(); + case 10: { + parent_ = input.readStringRequireUtf8(); - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); - break; - } // case 26 - case 42: - { - filter_ = input.readStringRequireUtf8(); + break; + } // case 26 + case 42: { + filter_ = input.readStringRequireUtf8(); - break; - } // case 42 - case 50: - { - orderBy_ = input.readStringRequireUtf8(); + break; + } // case 42 + case 50: { + orderBy_ = input.readStringRequireUtf8(); - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -710,22 +659,18 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -734,23 +679,20 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -758,82 +700,66 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The parent resource name.
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; } - private int pageSize_; + private int pageSize_ ; /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return The pageSize. */ @java.lang.Override @@ -841,36 +767,30 @@ public int getPageSize() { return pageSize_; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @param value The pageSize to set. * @return This builder for chaining. */ public Builder setPageSize(int value) { - + pageSize_ = value; onChanged(); return this; } /** - * - * *
      * The maximum number of items to return.
      * 
* * int32 page_size = 2; - * * @return This builder for chaining. */ public Builder clearPageSize() { - + pageSize_ = 0; onChanged(); return this; @@ -878,20 +798,18 @@ public Builder clearPageSize() { private java.lang.Object pageToken_ = ""; /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The pageToken. */ public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageToken_ = s; return s; @@ -900,21 +818,20 @@ public java.lang.String getPageToken() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - public com.google.protobuf.ByteString getPageTokenBytes() { + public com.google.protobuf.ByteString + getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); pageToken_ = b; return b; } else { @@ -922,61 +839,54 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The pageToken to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + pageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @return This builder for chaining. */ public Builder clearPageToken() { - + pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /** - * - * *
      * The next_page_token value returned from a previous List request, if any.
      * 
* * string page_token = 3; - * * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; onChanged(); return this; @@ -984,20 +894,18 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { private java.lang.Object filter_ = ""; /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filter_ = s; return s; @@ -1006,21 +914,20 @@ public java.lang.String getFilter() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return The bytes for filter. */ - public com.google.protobuf.ByteString getFilterBytes() { + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { @@ -1028,61 +935,54 @@ public com.google.protobuf.ByteString getFilterBytes() { } } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The filter to set. * @return This builder for chaining. */ - public Builder setFilter(java.lang.String value) { + public Builder setFilter( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + filter_ = value; onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @return This builder for chaining. */ public Builder clearFilter() { - + filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } /** - * - * *
      * List filter.
      * 
* * string filter = 5; - * * @param value The bytes for filter to set. * @return This builder for chaining. */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; onChanged(); return this; @@ -1090,20 +990,18 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { private java.lang.Object orderBy_ = ""; /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The orderBy. */ public java.lang.String getOrderBy() { java.lang.Object ref = orderBy_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); orderBy_ = s; return s; @@ -1112,21 +1010,20 @@ public java.lang.String getOrderBy() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - public com.google.protobuf.ByteString getOrderByBytes() { + public com.google.protobuf.ByteString + getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); orderBy_ = b; return b; } else { @@ -1134,68 +1031,61 @@ public com.google.protobuf.ByteString getOrderByBytes() { } } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The orderBy to set. * @return This builder for chaining. */ - public Builder setOrderBy(java.lang.String value) { + public Builder setOrderBy( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + orderBy_ = value; onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @return This builder for chaining. */ public Builder clearOrderBy() { - + orderBy_ = getDefaultInstance().getOrderBy(); onChanged(); return this; } /** - * - * *
      * Sort results.
      * 
* * string order_by = 6; - * * @param value The bytes for orderBy to set. * @return This builder for chaining. */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1205,12 +1095,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) private static final com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest(); } @@ -1219,27 +1109,27 @@ public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest getDefaul return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListRuntimeVersionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuntimeVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1254,4 +1144,6 @@ public com.google.protobuf.Parser getParserForType() public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequestOrBuilder.java similarity index 57% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequestOrBuilder.java index 115c5374b8c3..9b0732a3aba4 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsRequestOrBuilder.java @@ -1,142 +1,99 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface ListRuntimeVersionsRequestOrBuilder - extends +public interface ListRuntimeVersionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The parent resource name.
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * The maximum number of items to return.
    * 
* * int32 page_size = 2; - * * @return The pageSize. */ int getPageSize(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The pageToken. */ java.lang.String getPageToken(); /** - * - * *
    * The next_page_token value returned from a previous List request, if any.
    * 
* * string page_token = 3; - * * @return The bytes for pageToken. */ - com.google.protobuf.ByteString getPageTokenBytes(); + com.google.protobuf.ByteString + getPageTokenBytes(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The filter. */ java.lang.String getFilter(); /** - * - * *
    * List filter.
    * 
* * string filter = 5; - * * @return The bytes for filter. */ - com.google.protobuf.ByteString getFilterBytes(); + com.google.protobuf.ByteString + getFilterBytes(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The orderBy. */ java.lang.String getOrderBy(); /** - * - * *
    * Sort results.
    * 
* * string order_by = 6; - * * @return The bytes for orderBy. */ - com.google.protobuf.ByteString getOrderByBytes(); + com.google.protobuf.ByteString + getOrderByBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponse.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponse.java similarity index 72% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponse.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponse.java index de3b56447e45..56174f0efbd5 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponse.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponse.java @@ -1,43 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
- * Response for
- * [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
+ * Response for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse} */ -public final class ListRuntimeVersionsResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ListRuntimeVersionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) ListRuntimeVersionsResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ListRuntimeVersionsResponse.newBuilder() to construct. private ListRuntimeVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListRuntimeVersionsResponse() { runtimeVersions_ = java.util.Collections.emptyList(); nextPageToken_ = ""; @@ -46,35 +27,32 @@ private ListRuntimeVersionsResponse() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ListRuntimeVersionsResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.class, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.class, com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.Builder.class); } public static final int RUNTIME_VERSIONS_FIELD_NUMBER = 1; private java.util.List runtimeVersions_; /** - * - * *
    * The listed nodes.
    * 
@@ -86,8 +64,6 @@ public java.util.List getRuntimeVe return runtimeVersions_; } /** - * - * *
    * The listed nodes.
    * 
@@ -95,13 +71,11 @@ public java.util.List getRuntimeVe * repeated .google.cloud.tpu.v2alpha1.RuntimeVersion runtime_versions = 1; */ @java.lang.Override - public java.util.List + public java.util.List getRuntimeVersionsOrBuilderList() { return runtimeVersions_; } /** - * - * *
    * The listed nodes.
    * 
@@ -113,8 +87,6 @@ public int getRuntimeVersionsCount() { return runtimeVersions_.size(); } /** - * - * *
    * The listed nodes.
    * 
@@ -126,8 +98,6 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion getRuntimeVersions(int index return runtimeVersions_.get(index); } /** - * - * *
    * The listed nodes.
    * 
@@ -143,14 +113,11 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder getRuntimeVersionsO public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; private volatile java.lang.Object nextPageToken_; /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ @java.lang.Override @@ -159,29 +126,29 @@ public java.lang.String getNextPageToken() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; } } /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -192,42 +159,34 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public static final int UNREACHABLE_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList unreachable_; /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_; } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -235,23 +194,20 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -263,7 +219,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { for (int i = 0; i < runtimeVersions_.size(); i++) { output.writeMessage(1, runtimeVersions_.get(i)); } @@ -283,7 +240,8 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < runtimeVersions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, runtimeVersions_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, runtimeVersions_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -304,17 +262,19 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse other = - (com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) obj; + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse other = (com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) obj; - if (!getRuntimeVersionsList().equals(other.getRuntimeVersionsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getRuntimeVersionsList() + .equals(other.getRuntimeVersionsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,137 +302,129 @@ public int hashCode() { } public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse prototype) { + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
-   * Response for
-   * [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
+   * Response for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.class, - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.Builder.class); + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.class, com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -491,9 +443,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ListRuntimeVersionsResponse_descriptor; } @java.lang.Override @@ -512,8 +464,7 @@ public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse buildPartial() { - com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse result = - new com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse(this); + com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse result = new com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse(this); int from_bitField0_ = bitField0_; if (runtimeVersionsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -538,39 +489,38 @@ public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse buildPartial() public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse)other); } else { super.mergeFrom(other); return this; @@ -578,8 +528,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse other) { - if (other == com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse.getDefaultInstance()) return this; if (runtimeVersionsBuilder_ == null) { if (!other.runtimeVersions_.isEmpty()) { if (runtimeVersions_.isEmpty()) { @@ -598,10 +547,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRespon runtimeVersionsBuilder_ = null; runtimeVersions_ = other.runtimeVersions_; bitField0_ = (bitField0_ & ~0x00000001); - runtimeVersionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRuntimeVersionsFieldBuilder() - : null; + runtimeVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRuntimeVersionsFieldBuilder() : null; } else { runtimeVersionsBuilder_.addAllMessages(other.runtimeVersions_); } @@ -647,39 +595,36 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - com.google.cloud.tpu.v2alpha1.RuntimeVersion m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.RuntimeVersion.parser(), extensionRegistry); - if (runtimeVersionsBuilder_ == null) { - ensureRuntimeVersionsIsMutable(); - runtimeVersions_.add(m); - } else { - runtimeVersionsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); + case 10: { + com.google.cloud.tpu.v2alpha1.RuntimeVersion m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.RuntimeVersion.parser(), + extensionRegistry); + if (runtimeVersionsBuilder_ == null) { + ensureRuntimeVersionsIsMutable(); + runtimeVersions_.add(m); + } else { + runtimeVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -689,29 +634,21 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.util.List runtimeVersions_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureRuntimeVersionsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - runtimeVersions_ = - new java.util.ArrayList(runtimeVersions_); + runtimeVersions_ = new java.util.ArrayList(runtimeVersions_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.RuntimeVersion, - com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder, - com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder> - runtimeVersionsBuilder_; + com.google.cloud.tpu.v2alpha1.RuntimeVersion, com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder, com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder> runtimeVersionsBuilder_; /** - * - * *
      * The listed nodes.
      * 
@@ -726,8 +663,6 @@ public java.util.List getRuntimeVe } } /** - * - * *
      * The listed nodes.
      * 
@@ -742,8 +677,6 @@ public int getRuntimeVersionsCount() { } } /** - * - * *
      * The listed nodes.
      * 
@@ -758,8 +691,6 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion getRuntimeVersions(int index } } /** - * - * *
      * The listed nodes.
      * 
@@ -781,8 +712,6 @@ public Builder setRuntimeVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -801,8 +730,6 @@ public Builder setRuntimeVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -823,8 +750,6 @@ public Builder addRuntimeVersions(com.google.cloud.tpu.v2alpha1.RuntimeVersion v return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -846,8 +771,6 @@ public Builder addRuntimeVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -866,8 +789,6 @@ public Builder addRuntimeVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -886,8 +807,6 @@ public Builder addRuntimeVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -898,7 +817,8 @@ public Builder addAllRuntimeVersions( java.lang.Iterable values) { if (runtimeVersionsBuilder_ == null) { ensureRuntimeVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, runtimeVersions_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, runtimeVersions_); onChanged(); } else { runtimeVersionsBuilder_.addAllMessages(values); @@ -906,8 +826,6 @@ public Builder addAllRuntimeVersions( return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -925,8 +843,6 @@ public Builder clearRuntimeVersions() { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -944,8 +860,6 @@ public Builder removeRuntimeVersions(int index) { return this; } /** - * - * *
      * The listed nodes.
      * 
@@ -957,8 +871,6 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder getRuntimeVersionsBu return getRuntimeVersionsFieldBuilder().getBuilder(index); } /** - * - * *
      * The listed nodes.
      * 
@@ -968,22 +880,19 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder getRuntimeVersionsBu public com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder getRuntimeVersionsOrBuilder( int index) { if (runtimeVersionsBuilder_ == null) { - return runtimeVersions_.get(index); - } else { + return runtimeVersions_.get(index); } else { return runtimeVersionsBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.RuntimeVersion runtime_versions = 1; */ - public java.util.List - getRuntimeVersionsOrBuilderList() { + public java.util.List + getRuntimeVersionsOrBuilderList() { if (runtimeVersionsBuilder_ != null) { return runtimeVersionsBuilder_.getMessageOrBuilderList(); } else { @@ -991,8 +900,6 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder getRuntimeVersionsO } } /** - * - * *
      * The listed nodes.
      * 
@@ -1000,12 +907,10 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder getRuntimeVersionsO * repeated .google.cloud.tpu.v2alpha1.RuntimeVersion runtime_versions = 1; */ public com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder addRuntimeVersionsBuilder() { - return getRuntimeVersionsFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.RuntimeVersion.getDefaultInstance()); + return getRuntimeVersionsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.RuntimeVersion.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
@@ -1014,34 +919,26 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder addRuntimeVersionsBu */ public com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder addRuntimeVersionsBuilder( int index) { - return getRuntimeVersionsFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v2alpha1.RuntimeVersion.getDefaultInstance()); + return getRuntimeVersionsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.RuntimeVersion.getDefaultInstance()); } /** - * - * *
      * The listed nodes.
      * 
* * repeated .google.cloud.tpu.v2alpha1.RuntimeVersion runtime_versions = 1; */ - public java.util.List - getRuntimeVersionsBuilderList() { + public java.util.List + getRuntimeVersionsBuilderList() { return getRuntimeVersionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.RuntimeVersion, - com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder, - com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder> + com.google.cloud.tpu.v2alpha1.RuntimeVersion, com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder, com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder> getRuntimeVersionsFieldBuilder() { if (runtimeVersionsBuilder_ == null) { - runtimeVersionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.RuntimeVersion, - com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder, - com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder>( + runtimeVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.RuntimeVersion, com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder, com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder>( runtimeVersions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -1053,20 +950,18 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder addRuntimeVersionsBu private java.lang.Object nextPageToken_ = ""; /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); nextPageToken_ = s; return s; @@ -1075,21 +970,20 @@ public java.lang.String getNextPageToken() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { + public com.google.protobuf.ByteString + getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); nextPageToken_ = b; return b; } else { @@ -1097,112 +991,95 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { } } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageToken(java.lang.String value) { + public Builder setNextPageToken( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + nextPageToken_ = value; onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @return This builder for chaining. */ public Builder clearNextPageToken() { - + nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /** - * - * *
      * The next page token or empty if none.
      * 
* * string next_page_token = 2; - * * @param value The bytes for nextPageToken to set. * @return This builder for chaining. */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureUnreachableIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); bitField0_ |= 0x00000002; - } + } } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { + public com.google.protobuf.ProtocolStringList + getUnreachableList() { return unreachable_.getUnmodifiableView(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ public int getUnreachableCount() { return unreachable_.size(); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ @@ -1210,90 +1087,80 @@ public java.lang.String getUnreachable(int index) { return unreachable_.get(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { return unreachable_.getByteString(index); } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param index The index to set the value at. * @param value The unreachable to set. * @return This builder for chaining. */ - public Builder setUnreachable(int index, java.lang.String value) { + public Builder setUnreachable( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.set(index, value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachable(java.lang.String value) { + public Builder addUnreachable( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param values The unreachable to add. * @return This builder for chaining. */ - public Builder addAllUnreachable(java.lang.Iterable values) { + public Builder addAllUnreachable( + java.lang.Iterable values) { ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); onChanged(); return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @return This builder for chaining. */ public Builder clearUnreachable() { @@ -1303,30 +1170,28 @@ public Builder clearUnreachable() { return this; } /** - * - * *
      * Locations that could not be reached.
      * 
* * repeated string unreachable = 3; - * * @param value The bytes of the unreachable to add. * @return This builder for chaining. */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureUnreachableIsMutable(); unreachable_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1336,12 +1201,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) private static final com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse(); } @@ -1350,27 +1215,27 @@ public static com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse getDefau return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListRuntimeVersionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuntimeVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1385,4 +1250,6 @@ public com.google.protobuf.Parser getParserForType( public com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponseOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponseOrBuilder.java similarity index 70% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponseOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponseOrBuilder.java index 86f9ef995705..2613e6e3d961 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponseOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ListRuntimeVersionsResponseOrBuilder.java @@ -1,41 +1,22 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface ListRuntimeVersionsResponseOrBuilder - extends +public interface ListRuntimeVersionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.RuntimeVersion runtime_versions = 1; */ - java.util.List getRuntimeVersionsList(); + java.util.List + getRuntimeVersionsList(); /** - * - * *
    * The listed nodes.
    * 
@@ -44,8 +25,6 @@ public interface ListRuntimeVersionsResponseOrBuilder */ com.google.cloud.tpu.v2alpha1.RuntimeVersion getRuntimeVersions(int index); /** - * - * *
    * The listed nodes.
    * 
@@ -54,100 +33,82 @@ public interface ListRuntimeVersionsResponseOrBuilder */ int getRuntimeVersionsCount(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.RuntimeVersion runtime_versions = 1; */ - java.util.List + java.util.List getRuntimeVersionsOrBuilderList(); /** - * - * *
    * The listed nodes.
    * 
* * repeated .google.cloud.tpu.v2alpha1.RuntimeVersion runtime_versions = 1; */ - com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder getRuntimeVersionsOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder getRuntimeVersionsOrBuilder( + int index); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** - * - * *
    * The next page token or empty if none.
    * 
* * string next_page_token = 2; - * * @return The bytes for nextPageToken. */ - com.google.protobuf.ByteString getNextPageTokenBytes(); + com.google.protobuf.ByteString + getNextPageTokenBytes(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return A list containing the unreachable. */ - java.util.List getUnreachableList(); + java.util.List + getUnreachableList(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @return The count of unreachable. */ int getUnreachableCount(); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the element to return. * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); /** - * - * *
    * Locations that could not be reached.
    * 
* * repeated string unreachable = 3; - * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ - com.google.protobuf.ByteString getUnreachableBytes(int index); + com.google.protobuf.ByteString + getUnreachableBytes(int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/LocationName.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/LocationName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/LocationName.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/LocationName.java diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfig.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfig.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfig.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfig.java index 004837586bd7..ae77d4acae8c 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfig.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfig.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Network related configurations.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.NetworkConfig} */ -public final class NetworkConfig extends com.google.protobuf.GeneratedMessageV3 - implements +public final class NetworkConfig extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.NetworkConfig) NetworkConfigOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use NetworkConfig.newBuilder() to construct. private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private NetworkConfig() { network_ = ""; subnetwork_ = ""; @@ -44,42 +26,38 @@ private NetworkConfig() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new NetworkConfig(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.NetworkConfig.class, - com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.NetworkConfig.class, com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder.class); } public static final int NETWORK_FIELD_NUMBER = 1; private volatile java.lang.Object network_; /** - * - * *
    * The name of the network for the TPU node. It must be a preexisting Google
    * Compute Engine network. If none is provided, "default" will be used.
    * 
* * string network = 1; - * * @return The network. */ @java.lang.Override @@ -88,30 +66,30 @@ public java.lang.String getNetwork() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); network_ = s; return s; } } /** - * - * *
    * The name of the network for the TPU node. It must be a preexisting Google
    * Compute Engine network. If none is provided, "default" will be used.
    * 
* * string network = 1; - * * @return The bytes for network. */ @java.lang.Override - public com.google.protobuf.ByteString getNetworkBytes() { + public com.google.protobuf.ByteString + getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); network_ = b; return b; } else { @@ -122,8 +100,6 @@ public com.google.protobuf.ByteString getNetworkBytes() { public static final int SUBNETWORK_FIELD_NUMBER = 2; private volatile java.lang.Object subnetwork_; /** - * - * *
    * The name of the subnetwork for the TPU node. It must be a preexisting
    * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -131,7 +107,6 @@ public com.google.protobuf.ByteString getNetworkBytes() {
    * 
* * string subnetwork = 2; - * * @return The subnetwork. */ @java.lang.Override @@ -140,15 +115,14 @@ public java.lang.String getSubnetwork() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); subnetwork_ = s; return s; } } /** - * - * *
    * The name of the subnetwork for the TPU node. It must be a preexisting
    * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -156,15 +130,16 @@ public java.lang.String getSubnetwork() {
    * 
* * string subnetwork = 2; - * * @return The bytes for subnetwork. */ @java.lang.Override - public com.google.protobuf.ByteString getSubnetworkBytes() { + public com.google.protobuf.ByteString + getSubnetworkBytes() { java.lang.Object ref = subnetwork_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); subnetwork_ = b; return b; } else { @@ -175,8 +150,6 @@ public com.google.protobuf.ByteString getSubnetworkBytes() { public static final int ENABLE_EXTERNAL_IPS_FIELD_NUMBER = 3; private boolean enableExternalIps_; /** - * - * *
    * Indicates that external IP addresses would be associated with the TPU
    * workers. If set to false, the specified subnetwork or network should have
@@ -184,7 +157,6 @@ public com.google.protobuf.ByteString getSubnetworkBytes() {
    * 
* * bool enable_external_ips = 3; - * * @return The enableExternalIps. */ @java.lang.Override @@ -192,8 +164,24 @@ public boolean getEnableExternalIps() { return enableExternalIps_; } - private byte memoizedIsInitialized = -1; + public static final int CAN_IP_FORWARD_FIELD_NUMBER = 4; + private boolean canIpForward_; + /** + *
+   * Allows the TPU node to send and receive packets with non-matching
+   * destination or source IPs. This is required if you plan to use the TPU
+   * workers to forward routes.
+   * 
+ * + * bool can_ip_forward = 4; + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -205,7 +193,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); } @@ -215,6 +204,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableExternalIps_ != false) { output.writeBool(3, enableExternalIps_); } + if (canIpForward_ != false) { + output.writeBool(4, canIpForward_); + } getUnknownFields().writeTo(output); } @@ -231,7 +223,12 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subnetwork_); } if (enableExternalIps_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableExternalIps_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enableExternalIps_); + } + if (canIpForward_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, canIpForward_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -241,17 +238,21 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.NetworkConfig)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.NetworkConfig other = - (com.google.cloud.tpu.v2alpha1.NetworkConfig) obj; + com.google.cloud.tpu.v2alpha1.NetworkConfig other = (com.google.cloud.tpu.v2alpha1.NetworkConfig) obj; - if (!getNetwork().equals(other.getNetwork())) return false; - if (!getSubnetwork().equals(other.getSubnetwork())) return false; - if (getEnableExternalIps() != other.getEnableExternalIps()) return false; + if (!getNetwork() + .equals(other.getNetwork())) return false; + if (!getSubnetwork() + .equals(other.getSubnetwork())) return false; + if (getEnableExternalIps() + != other.getEnableExternalIps()) return false; + if (getCanIpForward() + != other.getCanIpForward()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -268,142 +269,140 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; hash = (53 * hash) + getSubnetwork().hashCode(); hash = (37 * hash) + ENABLE_EXTERNAL_IPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableExternalIps()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableExternalIps()); + hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCanIpForward()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.NetworkConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.NetworkConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Network related configurations.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.NetworkConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.NetworkConfig) com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.NetworkConfig.class, - com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.NetworkConfig.class, com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.NetworkConfig.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -413,13 +412,15 @@ public Builder clear() { enableExternalIps_ = false; + canIpForward_ = false; + return this; } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkConfig_descriptor; } @java.lang.Override @@ -438,11 +439,11 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfig build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.NetworkConfig buildPartial() { - com.google.cloud.tpu.v2alpha1.NetworkConfig result = - new com.google.cloud.tpu.v2alpha1.NetworkConfig(this); + com.google.cloud.tpu.v2alpha1.NetworkConfig result = new com.google.cloud.tpu.v2alpha1.NetworkConfig(this); result.network_ = network_; result.subnetwork_ = subnetwork_; result.enableExternalIps_ = enableExternalIps_; + result.canIpForward_ = canIpForward_; onBuilt(); return result; } @@ -451,39 +452,38 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfig buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.NetworkConfig) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.NetworkConfig) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.NetworkConfig)other); } else { super.mergeFrom(other); return this; @@ -503,6 +503,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.NetworkConfig other) { if (other.getEnableExternalIps() != false) { setEnableExternalIps(other.getEnableExternalIps()); } + if (other.getCanIpForward() != false) { + setCanIpForward(other.getCanIpForward()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -529,31 +532,32 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - network_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - subnetwork_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: - { - enableExternalIps_ = input.readBool(); - - break; - } // case 24 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + network_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + subnetwork_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + enableExternalIps_ = input.readBool(); + + break; + } // case 24 + case 32: { + canIpForward_ = input.readBool(); + + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -566,21 +570,19 @@ public Builder mergeFrom( private java.lang.Object network_ = ""; /** - * - * *
      * The name of the network for the TPU node. It must be a preexisting Google
      * Compute Engine network. If none is provided, "default" will be used.
      * 
* * string network = 1; - * * @return The network. */ public java.lang.String getNetwork() { java.lang.Object ref = network_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); network_ = s; return s; @@ -589,22 +591,21 @@ public java.lang.String getNetwork() { } } /** - * - * *
      * The name of the network for the TPU node. It must be a preexisting Google
      * Compute Engine network. If none is provided, "default" will be used.
      * 
* * string network = 1; - * * @return The bytes for network. */ - public com.google.protobuf.ByteString getNetworkBytes() { + public com.google.protobuf.ByteString + getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); network_ = b; return b; } else { @@ -612,64 +613,57 @@ public com.google.protobuf.ByteString getNetworkBytes() { } } /** - * - * *
      * The name of the network for the TPU node. It must be a preexisting Google
      * Compute Engine network. If none is provided, "default" will be used.
      * 
* * string network = 1; - * * @param value The network to set. * @return This builder for chaining. */ - public Builder setNetwork(java.lang.String value) { + public Builder setNetwork( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + network_ = value; onChanged(); return this; } /** - * - * *
      * The name of the network for the TPU node. It must be a preexisting Google
      * Compute Engine network. If none is provided, "default" will be used.
      * 
* * string network = 1; - * * @return This builder for chaining. */ public Builder clearNetwork() { - + network_ = getDefaultInstance().getNetwork(); onChanged(); return this; } /** - * - * *
      * The name of the network for the TPU node. It must be a preexisting Google
      * Compute Engine network. If none is provided, "default" will be used.
      * 
* * string network = 1; - * * @param value The bytes for network to set. * @return This builder for chaining. */ - public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + public Builder setNetworkBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; onChanged(); return this; @@ -677,8 +671,6 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { private java.lang.Object subnetwork_ = ""; /** - * - * *
      * The name of the subnetwork for the TPU node. It must be a preexisting
      * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -686,13 +678,13 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) {
      * 
* * string subnetwork = 2; - * * @return The subnetwork. */ public java.lang.String getSubnetwork() { java.lang.Object ref = subnetwork_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); subnetwork_ = s; return s; @@ -701,8 +693,6 @@ public java.lang.String getSubnetwork() { } } /** - * - * *
      * The name of the subnetwork for the TPU node. It must be a preexisting
      * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -710,14 +700,15 @@ public java.lang.String getSubnetwork() {
      * 
* * string subnetwork = 2; - * * @return The bytes for subnetwork. */ - public com.google.protobuf.ByteString getSubnetworkBytes() { + public com.google.protobuf.ByteString + getSubnetworkBytes() { java.lang.Object ref = subnetwork_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); subnetwork_ = b; return b; } else { @@ -725,8 +716,6 @@ public com.google.protobuf.ByteString getSubnetworkBytes() { } } /** - * - * *
      * The name of the subnetwork for the TPU node. It must be a preexisting
      * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -734,22 +723,20 @@ public com.google.protobuf.ByteString getSubnetworkBytes() {
      * 
* * string subnetwork = 2; - * * @param value The subnetwork to set. * @return This builder for chaining. */ - public Builder setSubnetwork(java.lang.String value) { + public Builder setSubnetwork( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + subnetwork_ = value; onChanged(); return this; } /** - * - * *
      * The name of the subnetwork for the TPU node. It must be a preexisting
      * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -757,18 +744,15 @@ public Builder setSubnetwork(java.lang.String value) {
      * 
* * string subnetwork = 2; - * * @return This builder for chaining. */ public Builder clearSubnetwork() { - + subnetwork_ = getDefaultInstance().getSubnetwork(); onChanged(); return this; } /** - * - * *
      * The name of the subnetwork for the TPU node. It must be a preexisting
      * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -776,25 +760,23 @@ public Builder clearSubnetwork() {
      * 
* * string subnetwork = 2; - * * @param value The bytes for subnetwork to set. * @return This builder for chaining. */ - public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + public Builder setSubnetworkBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetwork_ = value; onChanged(); return this; } - private boolean enableExternalIps_; + private boolean enableExternalIps_ ; /** - * - * *
      * Indicates that external IP addresses would be associated with the TPU
      * workers. If set to false, the specified subnetwork or network should have
@@ -802,7 +784,6 @@ public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) {
      * 
* * bool enable_external_ips = 3; - * * @return The enableExternalIps. */ @java.lang.Override @@ -810,8 +791,6 @@ public boolean getEnableExternalIps() { return enableExternalIps_; } /** - * - * *
      * Indicates that external IP addresses would be associated with the TPU
      * workers. If set to false, the specified subnetwork or network should have
@@ -819,19 +798,16 @@ public boolean getEnableExternalIps() {
      * 
* * bool enable_external_ips = 3; - * * @param value The enableExternalIps to set. * @return This builder for chaining. */ public Builder setEnableExternalIps(boolean value) { - + enableExternalIps_ = value; onChanged(); return this; } /** - * - * *
      * Indicates that external IP addresses would be associated with the TPU
      * workers. If set to false, the specified subnetwork or network should have
@@ -839,18 +815,66 @@ public Builder setEnableExternalIps(boolean value) {
      * 
* * bool enable_external_ips = 3; - * * @return This builder for chaining. */ public Builder clearEnableExternalIps() { - + enableExternalIps_ = false; onChanged(); return this; } + private boolean canIpForward_ ; + /** + *
+     * Allows the TPU node to send and receive packets with non-matching
+     * destination or source IPs. This is required if you plan to use the TPU
+     * workers to forward routes.
+     * 
+ * + * bool can_ip_forward = 4; + * @return The canIpForward. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public boolean getCanIpForward() { + return canIpForward_; + } + /** + *
+     * Allows the TPU node to send and receive packets with non-matching
+     * destination or source IPs. This is required if you plan to use the TPU
+     * workers to forward routes.
+     * 
+ * + * bool can_ip_forward = 4; + * @param value The canIpForward to set. + * @return This builder for chaining. + */ + public Builder setCanIpForward(boolean value) { + + canIpForward_ = value; + onChanged(); + return this; + } + /** + *
+     * Allows the TPU node to send and receive packets with non-matching
+     * destination or source IPs. This is required if you plan to use the TPU
+     * workers to forward routes.
+     * 
+ * + * bool can_ip_forward = 4; + * @return This builder for chaining. + */ + public Builder clearCanIpForward() { + + canIpForward_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -860,12 +884,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.NetworkConfig) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.NetworkConfig) private static final com.google.cloud.tpu.v2alpha1.NetworkConfig DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.NetworkConfig(); } @@ -874,27 +898,27 @@ public static com.google.cloud.tpu.v2alpha1.NetworkConfig getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -909,4 +933,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.NetworkConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfigOrBuilder.java similarity index 68% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfigOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfigOrBuilder.java index 75b07d7aebf9..5b330b83facf 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfigOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkConfigOrBuilder.java @@ -1,58 +1,35 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface NetworkConfigOrBuilder - extends +public interface NetworkConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.NetworkConfig) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The name of the network for the TPU node. It must be a preexisting Google
    * Compute Engine network. If none is provided, "default" will be used.
    * 
* * string network = 1; - * * @return The network. */ java.lang.String getNetwork(); /** - * - * *
    * The name of the network for the TPU node. It must be a preexisting Google
    * Compute Engine network. If none is provided, "default" will be used.
    * 
* * string network = 1; - * * @return The bytes for network. */ - com.google.protobuf.ByteString getNetworkBytes(); + com.google.protobuf.ByteString + getNetworkBytes(); /** - * - * *
    * The name of the subnetwork for the TPU node. It must be a preexisting
    * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -60,13 +37,10 @@ public interface NetworkConfigOrBuilder
    * 
* * string subnetwork = 2; - * * @return The subnetwork. */ java.lang.String getSubnetwork(); /** - * - * *
    * The name of the subnetwork for the TPU node. It must be a preexisting
    * Google Compute Engine subnetwork. If none is provided, "default" will be
@@ -74,14 +48,12 @@ public interface NetworkConfigOrBuilder
    * 
* * string subnetwork = 2; - * * @return The bytes for subnetwork. */ - com.google.protobuf.ByteString getSubnetworkBytes(); + com.google.protobuf.ByteString + getSubnetworkBytes(); /** - * - * *
    * Indicates that external IP addresses would be associated with the TPU
    * workers. If set to false, the specified subnetwork or network should have
@@ -89,8 +61,19 @@ public interface NetworkConfigOrBuilder
    * 
* * bool enable_external_ips = 3; - * * @return The enableExternalIps. */ boolean getEnableExternalIps(); + + /** + *
+   * Allows the TPU node to send and receive packets with non-matching
+   * destination or source IPs. This is required if you plan to use the TPU
+   * workers to forward routes.
+   * 
+ * + * bool can_ip_forward = 4; + * @return The canIpForward. + */ + boolean getCanIpForward(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpoint.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpoint.java similarity index 69% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpoint.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpoint.java index b0ce0ae2b3e9..b9469abc0826 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpoint.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpoint.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A network endpoint over which a TPU worker can be reached.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.NetworkEndpoint} */ -public final class NetworkEndpoint extends com.google.protobuf.GeneratedMessageV3 - implements +public final class NetworkEndpoint extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.NetworkEndpoint) NetworkEndpointOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use NetworkEndpoint.newBuilder() to construct. private NetworkEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private NetworkEndpoint() { ipAddress_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new NetworkEndpoint(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.class, - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder.class); + com.google.cloud.tpu.v2alpha1.NetworkEndpoint.class, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder.class); } public static final int IP_ADDRESS_FIELD_NUMBER = 1; private volatile java.lang.Object ipAddress_; /** - * - * *
    * The internal IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The ipAddress. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getIpAddress() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); ipAddress_ = s; return s; } } /** - * - * *
    * The internal IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The bytes for ipAddress. */ @java.lang.Override - public com.google.protobuf.ByteString getIpAddressBytes() { + public com.google.protobuf.ByteString + getIpAddressBytes() { java.lang.Object ref = ipAddress_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ipAddress_ = b; return b; } else { @@ -119,14 +97,11 @@ public com.google.protobuf.ByteString getIpAddressBytes() { public static final int PORT_FIELD_NUMBER = 2; private int port_; /** - * - * *
    * The port of this network endpoint.
    * 
* * int32 port = 2; - * * @return The port. */ @java.lang.Override @@ -137,14 +112,11 @@ public int getPort() { public static final int ACCESS_CONFIG_FIELD_NUMBER = 5; private com.google.cloud.tpu.v2alpha1.AccessConfig accessConfig_; /** - * - * *
    * The access config for the TPU worker.
    * 
* * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; - * * @return Whether the accessConfig field is set. */ @java.lang.Override @@ -152,25 +124,18 @@ public boolean hasAccessConfig() { return accessConfig_ != null; } /** - * - * *
    * The access config for the TPU worker.
    * 
* * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; - * * @return The accessConfig. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.AccessConfig getAccessConfig() { - return accessConfig_ == null - ? com.google.cloud.tpu.v2alpha1.AccessConfig.getDefaultInstance() - : accessConfig_; + return accessConfig_ == null ? com.google.cloud.tpu.v2alpha1.AccessConfig.getDefaultInstance() : accessConfig_; } /** - * - * *
    * The access config for the TPU worker.
    * 
@@ -183,7 +148,6 @@ public com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder getAccessConfigOrBuil } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -195,7 +159,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); } @@ -218,10 +183,12 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); } if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, port_); } if (accessConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAccessConfig()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getAccessConfig()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -231,19 +198,21 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.NetworkEndpoint)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.NetworkEndpoint other = - (com.google.cloud.tpu.v2alpha1.NetworkEndpoint) obj; + com.google.cloud.tpu.v2alpha1.NetworkEndpoint other = (com.google.cloud.tpu.v2alpha1.NetworkEndpoint) obj; - if (!getIpAddress().equals(other.getIpAddress())) return false; - if (getPort() != other.getPort()) return false; + if (!getIpAddress() + .equals(other.getIpAddress())) return false; + if (getPort() + != other.getPort()) return false; if (hasAccessConfig() != other.hasAccessConfig()) return false; if (hasAccessConfig()) { - if (!getAccessConfig().equals(other.getAccessConfig())) return false; + if (!getAccessConfig() + .equals(other.getAccessConfig())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -269,136 +238,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.NetworkEndpoint prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A network endpoint over which a TPU worker can be reached.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.NetworkEndpoint} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.NetworkEndpoint) com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.class, - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder.class); + com.google.cloud.tpu.v2alpha1.NetworkEndpoint.class, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.NetworkEndpoint.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -416,9 +379,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_NetworkEndpoint_descriptor; } @java.lang.Override @@ -437,8 +400,7 @@ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.NetworkEndpoint buildPartial() { - com.google.cloud.tpu.v2alpha1.NetworkEndpoint result = - new com.google.cloud.tpu.v2alpha1.NetworkEndpoint(this); + com.google.cloud.tpu.v2alpha1.NetworkEndpoint result = new com.google.cloud.tpu.v2alpha1.NetworkEndpoint(this); result.ipAddress_ = ipAddress_; result.port_ = port_; if (accessConfigBuilder_ == null) { @@ -454,39 +416,38 @@ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.NetworkEndpoint) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.NetworkEndpoint) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.NetworkEndpoint)other); } else { super.mergeFrom(other); return this; @@ -531,31 +492,29 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - ipAddress_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - port_ = input.readInt32(); - - break; - } // case 16 - case 42: - { - input.readMessage(getAccessConfigFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + ipAddress_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + port_ = input.readInt32(); + + break; + } // case 16 + case 42: { + input.readMessage( + getAccessConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -568,20 +527,18 @@ public Builder mergeFrom( private java.lang.Object ipAddress_ = ""; /** - * - * *
      * The internal IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @return The ipAddress. */ public java.lang.String getIpAddress() { java.lang.Object ref = ipAddress_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); ipAddress_ = s; return s; @@ -590,21 +547,20 @@ public java.lang.String getIpAddress() { } } /** - * - * *
      * The internal IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @return The bytes for ipAddress. */ - public com.google.protobuf.ByteString getIpAddressBytes() { + public com.google.protobuf.ByteString + getIpAddressBytes() { java.lang.Object ref = ipAddress_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ipAddress_ = b; return b; } else { @@ -612,76 +568,66 @@ public com.google.protobuf.ByteString getIpAddressBytes() { } } /** - * - * *
      * The internal IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @param value The ipAddress to set. * @return This builder for chaining. */ - public Builder setIpAddress(java.lang.String value) { + public Builder setIpAddress( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + ipAddress_ = value; onChanged(); return this; } /** - * - * *
      * The internal IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @return This builder for chaining. */ public Builder clearIpAddress() { - + ipAddress_ = getDefaultInstance().getIpAddress(); onChanged(); return this; } /** - * - * *
      * The internal IP address of this network endpoint.
      * 
* * string ip_address = 1; - * * @param value The bytes for ipAddress to set. * @return This builder for chaining. */ - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + public Builder setIpAddressBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; onChanged(); return this; } - private int port_; + private int port_ ; /** - * - * *
      * The port of this network endpoint.
      * 
* * int32 port = 2; - * * @return The port. */ @java.lang.Override @@ -689,36 +635,30 @@ public int getPort() { return port_; } /** - * - * *
      * The port of this network endpoint.
      * 
* * int32 port = 2; - * * @param value The port to set. * @return This builder for chaining. */ public Builder setPort(int value) { - + port_ = value; onChanged(); return this; } /** - * - * *
      * The port of this network endpoint.
      * 
* * int32 port = 2; - * * @return This builder for chaining. */ public Builder clearPort() { - + port_ = 0; onChanged(); return this; @@ -726,47 +666,34 @@ public Builder clearPort() { private com.google.cloud.tpu.v2alpha1.AccessConfig accessConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AccessConfig, - com.google.cloud.tpu.v2alpha1.AccessConfig.Builder, - com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder> - accessConfigBuilder_; + com.google.cloud.tpu.v2alpha1.AccessConfig, com.google.cloud.tpu.v2alpha1.AccessConfig.Builder, com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder> accessConfigBuilder_; /** - * - * *
      * The access config for the TPU worker.
      * 
* * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; - * * @return Whether the accessConfig field is set. */ public boolean hasAccessConfig() { return accessConfigBuilder_ != null || accessConfig_ != null; } /** - * - * *
      * The access config for the TPU worker.
      * 
* * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; - * * @return The accessConfig. */ public com.google.cloud.tpu.v2alpha1.AccessConfig getAccessConfig() { if (accessConfigBuilder_ == null) { - return accessConfig_ == null - ? com.google.cloud.tpu.v2alpha1.AccessConfig.getDefaultInstance() - : accessConfig_; + return accessConfig_ == null ? com.google.cloud.tpu.v2alpha1.AccessConfig.getDefaultInstance() : accessConfig_; } else { return accessConfigBuilder_.getMessage(); } } /** - * - * *
      * The access config for the TPU worker.
      * 
@@ -787,8 +714,6 @@ public Builder setAccessConfig(com.google.cloud.tpu.v2alpha1.AccessConfig value) return this; } /** - * - * *
      * The access config for the TPU worker.
      * 
@@ -807,8 +732,6 @@ public Builder setAccessConfig( return this; } /** - * - * *
      * The access config for the TPU worker.
      * 
@@ -819,9 +742,7 @@ public Builder mergeAccessConfig(com.google.cloud.tpu.v2alpha1.AccessConfig valu if (accessConfigBuilder_ == null) { if (accessConfig_ != null) { accessConfig_ = - com.google.cloud.tpu.v2alpha1.AccessConfig.newBuilder(accessConfig_) - .mergeFrom(value) - .buildPartial(); + com.google.cloud.tpu.v2alpha1.AccessConfig.newBuilder(accessConfig_).mergeFrom(value).buildPartial(); } else { accessConfig_ = value; } @@ -833,8 +754,6 @@ public Builder mergeAccessConfig(com.google.cloud.tpu.v2alpha1.AccessConfig valu return this; } /** - * - * *
      * The access config for the TPU worker.
      * 
@@ -853,8 +772,6 @@ public Builder clearAccessConfig() { return this; } /** - * - * *
      * The access config for the TPU worker.
      * 
@@ -862,13 +779,11 @@ public Builder clearAccessConfig() { * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; */ public com.google.cloud.tpu.v2alpha1.AccessConfig.Builder getAccessConfigBuilder() { - + onChanged(); return getAccessConfigFieldBuilder().getBuilder(); } /** - * - * *
      * The access config for the TPU worker.
      * 
@@ -879,14 +794,11 @@ public com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder getAccessConfigOrBuil if (accessConfigBuilder_ != null) { return accessConfigBuilder_.getMessageOrBuilder(); } else { - return accessConfig_ == null - ? com.google.cloud.tpu.v2alpha1.AccessConfig.getDefaultInstance() - : accessConfig_; + return accessConfig_ == null ? + com.google.cloud.tpu.v2alpha1.AccessConfig.getDefaultInstance() : accessConfig_; } } /** - * - * *
      * The access config for the TPU worker.
      * 
@@ -894,24 +806,21 @@ public com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder getAccessConfigOrBuil * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AccessConfig, - com.google.cloud.tpu.v2alpha1.AccessConfig.Builder, - com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder> + com.google.cloud.tpu.v2alpha1.AccessConfig, com.google.cloud.tpu.v2alpha1.AccessConfig.Builder, com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder> getAccessConfigFieldBuilder() { if (accessConfigBuilder_ == null) { - accessConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AccessConfig, - com.google.cloud.tpu.v2alpha1.AccessConfig.Builder, - com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder>( - getAccessConfig(), getParentForChildren(), isClean()); + accessConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.AccessConfig, com.google.cloud.tpu.v2alpha1.AccessConfig.Builder, com.google.cloud.tpu.v2alpha1.AccessConfigOrBuilder>( + getAccessConfig(), + getParentForChildren(), + isClean()); accessConfig_ = null; } return accessConfigBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -921,12 +830,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.NetworkEndpoint) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.NetworkEndpoint) private static final com.google.cloud.tpu.v2alpha1.NetworkEndpoint DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.NetworkEndpoint(); } @@ -935,27 +844,27 @@ public static com.google.cloud.tpu.v2alpha1.NetworkEndpoint getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkEndpoint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -970,4 +879,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.NetworkEndpoint getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpointOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpointOrBuilder.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpointOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpointOrBuilder.java index 82c95167f742..aeeb5a816083 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpointOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NetworkEndpointOrBuilder.java @@ -1,93 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface NetworkEndpointOrBuilder - extends +public interface NetworkEndpointOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.NetworkEndpoint) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The internal IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The ipAddress. */ java.lang.String getIpAddress(); /** - * - * *
    * The internal IP address of this network endpoint.
    * 
* * string ip_address = 1; - * * @return The bytes for ipAddress. */ - com.google.protobuf.ByteString getIpAddressBytes(); + com.google.protobuf.ByteString + getIpAddressBytes(); /** - * - * *
    * The port of this network endpoint.
    * 
* * int32 port = 2; - * * @return The port. */ int getPort(); /** - * - * *
    * The access config for the TPU worker.
    * 
* * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; - * * @return Whether the accessConfig field is set. */ boolean hasAccessConfig(); /** - * - * *
    * The access config for the TPU worker.
    * 
* * .google.cloud.tpu.v2alpha1.AccessConfig access_config = 5; - * * @return The accessConfig. */ com.google.cloud.tpu.v2alpha1.AccessConfig getAccessConfig(); /** - * - * *
    * The access config for the TPU worker.
    * 
diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Node.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Node.java similarity index 69% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Node.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Node.java index 6de09b164900..fa68a5819e85 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Node.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Node.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A TPU instance.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.Node} */ -public final class Node extends com.google.protobuf.GeneratedMessageV3 - implements +public final class Node extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.Node) NodeOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use Node.newBuilder() to construct. private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Node() { name_ = ""; description_ = ""; @@ -51,60 +33,58 @@ private Node() { dataDisks_ = java.util.Collections.emptyList(); apiVersion_ = 0; symptoms_ = java.util.Collections.emptyList(); + queuedResource_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new Node(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapField internalGetMapField( + int number) { switch (number) { case 24: return internalGetLabels(); case 34: return internalGetMetadata(); default: - throw new RuntimeException("Invalid map field number: " + number); + throw new RuntimeException( + "Invalid map field number: " + number); } } - @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Node_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Node_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.Node.class, - com.google.cloud.tpu.v2alpha1.Node.Builder.class); + com.google.cloud.tpu.v2alpha1.Node.class, com.google.cloud.tpu.v2alpha1.Node.Builder.class); } /** - * - * *
    * Represents the different states of a TPU node during its lifecycle.
    * 
* * Protobuf enum {@code google.cloud.tpu.v2alpha1.Node.State} */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { + public enum State + implements com.google.protobuf.ProtocolMessageEnum { /** - * - * *
      * TPU node state is not known/set.
      * 
@@ -113,8 +93,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STATE_UNSPECIFIED(0), /** - * - * *
      * TPU node is being created.
      * 
@@ -123,8 +101,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ CREATING(1), /** - * - * *
      * TPU node has been created.
      * 
@@ -133,8 +109,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ READY(2), /** - * - * *
      * TPU node is restarting.
      * 
@@ -143,8 +117,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ RESTARTING(3), /** - * - * *
      * TPU node is undergoing reimaging.
      * 
@@ -153,8 +125,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ REIMAGING(4), /** - * - * *
      * TPU node is being deleted.
      * 
@@ -163,19 +133,15 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ DELETING(5), /** - * - * *
      * TPU node is being repaired and may be unusable. Details can be
-     * found in the `help_description` field.
+     * found in the 'help_description' field.
      * 
* * REPAIRING = 6; */ REPAIRING(6), /** - * - * *
      * TPU node is stopped.
      * 
@@ -184,8 +150,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STOPPED(8), /** - * - * *
      * TPU node is currently stopping.
      * 
@@ -194,8 +158,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STOPPING(9), /** - * - * *
      * TPU node is currently starting.
      * 
@@ -204,8 +166,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ STARTING(10), /** - * - * *
      * TPU node has been preempted. Only applies to Preemptible TPU Nodes.
      * 
@@ -214,8 +174,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ PREEMPTED(11), /** - * - * *
      * TPU node has been terminated due to maintenance or has reached the end of
      * its life cycle (for preemptible nodes).
@@ -225,8 +183,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
      */
     TERMINATED(12),
     /**
-     *
-     *
      * 
      * TPU node is currently hiding.
      * 
@@ -235,8 +191,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ HIDING(13), /** - * - * *
      * TPU node has been hidden.
      * 
@@ -245,8 +199,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ HIDDEN(14), /** - * - * *
      * TPU node is currently unhiding.
      * 
@@ -258,8 +210,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { ; /** - * - * *
      * TPU node state is not known/set.
      * 
@@ -268,8 +218,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STATE_UNSPECIFIED_VALUE = 0; /** - * - * *
      * TPU node is being created.
      * 
@@ -278,8 +226,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int CREATING_VALUE = 1; /** - * - * *
      * TPU node has been created.
      * 
@@ -288,8 +234,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int READY_VALUE = 2; /** - * - * *
      * TPU node is restarting.
      * 
@@ -298,8 +242,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int RESTARTING_VALUE = 3; /** - * - * *
      * TPU node is undergoing reimaging.
      * 
@@ -308,8 +250,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int REIMAGING_VALUE = 4; /** - * - * *
      * TPU node is being deleted.
      * 
@@ -318,19 +258,15 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int DELETING_VALUE = 5; /** - * - * *
      * TPU node is being repaired and may be unusable. Details can be
-     * found in the `help_description` field.
+     * found in the 'help_description' field.
      * 
* * REPAIRING = 6; */ public static final int REPAIRING_VALUE = 6; /** - * - * *
      * TPU node is stopped.
      * 
@@ -339,8 +275,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STOPPED_VALUE = 8; /** - * - * *
      * TPU node is currently stopping.
      * 
@@ -349,8 +283,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STOPPING_VALUE = 9; /** - * - * *
      * TPU node is currently starting.
      * 
@@ -359,8 +291,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STARTING_VALUE = 10; /** - * - * *
      * TPU node has been preempted. Only applies to Preemptible TPU Nodes.
      * 
@@ -369,8 +299,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int PREEMPTED_VALUE = 11; /** - * - * *
      * TPU node has been terminated due to maintenance or has reached the end of
      * its life cycle (for preemptible nodes).
@@ -380,8 +308,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int TERMINATED_VALUE = 12;
     /**
-     *
-     *
      * 
      * TPU node is currently hiding.
      * 
@@ -390,8 +316,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HIDING_VALUE = 13; /** - * - * *
      * TPU node has been hidden.
      * 
@@ -400,8 +324,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HIDDEN_VALUE = 14; /** - * - * *
      * TPU node is currently unhiding.
      * 
@@ -410,6 +332,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int UNHIDING_VALUE = 15; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -434,73 +357,61 @@ public static State valueOf(int value) { */ public static State forNumber(int value) { switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return READY; - case 3: - return RESTARTING; - case 4: - return REIMAGING; - case 5: - return DELETING; - case 6: - return REPAIRING; - case 8: - return STOPPED; - case 9: - return STOPPING; - case 10: - return STARTING; - case 11: - return PREEMPTED; - case 12: - return TERMINATED; - case 13: - return HIDING; - case 14: - return HIDDEN; - case 15: - return UNHIDING; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return READY; + case 3: return RESTARTING; + case 4: return REIMAGING; + case 5: return DELETING; + case 6: return REPAIRING; + case 8: return STOPPED; + case 9: return STOPPING; + case 10: return STARTING; + case 11: return PREEMPTED; + case 12: return TERMINATED; + case 13: return HIDING; + case 14: return HIDDEN; + case 15: return UNHIDING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { return getDescriptor(); } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { return com.google.cloud.tpu.v2alpha1.Node.getDescriptor().getEnumTypes().get(0); } private static final State[] VALUES = values(); - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -518,8 +429,6 @@ private State(int value) { } /** - * - * *
    * Health defines the status of a TPU node as reported by
    * Health Monitor.
@@ -527,10 +436,9 @@ private State(int value) {
    *
    * Protobuf enum {@code google.cloud.tpu.v2alpha1.Node.Health}
    */
-  public enum Health implements com.google.protobuf.ProtocolMessageEnum {
+  public enum Health
+      implements com.google.protobuf.ProtocolMessageEnum {
     /**
-     *
-     *
      * 
      * Health status is unknown: not initialized or failed to retrieve.
      * 
@@ -539,8 +447,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ HEALTH_UNSPECIFIED(0), /** - * - * *
      * The resource is healthy.
      * 
@@ -549,8 +455,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ HEALTHY(1), /** - * - * *
      * The resource is unresponsive.
      * 
@@ -559,8 +463,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ TIMEOUT(3), /** - * - * *
      * The in-guest ML stack is unhealthy.
      * 
@@ -569,8 +471,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ UNHEALTHY_TENSORFLOW(4), /** - * - * *
      * The node is under maintenance/priority boost caused rescheduling and
      * will resume running once rescheduled.
@@ -583,8 +483,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum {
     ;
 
     /**
-     *
-     *
      * 
      * Health status is unknown: not initialized or failed to retrieve.
      * 
@@ -593,8 +491,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HEALTH_UNSPECIFIED_VALUE = 0; /** - * - * *
      * The resource is healthy.
      * 
@@ -603,8 +499,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HEALTHY_VALUE = 1; /** - * - * *
      * The resource is unresponsive.
      * 
@@ -613,8 +507,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int TIMEOUT_VALUE = 3; /** - * - * *
      * The in-guest ML stack is unhealthy.
      * 
@@ -623,8 +515,6 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum { */ public static final int UNHEALTHY_TENSORFLOW_VALUE = 4; /** - * - * *
      * The node is under maintenance/priority boost caused rescheduling and
      * will resume running once rescheduled.
@@ -634,6 +524,7 @@ public enum Health implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int UNHEALTHY_MAINTENANCE_VALUE = 5;
 
+
     public final int getNumber() {
       if (this == UNRECOGNIZED) {
         throw new java.lang.IllegalArgumentException(
@@ -658,53 +549,51 @@ public static Health valueOf(int value) {
      */
     public static Health forNumber(int value) {
       switch (value) {
-        case 0:
-          return HEALTH_UNSPECIFIED;
-        case 1:
-          return HEALTHY;
-        case 3:
-          return TIMEOUT;
-        case 4:
-          return UNHEALTHY_TENSORFLOW;
-        case 5:
-          return UNHEALTHY_MAINTENANCE;
-        default:
-          return null;
+        case 0: return HEALTH_UNSPECIFIED;
+        case 1: return HEALTHY;
+        case 3: return TIMEOUT;
+        case 4: return UNHEALTHY_TENSORFLOW;
+        case 5: return UNHEALTHY_MAINTENANCE;
+        default: return null;
       }
     }
 
-    public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
+    public static com.google.protobuf.Internal.EnumLiteMap
+        internalGetValueMap() {
       return internalValueMap;
     }
+    private static final com.google.protobuf.Internal.EnumLiteMap<
+        Health> internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap() {
+            public Health findValueByNumber(int number) {
+              return Health.forNumber(number);
+            }
+          };
 
-    private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
-        new com.google.protobuf.Internal.EnumLiteMap() {
-          public Health findValueByNumber(int number) {
-            return Health.forNumber(number);
-          }
-        };
-
-    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
       if (this == UNRECOGNIZED) {
         throw new java.lang.IllegalStateException(
             "Can't get the descriptor of an unrecognized enum value.");
       }
       return getDescriptor().getValues().get(ordinal());
     }
-
-    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
       return getDescriptor();
     }
-
-    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
       return com.google.cloud.tpu.v2alpha1.Node.getDescriptor().getEnumTypes().get(1);
     }
 
     private static final Health[] VALUES = values();
 
-    public static Health valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+    public static Health valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
       if (desc.getType() != getDescriptor()) {
-        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
       }
       if (desc.getIndex() == -1) {
         return UNRECOGNIZED;
@@ -722,18 +611,15 @@ private Health(int value) {
   }
 
   /**
-   *
-   *
    * 
    * TPU API Version.
    * 
* * Protobuf enum {@code google.cloud.tpu.v2alpha1.Node.ApiVersion} */ - public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { + public enum ApiVersion + implements com.google.protobuf.ProtocolMessageEnum { /** - * - * *
      * API version is unknown.
      * 
@@ -742,8 +628,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ API_VERSION_UNSPECIFIED(0), /** - * - * *
      * TPU API V1Alpha1 version.
      * 
@@ -752,8 +636,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ V1_ALPHA1(1), /** - * - * *
      * TPU API V1 version.
      * 
@@ -762,8 +644,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ V1(2), /** - * - * *
      * TPU API V2Alpha1 version.
      * 
@@ -775,8 +655,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { ; /** - * - * *
      * API version is unknown.
      * 
@@ -785,8 +663,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int API_VERSION_UNSPECIFIED_VALUE = 0; /** - * - * *
      * TPU API V1Alpha1 version.
      * 
@@ -795,8 +671,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int V1_ALPHA1_VALUE = 1; /** - * - * *
      * TPU API V1 version.
      * 
@@ -805,8 +679,6 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int V1_VALUE = 2; /** - * - * *
      * TPU API V2Alpha1 version.
      * 
@@ -815,6 +687,7 @@ public enum ApiVersion implements com.google.protobuf.ProtocolMessageEnum { */ public static final int V2_ALPHA1_VALUE = 3; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -839,51 +712,50 @@ public static ApiVersion valueOf(int value) { */ public static ApiVersion forNumber(int value) { switch (value) { - case 0: - return API_VERSION_UNSPECIFIED; - case 1: - return V1_ALPHA1; - case 2: - return V1; - case 3: - return V2_ALPHA1; - default: - return null; + case 0: return API_VERSION_UNSPECIFIED; + case 1: return V1_ALPHA1; + case 2: return V1; + case 3: return V2_ALPHA1; + default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< + ApiVersion> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ApiVersion findValueByNumber(int number) { + return ApiVersion.forNumber(number); + } + }; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ApiVersion findValueByNumber(int number) { - return ApiVersion.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { return getDescriptor(); } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { return com.google.cloud.tpu.v2alpha1.Node.getDescriptor().getEnumTypes().get(2); } private static final ApiVersion[] VALUES = values(); - public static ApiVersion valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static ApiVersion valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -903,16 +775,11 @@ private ApiVersion(int value) { public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * Output only. Immutable. The name of the TPU.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return The name. */ @java.lang.Override @@ -921,31 +788,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * Output only. Immutable. The name of the TPU.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -956,14 +821,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int DESCRIPTION_FIELD_NUMBER = 3; private volatile java.lang.Object description_; /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The description. */ @java.lang.Override @@ -972,29 +834,29 @@ public java.lang.String getDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The bytes for description. */ @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { + public com.google.protobuf.ByteString + getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); description_ = b; return b; } else { @@ -1005,14 +867,11 @@ public com.google.protobuf.ByteString getDescriptionBytes() { public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 5; private volatile java.lang.Object acceleratorType_; /** - * - * *
-   * Required. The type of hardware accelerators associated with this node.
+   * The type of hardware accelerators associated with this node.
    * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @return The acceleratorType. */ @java.lang.Override @@ -1021,29 +880,29 @@ public java.lang.String getAcceleratorType() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); acceleratorType_ = s; return s; } } /** - * - * *
-   * Required. The type of hardware accelerators associated with this node.
+   * The type of hardware accelerators associated with this node.
    * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @return The bytes for acceleratorType. */ @java.lang.Override - public com.google.protobuf.ByteString getAcceleratorTypeBytes() { + public com.google.protobuf.ByteString + getAcceleratorTypeBytes() { java.lang.Object ref = acceleratorType_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); acceleratorType_ = b; return b; } else { @@ -1054,55 +913,39 @@ public com.google.protobuf.ByteString getAcceleratorTypeBytes() { public static final int STATE_FIELD_NUMBER = 9; private int state_; /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for state. */ - @java.lang.Override - public int getStateValue() { + @java.lang.Override public int getStateValue() { return state_; } /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The state. */ - @java.lang.Override - public com.google.cloud.tpu.v2alpha1.Node.State getState() { + @java.lang.Override public com.google.cloud.tpu.v2alpha1.Node.State getState() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Node.State result = - com.google.cloud.tpu.v2alpha1.Node.State.valueOf(state_); + com.google.cloud.tpu.v2alpha1.Node.State result = com.google.cloud.tpu.v2alpha1.Node.State.valueOf(state_); return result == null ? com.google.cloud.tpu.v2alpha1.Node.State.UNRECOGNIZED : result; } public static final int HEALTH_DESCRIPTION_FIELD_NUMBER = 10; private volatile java.lang.Object healthDescription_; /** - * - * *
-   * Output only. If this field is populated, it contains a description of why
-   * the TPU Node is unhealthy.
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The healthDescription. */ @java.lang.Override @@ -1111,30 +954,30 @@ public java.lang.String getHealthDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); healthDescription_ = s; return s; } } /** - * - * *
-   * Output only. If this field is populated, it contains a description of why
-   * the TPU Node is unhealthy.
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for healthDescription. */ @java.lang.Override - public com.google.protobuf.ByteString getHealthDescriptionBytes() { + public com.google.protobuf.ByteString + getHealthDescriptionBytes() { java.lang.Object ref = healthDescription_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); healthDescription_ = b; return b; } else { @@ -1145,14 +988,11 @@ public com.google.protobuf.ByteString getHealthDescriptionBytes() { public static final int RUNTIME_VERSION_FIELD_NUMBER = 11; private volatile java.lang.Object runtimeVersion_; /** - * - * *
    * Required. The runtime version running in the Node.
    * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The runtimeVersion. */ @java.lang.Override @@ -1161,29 +1001,29 @@ public java.lang.String getRuntimeVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); runtimeVersion_ = s; return s; } } /** - * - * *
    * Required. The runtime version running in the Node.
    * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for runtimeVersion. */ @java.lang.Override - public com.google.protobuf.ByteString getRuntimeVersionBytes() { + public com.google.protobuf.ByteString + getRuntimeVersionBytes() { java.lang.Object ref = runtimeVersion_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); runtimeVersion_ = b; return b; } else { @@ -1194,14 +1034,11 @@ public com.google.protobuf.ByteString getRuntimeVersionBytes() { public static final int NETWORK_CONFIG_FIELD_NUMBER = 36; private com.google.cloud.tpu.v2alpha1.NetworkConfig networkConfig_; /** - * - * *
    * Network configurations for the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; - * * @return Whether the networkConfig field is set. */ @java.lang.Override @@ -1209,25 +1046,18 @@ public boolean hasNetworkConfig() { return networkConfig_ != null; } /** - * - * *
    * Network configurations for the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; - * * @return The networkConfig. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.NetworkConfig getNetworkConfig() { - return networkConfig_ == null - ? com.google.cloud.tpu.v2alpha1.NetworkConfig.getDefaultInstance() - : networkConfig_; + return networkConfig_ == null ? com.google.cloud.tpu.v2alpha1.NetworkConfig.getDefaultInstance() : networkConfig_; } /** - * - * *
    * Network configurations for the TPU node.
    * 
@@ -1242,8 +1072,6 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder getNetworkConfigOrBu public static final int CIDR_BLOCK_FIELD_NUMBER = 13; private volatile java.lang.Object cidrBlock_; /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -1256,7 +1084,6 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder getNetworkConfigOrBu
    * 
* * string cidr_block = 13; - * * @return The cidrBlock. */ @java.lang.Override @@ -1265,15 +1092,14 @@ public java.lang.String getCidrBlock() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cidrBlock_ = s; return s; } } /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -1286,15 +1112,16 @@ public java.lang.String getCidrBlock() {
    * 
* * string cidr_block = 13; - * * @return The bytes for cidrBlock. */ @java.lang.Override - public com.google.protobuf.ByteString getCidrBlockBytes() { + public com.google.protobuf.ByteString + getCidrBlockBytes() { java.lang.Object ref = cidrBlock_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); cidrBlock_ = b; return b; } else { @@ -1305,15 +1132,12 @@ public com.google.protobuf.ByteString getCidrBlockBytes() { public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 37; private com.google.cloud.tpu.v2alpha1.ServiceAccount serviceAccount_; /** - * - * *
    * The Google Cloud Platform Service Account to be used by the TPU node VMs.
    * If None is specified, the default compute service account will be used.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37; - * * @return Whether the serviceAccount field is set. */ @java.lang.Override @@ -1321,26 +1145,19 @@ public boolean hasServiceAccount() { return serviceAccount_ != null; } /** - * - * *
    * The Google Cloud Platform Service Account to be used by the TPU node VMs.
    * If None is specified, the default compute service account will be used.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37; - * * @return The serviceAccount. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.ServiceAccount getServiceAccount() { - return serviceAccount_ == null - ? com.google.cloud.tpu.v2alpha1.ServiceAccount.getDefaultInstance() - : serviceAccount_; + return serviceAccount_ == null ? com.google.cloud.tpu.v2alpha1.ServiceAccount.getDefaultInstance() : serviceAccount_; } /** - * - * *
    * The Google Cloud Platform Service Account to be used by the TPU node VMs.
    * If None is specified, the default compute service account will be used.
@@ -1356,15 +1173,11 @@ public com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder getServiceAccountOr
   public static final int CREATE_TIME_FIELD_NUMBER = 16;
   private com.google.protobuf.Timestamp createTime_;
   /**
-   *
-   *
    * 
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return Whether the createTime field is set. */ @java.lang.Override @@ -1372,15 +1185,11 @@ public boolean hasCreateTime() { return createTime_ != null; } /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The createTime. */ @java.lang.Override @@ -1388,14 +1197,11 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { @@ -1405,14 +1211,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int SCHEDULING_CONFIG_FIELD_NUMBER = 17; private com.google.cloud.tpu.v2alpha1.SchedulingConfig schedulingConfig_; /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; - * * @return Whether the schedulingConfig field is set. */ @java.lang.Override @@ -1420,25 +1223,18 @@ public boolean hasSchedulingConfig() { return schedulingConfig_ != null; } /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; - * * @return The schedulingConfig. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.SchedulingConfig getSchedulingConfig() { - return schedulingConfig_ == null - ? com.google.cloud.tpu.v2alpha1.SchedulingConfig.getDefaultInstance() - : schedulingConfig_; + return schedulingConfig_ == null ? com.google.cloud.tpu.v2alpha1.SchedulingConfig.getDefaultInstance() : schedulingConfig_; } /** - * - * *
    * The scheduling options for this node.
    * 
@@ -1453,86 +1249,66 @@ public com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder getSchedulingConf public static final int NETWORK_ENDPOINTS_FIELD_NUMBER = 21; private java.util.List networkEndpoints_; /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public java.util.List getNetworkEndpointsList() { return networkEndpoints_; } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override - public java.util.List + public java.util.List getNetworkEndpointsOrBuilderList() { return networkEndpoints_; } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public int getNetworkEndpointsCount() { return networkEndpoints_.size(); } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.NetworkEndpoint getNetworkEndpoints(int index) { return networkEndpoints_.get(index); } /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( @@ -1543,57 +1319,49 @@ public com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder getNetworkEndpoint public static final int HEALTH_FIELD_NUMBER = 22; private int health_; /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @return The enum numeric value on the wire for health. */ - @java.lang.Override - public int getHealthValue() { + @java.lang.Override public int getHealthValue() { return health_; } /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @return The health. */ - @java.lang.Override - public com.google.cloud.tpu.v2alpha1.Node.Health getHealth() { + @java.lang.Override public com.google.cloud.tpu.v2alpha1.Node.Health getHealth() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Node.Health result = - com.google.cloud.tpu.v2alpha1.Node.Health.valueOf(health_); + com.google.cloud.tpu.v2alpha1.Node.Health result = com.google.cloud.tpu.v2alpha1.Node.Health.valueOf(health_); return result == null ? com.google.cloud.tpu.v2alpha1.Node.Health.UNRECOGNIZED : result; } public static final int LABELS_FIELD_NUMBER = 24; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Node_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Node_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); } return labels_; } @@ -1602,30 +1370,28 @@ public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ + @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } - /** Use {@link #getLabelsMap()} instead. */ + /** + * Use {@link #getLabelsMap()} instead. + */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -1633,12 +1399,11 @@ public java.util.Map getLabels() { * map<string, string> labels = 24; */ @java.lang.Override + public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -1646,16 +1411,16 @@ public java.util.Map getLabelsMap() { * map<string, string> labels = 24; */ @java.lang.Override - public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -1663,11 +1428,12 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * map<string, string> labels = 24; */ @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } @@ -1675,23 +1441,24 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public static final int METADATA_FIELD_NUMBER = 34; - private static final class MetadataDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Node_MetadataEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Node_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); } - - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } @@ -1700,8 +1467,6 @@ public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** - * - * *
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -1709,22 +1474,22 @@ public int getMetadataCount() {
    *
    * map<string, string> metadata = 34;
    */
+
   @java.lang.Override
-  public boolean containsMetadata(java.lang.String key) {
-    if (key == null) {
-      throw new NullPointerException("map key");
-    }
+  public boolean containsMetadata(
+      java.lang.String key) {
+    if (key == null) { throw new NullPointerException("map key"); }
     return internalGetMetadata().getMap().containsKey(key);
   }
-  /** Use {@link #getMetadataMap()} instead. */
+  /**
+   * Use {@link #getMetadataMap()} instead.
+   */
   @java.lang.Override
   @java.lang.Deprecated
   public java.util.Map getMetadata() {
     return getMetadataMap();
   }
   /**
-   *
-   *
    * 
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -1733,12 +1498,11 @@ public java.util.Map getMetadata() {
    * map<string, string> metadata = 34;
    */
   @java.lang.Override
+
   public java.util.Map getMetadataMap() {
     return internalGetMetadata().getMap();
   }
   /**
-   *
-   *
    * 
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -1747,17 +1511,16 @@ public java.util.Map getMetadataMap() {
    * map<string, string> metadata = 34;
    */
   @java.lang.Override
+
   public java.lang.String getMetadataOrDefault(
-      java.lang.String key, java.lang.String defaultValue) {
-    if (key == null) {
-      throw new NullPointerException("map key");
-    }
-    java.util.Map map = internalGetMetadata().getMap();
+      java.lang.String key,
+      java.lang.String defaultValue) {
+    if (key == null) { throw new NullPointerException("map key"); }
+    java.util.Map map =
+        internalGetMetadata().getMap();
     return map.containsKey(key) ? map.get(key) : defaultValue;
   }
   /**
-   *
-   *
    * 
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -1766,11 +1529,12 @@ public java.lang.String getMetadataOrDefault(
    * map<string, string> metadata = 34;
    */
   @java.lang.Override
-  public java.lang.String getMetadataOrThrow(java.lang.String key) {
-    if (key == null) {
-      throw new NullPointerException("map key");
-    }
-    java.util.Map map = internalGetMetadata().getMap();
+
+  public java.lang.String getMetadataOrThrow(
+      java.lang.String key) {
+    if (key == null) { throw new NullPointerException("map key"); }
+    java.util.Map map =
+        internalGetMetadata().getMap();
     if (!map.containsKey(key)) {
       throw new java.lang.IllegalArgumentException();
     }
@@ -1780,45 +1544,37 @@ public java.lang.String getMetadataOrThrow(java.lang.String key) {
   public static final int TAGS_FIELD_NUMBER = 40;
   private com.google.protobuf.LazyStringList tags_;
   /**
-   *
-   *
    * 
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @return A list containing the tags. */ - public com.google.protobuf.ProtocolStringList getTagsList() { + public com.google.protobuf.ProtocolStringList + getTagsList() { return tags_; } /** - * - * *
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @return The count of tags. */ public int getTagsCount() { return tags_.size(); } /** - * - * *
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @param index The index of the element to return. * @return The tags at the given index. */ @@ -1826,33 +1582,28 @@ public java.lang.String getTags(int index) { return tags_.get(index); } /** - * - * *
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @param index The index of the value to return. * @return The bytes of the tags at the given index. */ - public com.google.protobuf.ByteString getTagsBytes(int index) { + public com.google.protobuf.ByteString + getTagsBytes(int index) { return tags_.getByteString(index); } public static final int ID_FIELD_NUMBER = 33; private long id_; /** - * - * *
    * Output only. The unique identifier for the TPU Node.
    * 
* * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The id. */ @java.lang.Override @@ -1863,8 +1614,6 @@ public long getId() { public static final int DATA_DISKS_FIELD_NUMBER = 41; private java.util.List dataDisks_; /** - * - * *
    * The additional data disks for the Node.
    * 
@@ -1876,8 +1625,6 @@ public java.util.List getDataDisksLi return dataDisks_; } /** - * - * *
    * The additional data disks for the Node.
    * 
@@ -1885,13 +1632,11 @@ public java.util.List getDataDisksLi * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ @java.lang.Override - public java.util.List + public java.util.List getDataDisksOrBuilderList() { return dataDisks_; } /** - * - * *
    * The additional data disks for the Node.
    * 
@@ -1903,8 +1648,6 @@ public int getDataDisksCount() { return dataDisks_.size(); } /** - * - * *
    * The additional data disks for the Node.
    * 
@@ -1916,8 +1659,6 @@ public com.google.cloud.tpu.v2alpha1.AttachedDisk getDataDisks(int index) { return dataDisks_.get(index); } /** - * - * *
    * The additional data disks for the Node.
    * 
@@ -1925,140 +1666,152 @@ public com.google.cloud.tpu.v2alpha1.AttachedDisk getDataDisks(int index) { * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ @java.lang.Override - public com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder( + int index) { return dataDisks_.get(index); } public static final int API_VERSION_FIELD_NUMBER = 38; private int apiVersion_; /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for apiVersion. */ - @java.lang.Override - public int getApiVersionValue() { + @java.lang.Override public int getApiVersionValue() { return apiVersion_; } /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The apiVersion. */ - @java.lang.Override - public com.google.cloud.tpu.v2alpha1.Node.ApiVersion getApiVersion() { + @java.lang.Override public com.google.cloud.tpu.v2alpha1.Node.ApiVersion getApiVersion() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Node.ApiVersion result = - com.google.cloud.tpu.v2alpha1.Node.ApiVersion.valueOf(apiVersion_); + com.google.cloud.tpu.v2alpha1.Node.ApiVersion result = com.google.cloud.tpu.v2alpha1.Node.ApiVersion.valueOf(apiVersion_); return result == null ? com.google.cloud.tpu.v2alpha1.Node.ApiVersion.UNRECOGNIZED : result; } public static final int SYMPTOMS_FIELD_NUMBER = 39; private java.util.List symptoms_; /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public java.util.List getSymptomsList() { return symptoms_; } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override - public java.util.List + public java.util.List getSymptomsOrBuilderList() { return symptoms_; } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public int getSymptomsCount() { return symptoms_.size(); } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.Symptom getSymptoms(int index) { return symptoms_.get(index); } /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @java.lang.Override - public com.google.cloud.tpu.v2alpha1.SymptomOrBuilder getSymptomsOrBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.SymptomOrBuilder getSymptomsOrBuilder( + int index) { return symptoms_.get(index); } - public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 45; - private com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shieldedInstanceConfig_; + public static final int QUEUED_RESOURCE_FIELD_NUMBER = 43; + private volatile java.lang.Object queuedResource_; /** + *
+   * Output only. The qualified name of the QueuedResource that requested this Node.
+   * 
* + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The queuedResource. + */ + @java.lang.Override + public java.lang.String getQueuedResource() { + java.lang.Object ref = queuedResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queuedResource_ = s; + return s; + } + } + /** + *
+   * Output only. The qualified name of the QueuedResource that requested this Node.
+   * 
* + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for queuedResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueuedResourceBytes() { + java.lang.Object ref = queuedResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queuedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 45; + private com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shieldedInstanceConfig_; + /** *
    * Shielded Instance options.
    * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; - * * @return Whether the shieldedInstanceConfig field is set. */ @java.lang.Override @@ -2066,25 +1819,18 @@ public boolean hasShieldedInstanceConfig() { return shieldedInstanceConfig_ != null; } /** - * - * *
    * Shielded Instance options.
    * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; - * * @return The shieldedInstanceConfig. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig getShieldedInstanceConfig() { - return shieldedInstanceConfig_ == null - ? com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance() - : shieldedInstanceConfig_; + return shieldedInstanceConfig_ == null ? com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance() : shieldedInstanceConfig_; } /** - * - * *
    * Shielded Instance options.
    * 
@@ -2092,13 +1838,11 @@ public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig getShieldedInstanceC * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; */ @java.lang.Override - public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder - getShieldedInstanceConfigOrBuilder() { + public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder() { return getShieldedInstanceConfig(); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -2110,7 +1854,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -2144,21 +1889,28 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (health_ != com.google.cloud.tpu.v2alpha1.Node.Health.HEALTH_UNSPECIFIED.getNumber()) { output.writeEnum(22, health_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 24); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 24); if (id_ != 0L) { output.writeInt64(33, id_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 34); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMetadata(), + MetadataDefaultEntryHolder.defaultEntry, + 34); if (networkConfig_ != null) { output.writeMessage(36, getNetworkConfig()); } if (serviceAccount_ != null) { output.writeMessage(37, getServiceAccount()); } - if (apiVersion_ - != com.google.cloud.tpu.v2alpha1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { + if (apiVersion_ != com.google.cloud.tpu.v2alpha1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { output.writeEnum(38, apiVersion_); } for (int i = 0; i < symptoms_.size(); i++) { @@ -2170,6 +1922,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < dataDisks_.size(); i++) { output.writeMessage(41, dataDisks_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queuedResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 43, queuedResource_); + } if (shieldedInstanceConfig_ != null) { output.writeMessage(45, getShieldedInstanceConfig()); } @@ -2192,7 +1947,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, acceleratorType_); } if (state_ != com.google.cloud.tpu.v2alpha1.Node.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, state_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthDescription_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, healthDescription_); @@ -2204,53 +1960,60 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, cidrBlock_); } if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getCreateTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getCreateTime()); } if (schedulingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getSchedulingConfig()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getSchedulingConfig()); } for (int i = 0; i < networkEndpoints_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(21, networkEndpoints_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, networkEndpoints_.get(i)); } if (health_ != com.google.cloud.tpu.v2alpha1.Node.Health.HEALTH_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, health_); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, labels__); + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, health_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, labels__); } if (id_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(33, id_); - } - for (java.util.Map.Entry entry : - internalGetMetadata().getMap().entrySet()) { - com.google.protobuf.MapEntry metadata__ = - MetadataDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, metadata__); + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(33, id_); + } + for (java.util.Map.Entry entry + : internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry + metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(34, metadata__); } if (networkConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(36, getNetworkConfig()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(36, getNetworkConfig()); } if (serviceAccount_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(37, getServiceAccount()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(37, getServiceAccount()); } - if (apiVersion_ - != com.google.cloud.tpu.v2alpha1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(38, apiVersion_); + if (apiVersion_ != com.google.cloud.tpu.v2alpha1.Node.ApiVersion.API_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(38, apiVersion_); } for (int i = 0; i < symptoms_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(39, symptoms_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(39, symptoms_.get(i)); } { int dataSize = 0; @@ -2261,11 +2024,15 @@ public int getSerializedSize() { size += 2 * getTagsList().size(); } for (int i = 0; i < dataDisks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(41, dataDisks_.get(i)); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(41, dataDisks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queuedResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(43, queuedResource_); } if (shieldedInstanceConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(45, getShieldedInstanceConfig()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(45, getShieldedInstanceConfig()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2275,48 +2042,68 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.Node)) { return super.equals(obj); } com.google.cloud.tpu.v2alpha1.Node other = (com.google.cloud.tpu.v2alpha1.Node) obj; - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getAcceleratorType().equals(other.getAcceleratorType())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getAcceleratorType() + .equals(other.getAcceleratorType())) return false; if (state_ != other.state_) return false; - if (!getHealthDescription().equals(other.getHealthDescription())) return false; - if (!getRuntimeVersion().equals(other.getRuntimeVersion())) return false; + if (!getHealthDescription() + .equals(other.getHealthDescription())) return false; + if (!getRuntimeVersion() + .equals(other.getRuntimeVersion())) return false; if (hasNetworkConfig() != other.hasNetworkConfig()) return false; if (hasNetworkConfig()) { - if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; } - if (!getCidrBlock().equals(other.getCidrBlock())) return false; + if (!getCidrBlock() + .equals(other.getCidrBlock())) return false; if (hasServiceAccount() != other.hasServiceAccount()) return false; if (hasServiceAccount()) { - if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getServiceAccount() + .equals(other.getServiceAccount())) return false; } if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; + if (!getCreateTime() + .equals(other.getCreateTime())) return false; } if (hasSchedulingConfig() != other.hasSchedulingConfig()) return false; if (hasSchedulingConfig()) { - if (!getSchedulingConfig().equals(other.getSchedulingConfig())) return false; + if (!getSchedulingConfig() + .equals(other.getSchedulingConfig())) return false; } - if (!getNetworkEndpointsList().equals(other.getNetworkEndpointsList())) return false; + if (!getNetworkEndpointsList() + .equals(other.getNetworkEndpointsList())) return false; if (health_ != other.health_) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (!getTagsList().equals(other.getTagsList())) return false; - if (getId() != other.getId()) return false; - if (!getDataDisksList().equals(other.getDataDisksList())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!internalGetMetadata().equals( + other.internalGetMetadata())) return false; + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (getId() + != other.getId()) return false; + if (!getDataDisksList() + .equals(other.getDataDisksList())) return false; if (apiVersion_ != other.apiVersion_) return false; - if (!getSymptomsList().equals(other.getSymptomsList())) return false; + if (!getSymptomsList() + .equals(other.getSymptomsList())) return false; + if (!getQueuedResource() + .equals(other.getQueuedResource())) return false; if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; if (hasShieldedInstanceConfig()) { - if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false; + if (!getShieldedInstanceConfig() + .equals(other.getShieldedInstanceConfig())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -2378,7 +2165,8 @@ public int hashCode() { hash = (53 * hash) + getTagsList().hashCode(); } hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); if (getDataDisksCount() > 0) { hash = (37 * hash) + DATA_DISKS_FIELD_NUMBER; hash = (53 * hash) + getDataDisksList().hashCode(); @@ -2389,6 +2177,8 @@ public int hashCode() { hash = (37 * hash) + SYMPTOMS_FIELD_NUMBER; hash = (53 * hash) + getSymptomsList().hashCode(); } + hash = (37 * hash) + QUEUED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getQueuedResource().hashCode(); if (hasShieldedInstanceConfig()) { hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); @@ -2398,159 +2188,156 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.Node parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.Node parseFrom(com.google.protobuf.ByteString data) + public static com.google.cloud.tpu.v2alpha1.Node parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Node parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.Node parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.Node parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.Node prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A TPU instance.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.Node} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.Node) com.google.cloud.tpu.v2alpha1.NodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapField internalGetMapField( + int number) { switch (number) { case 24: return internalGetLabels(); case 34: return internalGetMetadata(); default: - throw new RuntimeException("Invalid map field number: " + number); + throw new RuntimeException( + "Invalid map field number: " + number); } } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { switch (number) { case 24: return internalGetMutableLabels(); case 34: return internalGetMutableMetadata(); default: - throw new RuntimeException("Invalid map field number: " + number); + throw new RuntimeException( + "Invalid map field number: " + number); } } - @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Node_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Node_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.Node.class, - com.google.cloud.tpu.v2alpha1.Node.Builder.class); + com.google.cloud.tpu.v2alpha1.Node.class, com.google.cloud.tpu.v2alpha1.Node.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.Node.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -2623,6 +2410,8 @@ public Builder clear() { symptomsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); + queuedResource_ = ""; + if (shieldedInstanceConfigBuilder_ == null) { shieldedInstanceConfig_ = null; } else { @@ -2633,9 +2422,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Node_descriptor; } @java.lang.Override @@ -2722,6 +2511,7 @@ public com.google.cloud.tpu.v2alpha1.Node buildPartial() { } else { result.symptoms_ = symptomsBuilder_.build(); } + result.queuedResource_ = queuedResource_; if (shieldedInstanceConfigBuilder_ == null) { result.shieldedInstanceConfig_ = shieldedInstanceConfig_; } else { @@ -2735,39 +2525,38 @@ public com.google.cloud.tpu.v2alpha1.Node buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.Node) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.Node) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.Node)other); } else { super.mergeFrom(other); return this; @@ -2833,10 +2622,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.Node other) { networkEndpointsBuilder_ = null; networkEndpoints_ = other.networkEndpoints_; bitField0_ = (bitField0_ & ~0x00000001); - networkEndpointsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNetworkEndpointsFieldBuilder() - : null; + networkEndpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNetworkEndpointsFieldBuilder() : null; } else { networkEndpointsBuilder_.addAllMessages(other.networkEndpoints_); } @@ -2845,8 +2633,10 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.Node other) { if (other.health_ != 0) { setHealthValue(other.getHealthValue()); } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + internalGetMutableMetadata().mergeFrom( + other.internalGetMetadata()); if (!other.tags_.isEmpty()) { if (tags_.isEmpty()) { tags_ = other.tags_; @@ -2878,10 +2668,9 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.Node other) { dataDisksBuilder_ = null; dataDisks_ = other.dataDisks_; bitField0_ = (bitField0_ & ~0x00000010); - dataDisksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDataDisksFieldBuilder() - : null; + dataDisksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDataDisksFieldBuilder() : null; } else { dataDisksBuilder_.addAllMessages(other.dataDisks_); } @@ -2908,15 +2697,18 @@ public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.Node other) { symptomsBuilder_ = null; symptoms_ = other.symptoms_; bitField0_ = (bitField0_ & ~0x00000020); - symptomsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSymptomsFieldBuilder() - : null; + symptomsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymptomsFieldBuilder() : null; } else { symptomsBuilder_.addAllMessages(other.symptoms_); } } } + if (!other.getQueuedResource().isEmpty()) { + queuedResource_ = other.queuedResource_; + onChanged(); + } if (other.hasShieldedInstanceConfig()) { mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); } @@ -2946,173 +2738,163 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 26: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 42: - { - acceleratorType_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 72: - { - state_ = input.readEnum(); - - break; - } // case 72 - case 82: - { - healthDescription_ = input.readStringRequireUtf8(); - - break; - } // case 82 - case 90: - { - runtimeVersion_ = input.readStringRequireUtf8(); - - break; - } // case 90 - case 106: - { - cidrBlock_ = input.readStringRequireUtf8(); - - break; - } // case 106 - case 130: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 130 - case 138: - { - input.readMessage( - getSchedulingConfigFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 138 - case 170: - { - com.google.cloud.tpu.v2alpha1.NetworkEndpoint m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.parser(), extensionRegistry); - if (networkEndpointsBuilder_ == null) { - ensureNetworkEndpointsIsMutable(); - networkEndpoints_.add(m); - } else { - networkEndpointsBuilder_.addMessage(m); - } - break; - } // case 170 - case 176: - { - health_ = input.readEnum(); - - break; - } // case 176 - case 194: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - break; - } // case 194 - case 264: - { - id_ = input.readInt64(); - - break; - } // case 264 - case 274: - { - com.google.protobuf.MapEntry metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableMetadata() - .getMutableMap() - .put(metadata__.getKey(), metadata__.getValue()); - break; - } // case 274 - case 290: - { - input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 290 - case 298: - { - input.readMessage(getServiceAccountFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 298 - case 304: - { - apiVersion_ = input.readEnum(); - - break; - } // case 304 - case 314: - { - com.google.cloud.tpu.v2alpha1.Symptom m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.Symptom.parser(), extensionRegistry); - if (symptomsBuilder_ == null) { - ensureSymptomsIsMutable(); - symptoms_.add(m); - } else { - symptomsBuilder_.addMessage(m); - } - break; - } // case 314 - case 322: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureTagsIsMutable(); - tags_.add(s); - break; - } // case 322 - case 330: - { - com.google.cloud.tpu.v2alpha1.AttachedDisk m = - input.readMessage( - com.google.cloud.tpu.v2alpha1.AttachedDisk.parser(), extensionRegistry); - if (dataDisksBuilder_ == null) { - ensureDataDisksIsMutable(); - dataDisks_.add(m); - } else { - dataDisksBuilder_.addMessage(m); - } - break; - } // case 330 - case 362: - { - input.readMessage( - getShieldedInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 362 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: { + acceleratorType_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 72: { + state_ = input.readEnum(); + + break; + } // case 72 + case 82: { + healthDescription_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: { + runtimeVersion_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 106: { + cidrBlock_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 130: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 130 + case 138: { + input.readMessage( + getSchedulingConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 138 + case 170: { + com.google.cloud.tpu.v2alpha1.NetworkEndpoint m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.NetworkEndpoint.parser(), + extensionRegistry); + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(m); + } else { + networkEndpointsBuilder_.addMessage(m); + } + break; + } // case 170 + case 176: { + health_ = input.readEnum(); + + break; + } // case 176 + case 194: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } // case 194 + case 264: { + id_ = input.readInt64(); + + break; + } // case 264 + case 274: { + com.google.protobuf.MapEntry + metadata__ = input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMetadata().getMutableMap().put( + metadata__.getKey(), metadata__.getValue()); + break; + } // case 274 + case 290: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 290 + case 298: { + input.readMessage( + getServiceAccountFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 298 + case 304: { + apiVersion_ = input.readEnum(); + + break; + } // case 304 + case 314: { + com.google.cloud.tpu.v2alpha1.Symptom m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.Symptom.parser(), + extensionRegistry); + if (symptomsBuilder_ == null) { + ensureSymptomsIsMutable(); + symptoms_.add(m); + } else { + symptomsBuilder_.addMessage(m); + } + break; + } // case 314 + case 322: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 322 + case 330: { + com.google.cloud.tpu.v2alpha1.AttachedDisk m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.AttachedDisk.parser(), + extensionRegistry); + if (dataDisksBuilder_ == null) { + ensureDataDisksIsMutable(); + dataDisks_.add(m); + } else { + dataDisksBuilder_.addMessage(m); + } + break; + } // case 330 + case 346: { + queuedResource_ = input.readStringRequireUtf8(); + + break; + } // case 346 + case 362: { + input.readMessage( + getShieldedInstanceConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 362 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3122,27 +2904,22 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.lang.Object name_ = ""; /** - * - * *
      * Output only. Immutable. The name of the TPU.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -3151,23 +2928,20 @@ public java.lang.String getName() { } } /** - * - * *
      * Output only. Immutable. The name of the TPU.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -3175,67 +2949,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * Output only. Immutable. The name of the TPU.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * Output only. Immutable. The name of the TPU.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * Output only. Immutable. The name of the TPU.
      * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -3243,20 +3004,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object description_ = ""; /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; @@ -3265,21 +3024,20 @@ public java.lang.String getDescription() { } } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @return The bytes for description. */ - public com.google.protobuf.ByteString getDescriptionBytes() { + public com.google.protobuf.ByteString + getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); description_ = b; return b; } else { @@ -3287,61 +3045,54 @@ public com.google.protobuf.ByteString getDescriptionBytes() { } } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @param value The description to set. * @return This builder for chaining. */ - public Builder setDescription(java.lang.String value) { + public Builder setDescription( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + description_ = value; onChanged(); return this; } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @return This builder for chaining. */ public Builder clearDescription() { - + description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** - * - * *
      * The user-supplied description of the TPU. Maximum of 512 characters.
      * 
* * string description = 3; - * * @param value The bytes for description to set. * @return This builder for chaining. */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; onChanged(); return this; @@ -3349,20 +3100,18 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { private java.lang.Object acceleratorType_ = ""; /** - * - * *
-     * Required. The type of hardware accelerators associated with this node.
+     * The type of hardware accelerators associated with this node.
      * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @return The acceleratorType. */ public java.lang.String getAcceleratorType() { java.lang.Object ref = acceleratorType_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); acceleratorType_ = s; return s; @@ -3371,21 +3120,20 @@ public java.lang.String getAcceleratorType() { } } /** - * - * *
-     * Required. The type of hardware accelerators associated with this node.
+     * The type of hardware accelerators associated with this node.
      * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @return The bytes for acceleratorType. */ - public com.google.protobuf.ByteString getAcceleratorTypeBytes() { + public com.google.protobuf.ByteString + getAcceleratorTypeBytes() { java.lang.Object ref = acceleratorType_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); acceleratorType_ = b; return b; } else { @@ -3393,61 +3141,54 @@ public com.google.protobuf.ByteString getAcceleratorTypeBytes() { } } /** - * - * *
-     * Required. The type of hardware accelerators associated with this node.
+     * The type of hardware accelerators associated with this node.
      * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @param value The acceleratorType to set. * @return This builder for chaining. */ - public Builder setAcceleratorType(java.lang.String value) { + public Builder setAcceleratorType( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + acceleratorType_ = value; onChanged(); return this; } /** - * - * *
-     * Required. The type of hardware accelerators associated with this node.
+     * The type of hardware accelerators associated with this node.
      * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @return This builder for chaining. */ public Builder clearAcceleratorType() { - + acceleratorType_ = getDefaultInstance().getAcceleratorType(); onChanged(); return this; } /** - * - * *
-     * Required. The type of hardware accelerators associated with this node.
+     * The type of hardware accelerators associated with this node.
      * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @param value The bytes for acceleratorType to set. * @return This builder for chaining. */ - public Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value) { + public Builder setAcceleratorTypeBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + acceleratorType_ = value; onChanged(); return this; @@ -3455,73 +3196,51 @@ public Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value) { private int state_ = 0; /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for state. */ - @java.lang.Override - public int getStateValue() { + @java.lang.Override public int getStateValue() { return state_; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. */ public Builder setStateValue(int value) { - + state_ = value; onChanged(); return this; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The state. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.Node.State getState() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Node.State result = - com.google.cloud.tpu.v2alpha1.Node.State.valueOf(state_); + com.google.cloud.tpu.v2alpha1.Node.State result = com.google.cloud.tpu.v2alpha1.Node.State.valueOf(state_); return result == null ? com.google.cloud.tpu.v2alpha1.Node.State.UNRECOGNIZED : result; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The state to set. * @return This builder for chaining. */ @@ -3529,26 +3248,21 @@ public Builder setState(com.google.cloud.tpu.v2alpha1.Node.State value) { if (value == null) { throw new NullPointerException(); } - + state_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * Output only. The current state for the TPU Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return This builder for chaining. */ public Builder clearState() { - + state_ = 0; onChanged(); return this; @@ -3556,21 +3270,19 @@ public Builder clearState() { private java.lang.Object healthDescription_ = ""; /** - * - * *
-     * Output only. If this field is populated, it contains a description of why
-     * the TPU Node is unhealthy.
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The healthDescription. */ public java.lang.String getHealthDescription() { java.lang.Object ref = healthDescription_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); healthDescription_ = s; return s; @@ -3579,22 +3291,21 @@ public java.lang.String getHealthDescription() { } } /** - * - * *
-     * Output only. If this field is populated, it contains a description of why
-     * the TPU Node is unhealthy.
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for healthDescription. */ - public com.google.protobuf.ByteString getHealthDescriptionBytes() { + public com.google.protobuf.ByteString + getHealthDescriptionBytes() { java.lang.Object ref = healthDescription_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); healthDescription_ = b; return b; } else { @@ -3602,64 +3313,57 @@ public com.google.protobuf.ByteString getHealthDescriptionBytes() { } } /** - * - * *
-     * Output only. If this field is populated, it contains a description of why
-     * the TPU Node is unhealthy.
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The healthDescription to set. * @return This builder for chaining. */ - public Builder setHealthDescription(java.lang.String value) { + public Builder setHealthDescription( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + healthDescription_ = value; onChanged(); return this; } /** - * - * *
-     * Output only. If this field is populated, it contains a description of why
-     * the TPU Node is unhealthy.
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return This builder for chaining. */ public Builder clearHealthDescription() { - + healthDescription_ = getDefaultInstance().getHealthDescription(); onChanged(); return this; } /** - * - * *
-     * Output only. If this field is populated, it contains a description of why
-     * the TPU Node is unhealthy.
+     * Output only. If this field is populated, it contains a description of why the TPU Node
+     * is unhealthy.
      * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The bytes for healthDescription to set. * @return This builder for chaining. */ - public Builder setHealthDescriptionBytes(com.google.protobuf.ByteString value) { + public Builder setHealthDescriptionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + healthDescription_ = value; onChanged(); return this; @@ -3667,20 +3371,18 @@ public Builder setHealthDescriptionBytes(com.google.protobuf.ByteString value) { private java.lang.Object runtimeVersion_ = ""; /** - * - * *
      * Required. The runtime version running in the Node.
      * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The runtimeVersion. */ public java.lang.String getRuntimeVersion() { java.lang.Object ref = runtimeVersion_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); runtimeVersion_ = s; return s; @@ -3689,21 +3391,20 @@ public java.lang.String getRuntimeVersion() { } } /** - * - * *
      * Required. The runtime version running in the Node.
      * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for runtimeVersion. */ - public com.google.protobuf.ByteString getRuntimeVersionBytes() { + public com.google.protobuf.ByteString + getRuntimeVersionBytes() { java.lang.Object ref = runtimeVersion_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); runtimeVersion_ = b; return b; } else { @@ -3711,61 +3412,54 @@ public com.google.protobuf.ByteString getRuntimeVersionBytes() { } } /** - * - * *
      * Required. The runtime version running in the Node.
      * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The runtimeVersion to set. * @return This builder for chaining. */ - public Builder setRuntimeVersion(java.lang.String value) { + public Builder setRuntimeVersion( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + runtimeVersion_ = value; onChanged(); return this; } /** - * - * *
      * Required. The runtime version running in the Node.
      * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return This builder for chaining. */ public Builder clearRuntimeVersion() { - + runtimeVersion_ = getDefaultInstance().getRuntimeVersion(); onChanged(); return this; } /** - * - * *
      * Required. The runtime version running in the Node.
      * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The bytes for runtimeVersion to set. * @return This builder for chaining. */ - public Builder setRuntimeVersionBytes(com.google.protobuf.ByteString value) { + public Builder setRuntimeVersionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + runtimeVersion_ = value; onChanged(); return this; @@ -3773,47 +3467,34 @@ public Builder setRuntimeVersionBytes(com.google.protobuf.ByteString value) { private com.google.cloud.tpu.v2alpha1.NetworkConfig networkConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.NetworkConfig, - com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder, - com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder> - networkConfigBuilder_; + com.google.cloud.tpu.v2alpha1.NetworkConfig, com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder, com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder> networkConfigBuilder_; /** - * - * *
      * Network configurations for the TPU node.
      * 
* * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; - * * @return Whether the networkConfig field is set. */ public boolean hasNetworkConfig() { return networkConfigBuilder_ != null || networkConfig_ != null; } /** - * - * *
      * Network configurations for the TPU node.
      * 
* * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; - * * @return The networkConfig. */ public com.google.cloud.tpu.v2alpha1.NetworkConfig getNetworkConfig() { if (networkConfigBuilder_ == null) { - return networkConfig_ == null - ? com.google.cloud.tpu.v2alpha1.NetworkConfig.getDefaultInstance() - : networkConfig_; + return networkConfig_ == null ? com.google.cloud.tpu.v2alpha1.NetworkConfig.getDefaultInstance() : networkConfig_; } else { return networkConfigBuilder_.getMessage(); } } /** - * - * *
      * Network configurations for the TPU node.
      * 
@@ -3834,8 +3515,6 @@ public Builder setNetworkConfig(com.google.cloud.tpu.v2alpha1.NetworkConfig valu return this; } /** - * - * *
      * Network configurations for the TPU node.
      * 
@@ -3854,8 +3533,6 @@ public Builder setNetworkConfig( return this; } /** - * - * *
      * Network configurations for the TPU node.
      * 
@@ -3866,9 +3543,7 @@ public Builder mergeNetworkConfig(com.google.cloud.tpu.v2alpha1.NetworkConfig va if (networkConfigBuilder_ == null) { if (networkConfig_ != null) { networkConfig_ = - com.google.cloud.tpu.v2alpha1.NetworkConfig.newBuilder(networkConfig_) - .mergeFrom(value) - .buildPartial(); + com.google.cloud.tpu.v2alpha1.NetworkConfig.newBuilder(networkConfig_).mergeFrom(value).buildPartial(); } else { networkConfig_ = value; } @@ -3880,8 +3555,6 @@ public Builder mergeNetworkConfig(com.google.cloud.tpu.v2alpha1.NetworkConfig va return this; } /** - * - * *
      * Network configurations for the TPU node.
      * 
@@ -3900,8 +3573,6 @@ public Builder clearNetworkConfig() { return this; } /** - * - * *
      * Network configurations for the TPU node.
      * 
@@ -3909,13 +3580,11 @@ public Builder clearNetworkConfig() { * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; */ public com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder getNetworkConfigBuilder() { - + onChanged(); return getNetworkConfigFieldBuilder().getBuilder(); } /** - * - * *
      * Network configurations for the TPU node.
      * 
@@ -3926,14 +3595,11 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder getNetworkConfigOrBu if (networkConfigBuilder_ != null) { return networkConfigBuilder_.getMessageOrBuilder(); } else { - return networkConfig_ == null - ? com.google.cloud.tpu.v2alpha1.NetworkConfig.getDefaultInstance() - : networkConfig_; + return networkConfig_ == null ? + com.google.cloud.tpu.v2alpha1.NetworkConfig.getDefaultInstance() : networkConfig_; } } /** - * - * *
      * Network configurations for the TPU node.
      * 
@@ -3941,17 +3607,14 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder getNetworkConfigOrBu * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.NetworkConfig, - com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder, - com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder> + com.google.cloud.tpu.v2alpha1.NetworkConfig, com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder, com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder> getNetworkConfigFieldBuilder() { if (networkConfigBuilder_ == null) { - networkConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.NetworkConfig, - com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder, - com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder>( - getNetworkConfig(), getParentForChildren(), isClean()); + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.NetworkConfig, com.google.cloud.tpu.v2alpha1.NetworkConfig.Builder, com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); networkConfig_ = null; } return networkConfigBuilder_; @@ -3959,8 +3622,6 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder getNetworkConfigOrBu private java.lang.Object cidrBlock_ = ""; /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -3973,13 +3634,13 @@ public com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder getNetworkConfigOrBu
      * 
* * string cidr_block = 13; - * * @return The cidrBlock. */ public java.lang.String getCidrBlock() { java.lang.Object ref = cidrBlock_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cidrBlock_ = s; return s; @@ -3988,8 +3649,6 @@ public java.lang.String getCidrBlock() { } } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -4002,14 +3661,15 @@ public java.lang.String getCidrBlock() {
      * 
* * string cidr_block = 13; - * * @return The bytes for cidrBlock. */ - public com.google.protobuf.ByteString getCidrBlockBytes() { + public com.google.protobuf.ByteString + getCidrBlockBytes() { java.lang.Object ref = cidrBlock_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); cidrBlock_ = b; return b; } else { @@ -4017,8 +3677,6 @@ public com.google.protobuf.ByteString getCidrBlockBytes() { } } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -4031,22 +3689,20 @@ public com.google.protobuf.ByteString getCidrBlockBytes() {
      * 
* * string cidr_block = 13; - * * @param value The cidrBlock to set. * @return This builder for chaining. */ - public Builder setCidrBlock(java.lang.String value) { + public Builder setCidrBlock( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + cidrBlock_ = value; onChanged(); return this; } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -4059,18 +3715,15 @@ public Builder setCidrBlock(java.lang.String value) {
      * 
* * string cidr_block = 13; - * * @return This builder for chaining. */ public Builder clearCidrBlock() { - + cidrBlock_ = getDefaultInstance().getCidrBlock(); onChanged(); return this; } /** - * - * *
      * The CIDR block that the TPU node will use when selecting an IP address.
      * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -4083,16 +3736,16 @@ public Builder clearCidrBlock() {
      * 
* * string cidr_block = 13; - * * @param value The bytes for cidrBlock to set. * @return This builder for chaining. */ - public Builder setCidrBlockBytes(com.google.protobuf.ByteString value) { + public Builder setCidrBlockBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cidrBlock_ = value; onChanged(); return this; @@ -4100,49 +3753,36 @@ public Builder setCidrBlockBytes(com.google.protobuf.ByteString value) { private com.google.cloud.tpu.v2alpha1.ServiceAccount serviceAccount_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.ServiceAccount, - com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder, - com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder> - serviceAccountBuilder_; + com.google.cloud.tpu.v2alpha1.ServiceAccount, com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder, com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder> serviceAccountBuilder_; /** - * - * *
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
      * 
* * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37; - * * @return Whether the serviceAccount field is set. */ public boolean hasServiceAccount() { return serviceAccountBuilder_ != null || serviceAccount_ != null; } /** - * - * *
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
      * 
* * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37; - * * @return The serviceAccount. */ public com.google.cloud.tpu.v2alpha1.ServiceAccount getServiceAccount() { if (serviceAccountBuilder_ == null) { - return serviceAccount_ == null - ? com.google.cloud.tpu.v2alpha1.ServiceAccount.getDefaultInstance() - : serviceAccount_; + return serviceAccount_ == null ? com.google.cloud.tpu.v2alpha1.ServiceAccount.getDefaultInstance() : serviceAccount_; } else { return serviceAccountBuilder_.getMessage(); } } /** - * - * *
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
@@ -4164,8 +3804,6 @@ public Builder setServiceAccount(com.google.cloud.tpu.v2alpha1.ServiceAccount va
       return this;
     }
     /**
-     *
-     *
      * 
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
@@ -4185,8 +3823,6 @@ public Builder setServiceAccount(
       return this;
     }
     /**
-     *
-     *
      * 
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
@@ -4198,9 +3834,7 @@ public Builder mergeServiceAccount(com.google.cloud.tpu.v2alpha1.ServiceAccount
       if (serviceAccountBuilder_ == null) {
         if (serviceAccount_ != null) {
           serviceAccount_ =
-              com.google.cloud.tpu.v2alpha1.ServiceAccount.newBuilder(serviceAccount_)
-                  .mergeFrom(value)
-                  .buildPartial();
+            com.google.cloud.tpu.v2alpha1.ServiceAccount.newBuilder(serviceAccount_).mergeFrom(value).buildPartial();
         } else {
           serviceAccount_ = value;
         }
@@ -4212,8 +3846,6 @@ public Builder mergeServiceAccount(com.google.cloud.tpu.v2alpha1.ServiceAccount
       return this;
     }
     /**
-     *
-     *
      * 
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
@@ -4233,8 +3865,6 @@ public Builder clearServiceAccount() {
       return this;
     }
     /**
-     *
-     *
      * 
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
@@ -4243,13 +3873,11 @@ public Builder clearServiceAccount() {
      * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37;
      */
     public com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder getServiceAccountBuilder() {
-
+      
       onChanged();
       return getServiceAccountFieldBuilder().getBuilder();
     }
     /**
-     *
-     *
      * 
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
@@ -4261,14 +3889,11 @@ public com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder getServiceAccountOr
       if (serviceAccountBuilder_ != null) {
         return serviceAccountBuilder_.getMessageOrBuilder();
       } else {
-        return serviceAccount_ == null
-            ? com.google.cloud.tpu.v2alpha1.ServiceAccount.getDefaultInstance()
-            : serviceAccount_;
+        return serviceAccount_ == null ?
+            com.google.cloud.tpu.v2alpha1.ServiceAccount.getDefaultInstance() : serviceAccount_;
       }
     }
     /**
-     *
-     *
      * 
      * The Google Cloud Platform Service Account to be used by the TPU node VMs.
      * If None is specified, the default compute service account will be used.
@@ -4277,17 +3902,14 @@ public com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder getServiceAccountOr
      * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37;
      */
     private com.google.protobuf.SingleFieldBuilderV3<
-            com.google.cloud.tpu.v2alpha1.ServiceAccount,
-            com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder,
-            com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder>
+        com.google.cloud.tpu.v2alpha1.ServiceAccount, com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder, com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder> 
         getServiceAccountFieldBuilder() {
       if (serviceAccountBuilder_ == null) {
-        serviceAccountBuilder_ =
-            new com.google.protobuf.SingleFieldBuilderV3<
-                com.google.cloud.tpu.v2alpha1.ServiceAccount,
-                com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder,
-                com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder>(
-                getServiceAccount(), getParentForChildren(), isClean());
+        serviceAccountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+            com.google.cloud.tpu.v2alpha1.ServiceAccount, com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder, com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder>(
+                getServiceAccount(),
+                getParentForChildren(),
+                isClean());
         serviceAccount_ = null;
       }
       return serviceAccountBuilder_;
@@ -4295,58 +3917,39 @@ public com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder getServiceAccountOr
 
     private com.google.protobuf.Timestamp createTime_;
     private com.google.protobuf.SingleFieldBuilderV3<
-            com.google.protobuf.Timestamp,
-            com.google.protobuf.Timestamp.Builder,
-            com.google.protobuf.TimestampOrBuilder>
-        createTimeBuilder_;
+        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_;
     /**
-     *
-     *
      * 
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return createTimeBuilder_ != null || createTime_ != null; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -4362,17 +3965,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); onChanged(); @@ -4383,21 +3983,17 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (createTime_ != null) { createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); } else { createTime_ = value; } @@ -4409,15 +4005,11 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder clearCreateTime() { if (createTimeBuilder_ == null) { @@ -4431,64 +4023,48 @@ public Builder clearCreateTime() { return this; } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - + onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** - * - * *
      * Output only. The time when the node was created.
      * 
* - * - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); createTime_ = null; } return createTimeBuilder_; @@ -4496,47 +4072,34 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { private com.google.cloud.tpu.v2alpha1.SchedulingConfig schedulingConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.SchedulingConfig, - com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder, - com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder> - schedulingConfigBuilder_; + com.google.cloud.tpu.v2alpha1.SchedulingConfig, com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder, com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder> schedulingConfigBuilder_; /** - * - * *
      * The scheduling options for this node.
      * 
* * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; - * * @return Whether the schedulingConfig field is set. */ public boolean hasSchedulingConfig() { return schedulingConfigBuilder_ != null || schedulingConfig_ != null; } /** - * - * *
      * The scheduling options for this node.
      * 
* * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; - * * @return The schedulingConfig. */ public com.google.cloud.tpu.v2alpha1.SchedulingConfig getSchedulingConfig() { if (schedulingConfigBuilder_ == null) { - return schedulingConfig_ == null - ? com.google.cloud.tpu.v2alpha1.SchedulingConfig.getDefaultInstance() - : schedulingConfig_; + return schedulingConfig_ == null ? com.google.cloud.tpu.v2alpha1.SchedulingConfig.getDefaultInstance() : schedulingConfig_; } else { return schedulingConfigBuilder_.getMessage(); } } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4557,8 +4120,6 @@ public Builder setSchedulingConfig(com.google.cloud.tpu.v2alpha1.SchedulingConfi return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4577,8 +4138,6 @@ public Builder setSchedulingConfig( return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4589,9 +4148,7 @@ public Builder mergeSchedulingConfig(com.google.cloud.tpu.v2alpha1.SchedulingCon if (schedulingConfigBuilder_ == null) { if (schedulingConfig_ != null) { schedulingConfig_ = - com.google.cloud.tpu.v2alpha1.SchedulingConfig.newBuilder(schedulingConfig_) - .mergeFrom(value) - .buildPartial(); + com.google.cloud.tpu.v2alpha1.SchedulingConfig.newBuilder(schedulingConfig_).mergeFrom(value).buildPartial(); } else { schedulingConfig_ = value; } @@ -4603,8 +4160,6 @@ public Builder mergeSchedulingConfig(com.google.cloud.tpu.v2alpha1.SchedulingCon return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4623,8 +4178,6 @@ public Builder clearSchedulingConfig() { return this; } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4632,13 +4185,11 @@ public Builder clearSchedulingConfig() { * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; */ public com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder getSchedulingConfigBuilder() { - + onChanged(); return getSchedulingConfigFieldBuilder().getBuilder(); } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4649,14 +4200,11 @@ public com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder getSchedulingConf if (schedulingConfigBuilder_ != null) { return schedulingConfigBuilder_.getMessageOrBuilder(); } else { - return schedulingConfig_ == null - ? com.google.cloud.tpu.v2alpha1.SchedulingConfig.getDefaultInstance() - : schedulingConfig_; + return schedulingConfig_ == null ? + com.google.cloud.tpu.v2alpha1.SchedulingConfig.getDefaultInstance() : schedulingConfig_; } } /** - * - * *
      * The scheduling options for this node.
      * 
@@ -4664,52 +4212,39 @@ public com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder getSchedulingConf * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.SchedulingConfig, - com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder, - com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder> + com.google.cloud.tpu.v2alpha1.SchedulingConfig, com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder, com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder> getSchedulingConfigFieldBuilder() { if (schedulingConfigBuilder_ == null) { - schedulingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.SchedulingConfig, - com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder, - com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder>( - getSchedulingConfig(), getParentForChildren(), isClean()); + schedulingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.SchedulingConfig, com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder, com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder>( + getSchedulingConfig(), + getParentForChildren(), + isClean()); schedulingConfig_ = null; } return schedulingConfigBuilder_; } private java.util.List networkEndpoints_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureNetworkEndpointsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - networkEndpoints_ = - new java.util.ArrayList( - networkEndpoints_); + networkEndpoints_ = new java.util.ArrayList(networkEndpoints_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.NetworkEndpoint, - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder, - com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder> - networkEndpointsBuilder_; + com.google.cloud.tpu.v2alpha1.NetworkEndpoint, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder, com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder> networkEndpointsBuilder_; /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public java.util.List getNetworkEndpointsList() { if (networkEndpointsBuilder_ == null) { @@ -4719,17 +4254,13 @@ public java.util.List getNetworkE } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public int getNetworkEndpointsCount() { if (networkEndpointsBuilder_ == null) { @@ -4739,17 +4270,13 @@ public int getNetworkEndpointsCount() { } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint getNetworkEndpoints(int index) { if (networkEndpointsBuilder_ == null) { @@ -4759,17 +4286,13 @@ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint getNetworkEndpoints(int ind } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder setNetworkEndpoints( int index, com.google.cloud.tpu.v2alpha1.NetworkEndpoint value) { @@ -4786,17 +4309,13 @@ public Builder setNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder setNetworkEndpoints( int index, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder builderForValue) { @@ -4810,17 +4329,13 @@ public Builder setNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addNetworkEndpoints(com.google.cloud.tpu.v2alpha1.NetworkEndpoint value) { if (networkEndpointsBuilder_ == null) { @@ -4836,17 +4351,13 @@ public Builder addNetworkEndpoints(com.google.cloud.tpu.v2alpha1.NetworkEndpoint return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addNetworkEndpoints( int index, com.google.cloud.tpu.v2alpha1.NetworkEndpoint value) { @@ -4863,17 +4374,13 @@ public Builder addNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addNetworkEndpoints( com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder builderForValue) { @@ -4887,17 +4394,13 @@ public Builder addNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addNetworkEndpoints( int index, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder builderForValue) { @@ -4911,23 +4414,20 @@ public Builder addNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addAllNetworkEndpoints( java.lang.Iterable values) { if (networkEndpointsBuilder_ == null) { ensureNetworkEndpointsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkEndpoints_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, networkEndpoints_); onChanged(); } else { networkEndpointsBuilder_.addAllMessages(values); @@ -4935,17 +4435,13 @@ public Builder addAllNetworkEndpoints( return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder clearNetworkEndpoints() { if (networkEndpointsBuilder_ == null) { @@ -4958,17 +4454,13 @@ public Builder clearNetworkEndpoints() { return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder removeNetworkEndpoints(int index) { if (networkEndpointsBuilder_ == null) { @@ -4981,58 +4473,45 @@ public Builder removeNetworkEndpoints(int index) { return this; } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder getNetworkEndpointsBuilder( int index) { return getNetworkEndpointsFieldBuilder().getBuilder(index); } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( int index) { if (networkEndpointsBuilder_ == null) { - return networkEndpoints_.get(index); - } else { + return networkEndpoints_.get(index); } else { return networkEndpointsBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List - getNetworkEndpointsOrBuilderList() { + public java.util.List + getNetworkEndpointsOrBuilderList() { if (networkEndpointsBuilder_ != null) { return networkEndpointsBuilder_.getMessageOrBuilderList(); } else { @@ -5040,69 +4519,51 @@ public com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder getNetworkEndpoint } } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder addNetworkEndpointsBuilder() { - return getNetworkEndpointsFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.NetworkEndpoint.getDefaultInstance()); + return getNetworkEndpointsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.NetworkEndpoint.getDefaultInstance()); } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder addNetworkEndpointsBuilder( int index) { - return getNetworkEndpointsFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.getDefaultInstance()); + return getNetworkEndpointsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.getDefaultInstance()); } /** - * - * *
      * Output only. The network endpoints where TPU workers can be accessed and
      * sent work. It is recommended that runtime clients of the node reach out
      * to the 0th entry in this map first.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List - getNetworkEndpointsBuilderList() { + public java.util.List + getNetworkEndpointsBuilderList() { return getNetworkEndpointsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.NetworkEndpoint, - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder, - com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder> + com.google.cloud.tpu.v2alpha1.NetworkEndpoint, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder, com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder> getNetworkEndpointsFieldBuilder() { if (networkEndpointsBuilder_ == null) { - networkEndpointsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.NetworkEndpoint, - com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder, - com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder>( + networkEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.NetworkEndpoint, com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder, com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder>( networkEndpoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -5114,65 +4575,51 @@ public com.google.cloud.tpu.v2alpha1.NetworkEndpoint.Builder addNetworkEndpoints private int health_ = 0; /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @return The enum numeric value on the wire for health. */ - @java.lang.Override - public int getHealthValue() { + @java.lang.Override public int getHealthValue() { return health_; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @param value The enum numeric value on the wire for health to set. * @return This builder for chaining. */ public Builder setHealthValue(int value) { - + health_ = value; onChanged(); return this; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @return The health. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.Node.Health getHealth() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Node.Health result = - com.google.cloud.tpu.v2alpha1.Node.Health.valueOf(health_); + com.google.cloud.tpu.v2alpha1.Node.Health result = com.google.cloud.tpu.v2alpha1.Node.Health.valueOf(health_); return result == null ? com.google.cloud.tpu.v2alpha1.Node.Health.UNRECOGNIZED : result; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @param value The health to set. * @return This builder for chaining. */ @@ -5180,44 +4627,42 @@ public Builder setHealth(com.google.cloud.tpu.v2alpha1.Node.Health value) { if (value == null) { throw new NullPointerException(); } - + health_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * The health status of the TPU node.
      * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @return This builder for chaining. */ public Builder clearHealth() { - + health_ = 0; onChanged(); return this; } - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); } return labels_; } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged(); - ; + internalGetMutableLabels() { + onChanged();; if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); @@ -5229,30 +4674,28 @@ public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ + @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } - /** Use {@link #getLabelsMap()} instead. */ + /** + * Use {@link #getLabelsMap()} instead. + */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
@@ -5260,12 +4703,11 @@ public java.util.Map getLabels() { * map<string, string> labels = 24; */ @java.lang.Override + public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
@@ -5273,17 +4715,16 @@ public java.util.Map getLabelsMap() { * map<string, string> labels = 24; */ @java.lang.Override + public java.lang.String getLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
@@ -5291,11 +4732,12 @@ public java.lang.String getLabelsOrDefault( * map<string, string> labels = 24; */ @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } @@ -5303,80 +4745,83 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public Builder clearLabels() { - internalGetMutableLabels().getMutableMap().clear(); + internalGetMutableLabels().getMutableMap() + .clear(); return this; } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); return this; } - /** Use alternate mutation accessors instead. */ + /** + * Use alternate mutation accessors instead. + */ @java.lang.Deprecated - public java.util.Map getMutableLabels() { + public java.util.Map + getMutableLabels() { return internalGetMutableLabels().getMutableMap(); } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } if (value == null) { - throw new NullPointerException("map value"); - } + throw new NullPointerException("map value"); +} - internalGetMutableLabels().getMutableMap().put(key, value); + internalGetMutableLabels().getMutableMap() + .put(key, value); return this; } /** - * - * *
      * Resource labels to represent user-provided metadata.
      * 
* * map<string, string> labels = 24; */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); return this; } - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } - private com.google.protobuf.MapField - internalGetMutableMetadata() { - onChanged(); - ; + internalGetMutableMetadata() { + onChanged();; if (metadata_ == null) { - metadata_ = - com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + metadata_ = com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); } if (!metadata_.isMutable()) { metadata_ = metadata_.copy(); @@ -5388,8 +4833,6 @@ public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** - * - * *
      * Custom metadata to apply to the TPU Node.
      * Can set startup-script and shutdown-script
@@ -5397,22 +4840,22 @@ public int getMetadataCount() {
      *
      * map<string, string> metadata = 34;
      */
+
     @java.lang.Override
-    public boolean containsMetadata(java.lang.String key) {
-      if (key == null) {
-        throw new NullPointerException("map key");
-      }
+    public boolean containsMetadata(
+        java.lang.String key) {
+      if (key == null) { throw new NullPointerException("map key"); }
       return internalGetMetadata().getMap().containsKey(key);
     }
-    /** Use {@link #getMetadataMap()} instead. */
+    /**
+     * Use {@link #getMetadataMap()} instead.
+     */
     @java.lang.Override
     @java.lang.Deprecated
     public java.util.Map getMetadata() {
       return getMetadataMap();
     }
     /**
-     *
-     *
      * 
      * Custom metadata to apply to the TPU Node.
      * Can set startup-script and shutdown-script
@@ -5421,12 +4864,11 @@ public java.util.Map getMetadata() {
      * map<string, string> metadata = 34;
      */
     @java.lang.Override
+
     public java.util.Map getMetadataMap() {
       return internalGetMetadata().getMap();
     }
     /**
-     *
-     *
      * 
      * Custom metadata to apply to the TPU Node.
      * Can set startup-script and shutdown-script
@@ -5435,17 +4877,16 @@ public java.util.Map getMetadataMap() {
      * map<string, string> metadata = 34;
      */
     @java.lang.Override
+
     public java.lang.String getMetadataOrDefault(
-        java.lang.String key, java.lang.String defaultValue) {
-      if (key == null) {
-        throw new NullPointerException("map key");
-      }
-      java.util.Map map = internalGetMetadata().getMap();
+        java.lang.String key,
+        java.lang.String defaultValue) {
+      if (key == null) { throw new NullPointerException("map key"); }
+      java.util.Map map =
+          internalGetMetadata().getMap();
       return map.containsKey(key) ? map.get(key) : defaultValue;
     }
     /**
-     *
-     *
      * 
      * Custom metadata to apply to the TPU Node.
      * Can set startup-script and shutdown-script
@@ -5454,11 +4895,12 @@ public java.lang.String getMetadataOrDefault(
      * map<string, string> metadata = 34;
      */
     @java.lang.Override
-    public java.lang.String getMetadataOrThrow(java.lang.String key) {
-      if (key == null) {
-        throw new NullPointerException("map key");
-      }
-      java.util.Map map = internalGetMetadata().getMap();
+
+    public java.lang.String getMetadataOrThrow(
+        java.lang.String key) {
+      if (key == null) { throw new NullPointerException("map key"); }
+      java.util.Map map =
+          internalGetMetadata().getMap();
       if (!map.containsKey(key)) {
         throw new java.lang.IllegalArgumentException();
       }
@@ -5466,12 +4908,11 @@ public java.lang.String getMetadataOrThrow(java.lang.String key) {
     }
 
     public Builder clearMetadata() {
-      internalGetMutableMetadata().getMutableMap().clear();
+      internalGetMutableMetadata().getMutableMap()
+          .clear();
       return this;
     }
     /**
-     *
-     *
      * 
      * Custom metadata to apply to the TPU Node.
      * Can set startup-script and shutdown-script
@@ -5479,21 +4920,23 @@ public Builder clearMetadata() {
      *
      * map<string, string> metadata = 34;
      */
-    public Builder removeMetadata(java.lang.String key) {
-      if (key == null) {
-        throw new NullPointerException("map key");
-      }
-      internalGetMutableMetadata().getMutableMap().remove(key);
+
+    public Builder removeMetadata(
+        java.lang.String key) {
+      if (key == null) { throw new NullPointerException("map key"); }
+      internalGetMutableMetadata().getMutableMap()
+          .remove(key);
       return this;
     }
-    /** Use alternate mutation accessors instead. */
+    /**
+     * Use alternate mutation accessors instead.
+     */
     @java.lang.Deprecated
-    public java.util.Map getMutableMetadata() {
+    public java.util.Map
+    getMutableMetadata() {
       return internalGetMutableMetadata().getMutableMap();
     }
     /**
-     *
-     *
      * 
      * Custom metadata to apply to the TPU Node.
      * Can set startup-script and shutdown-script
@@ -5501,20 +4944,19 @@ public java.util.Map getMutableMetadata() {
      *
      * map<string, string> metadata = 34;
      */
-    public Builder putMetadata(java.lang.String key, java.lang.String value) {
-      if (key == null) {
-        throw new NullPointerException("map key");
-      }
+    public Builder putMetadata(
+        java.lang.String key,
+        java.lang.String value) {
+      if (key == null) { throw new NullPointerException("map key"); }
       if (value == null) {
-        throw new NullPointerException("map value");
-      }
+  throw new NullPointerException("map value");
+}
 
-      internalGetMutableMetadata().getMutableMap().put(key, value);
+      internalGetMutableMetadata().getMutableMap()
+          .put(key, value);
       return this;
     }
     /**
-     *
-     *
      * 
      * Custom metadata to apply to the TPU Node.
      * Can set startup-script and shutdown-script
@@ -5522,60 +4964,53 @@ public Builder putMetadata(java.lang.String key, java.lang.String value) {
      *
      * map<string, string> metadata = 34;
      */
-    public Builder putAllMetadata(java.util.Map values) {
-      internalGetMutableMetadata().getMutableMap().putAll(values);
+
+    public Builder putAllMetadata(
+        java.util.Map values) {
+      internalGetMutableMetadata().getMutableMap()
+          .putAll(values);
       return this;
     }
 
-    private com.google.protobuf.LazyStringList tags_ =
-        com.google.protobuf.LazyStringArrayList.EMPTY;
-
+    private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
     private void ensureTagsIsMutable() {
       if (!((bitField0_ & 0x00000008) != 0)) {
         tags_ = new com.google.protobuf.LazyStringArrayList(tags_);
         bitField0_ |= 0x00000008;
-      }
+       }
     }
     /**
-     *
-     *
      * 
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @return A list containing the tags. */ - public com.google.protobuf.ProtocolStringList getTagsList() { + public com.google.protobuf.ProtocolStringList + getTagsList() { return tags_.getUnmodifiableView(); } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @return The count of tags. */ public int getTagsCount() { return tags_.size(); } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @param index The index of the element to return. * @return The tags at the given index. */ @@ -5583,95 +5018,85 @@ public java.lang.String getTags(int index) { return tags_.get(index); } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @param index The index of the value to return. * @return The bytes of the tags at the given index. */ - public com.google.protobuf.ByteString getTagsBytes(int index) { + public com.google.protobuf.ByteString + getTagsBytes(int index) { return tags_.getByteString(index); } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @param index The index to set the value at. * @param value The tags to set. * @return This builder for chaining. */ - public Builder setTags(int index, java.lang.String value) { + public Builder setTags( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); + throw new NullPointerException(); + } + ensureTagsIsMutable(); tags_.set(index, value); onChanged(); return this; } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @param value The tags to add. * @return This builder for chaining. */ - public Builder addTags(java.lang.String value) { + public Builder addTags( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); + throw new NullPointerException(); + } + ensureTagsIsMutable(); tags_.add(value); onChanged(); return this; } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @param values The tags to add. * @return This builder for chaining. */ - public Builder addAllTags(java.lang.Iterable values) { + public Builder addAllTags( + java.lang.Iterable values) { ensureTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); onChanged(); return this; } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @return This builder for chaining. */ public Builder clearTags() { @@ -5681,39 +5106,34 @@ public Builder clearTags() { return this; } /** - * - * *
      * Tags to apply to the TPU Node. Tags are used to identify valid sources or
      * targets for network firewalls.
      * 
* * repeated string tags = 40; - * * @param value The bytes of the tags to add. * @return This builder for chaining. */ - public Builder addTagsBytes(com.google.protobuf.ByteString value) { + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureTagsIsMutable(); tags_.add(value); onChanged(); return this; } - private long id_; + private long id_ ; /** - * - * *
      * Output only. The unique identifier for the TPU Node.
      * 
* * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The id. */ @java.lang.Override @@ -5721,61 +5141,48 @@ public long getId() { return id_; } /** - * - * *
      * Output only. The unique identifier for the TPU Node.
      * 
* * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @param value The id to set. * @return This builder for chaining. */ public Builder setId(long value) { - + id_ = value; onChanged(); return this; } /** - * - * *
      * Output only. The unique identifier for the TPU Node.
      * 
* * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return This builder for chaining. */ public Builder clearId() { - + id_ = 0L; onChanged(); return this; } private java.util.List dataDisks_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureDataDisksIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { - dataDisks_ = - new java.util.ArrayList(dataDisks_); + dataDisks_ = new java.util.ArrayList(dataDisks_); bitField0_ |= 0x00000010; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AttachedDisk, - com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder, - com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder> - dataDisksBuilder_; + com.google.cloud.tpu.v2alpha1.AttachedDisk, com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder, com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder> dataDisksBuilder_; /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5790,8 +5197,6 @@ public java.util.List getDataDisksLi } } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5806,8 +5211,6 @@ public int getDataDisksCount() { } } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5822,15 +5225,14 @@ public com.google.cloud.tpu.v2alpha1.AttachedDisk getDataDisks(int index) { } } /** - * - * *
      * The additional data disks for the Node.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - public Builder setDataDisks(int index, com.google.cloud.tpu.v2alpha1.AttachedDisk value) { + public Builder setDataDisks( + int index, com.google.cloud.tpu.v2alpha1.AttachedDisk value) { if (dataDisksBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5844,8 +5246,6 @@ public Builder setDataDisks(int index, com.google.cloud.tpu.v2alpha1.AttachedDis return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5864,8 +5264,6 @@ public Builder setDataDisks( return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5886,15 +5284,14 @@ public Builder addDataDisks(com.google.cloud.tpu.v2alpha1.AttachedDisk value) { return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - public Builder addDataDisks(int index, com.google.cloud.tpu.v2alpha1.AttachedDisk value) { + public Builder addDataDisks( + int index, com.google.cloud.tpu.v2alpha1.AttachedDisk value) { if (dataDisksBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5908,8 +5305,6 @@ public Builder addDataDisks(int index, com.google.cloud.tpu.v2alpha1.AttachedDis return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5928,8 +5323,6 @@ public Builder addDataDisks( return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5948,8 +5341,6 @@ public Builder addDataDisks( return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5960,7 +5351,8 @@ public Builder addAllDataDisks( java.lang.Iterable values) { if (dataDisksBuilder_ == null) { ensureDataDisksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataDisks_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dataDisks_); onChanged(); } else { dataDisksBuilder_.addAllMessages(values); @@ -5968,8 +5360,6 @@ public Builder addAllDataDisks( return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -5987,8 +5377,6 @@ public Builder clearDataDisks() { return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -6006,44 +5394,39 @@ public Builder removeDataDisks(int index) { return this; } /** - * - * *
      * The additional data disks for the Node.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - public com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder getDataDisksBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder getDataDisksBuilder( + int index) { return getDataDisksFieldBuilder().getBuilder(index); } /** - * - * *
      * The additional data disks for the Node.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - public com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder( + int index) { if (dataDisksBuilder_ == null) { - return dataDisks_.get(index); - } else { + return dataDisks_.get(index); } else { return dataDisksBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * The additional data disks for the Node.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - public java.util.List - getDataDisksOrBuilderList() { + public java.util.List + getDataDisksOrBuilderList() { if (dataDisksBuilder_ != null) { return dataDisksBuilder_.getMessageOrBuilderList(); } else { @@ -6051,8 +5434,6 @@ public com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder } } /** - * - * *
      * The additional data disks for the Node.
      * 
@@ -6060,48 +5441,42 @@ public com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ public com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder addDataDisksBuilder() { - return getDataDisksFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.AttachedDisk.getDefaultInstance()); + return getDataDisksFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.AttachedDisk.getDefaultInstance()); } /** - * - * *
      * The additional data disks for the Node.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - public com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder addDataDisksBuilder(int index) { - return getDataDisksFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v2alpha1.AttachedDisk.getDefaultInstance()); + public com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder addDataDisksBuilder( + int index) { + return getDataDisksFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.AttachedDisk.getDefaultInstance()); } /** - * - * *
      * The additional data disks for the Node.
      * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - public java.util.List - getDataDisksBuilderList() { + public java.util.List + getDataDisksBuilderList() { return getDataDisksFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AttachedDisk, - com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder, - com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder> + com.google.cloud.tpu.v2alpha1.AttachedDisk, com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder, com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder> getDataDisksFieldBuilder() { if (dataDisksBuilder_ == null) { - dataDisksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.AttachedDisk, - com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder, - com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder>( - dataDisks_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + dataDisksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.AttachedDisk, com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder, com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder>( + dataDisks_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); dataDisks_ = null; } return dataDisksBuilder_; @@ -6109,73 +5484,51 @@ public com.google.cloud.tpu.v2alpha1.AttachedDisk.Builder addDataDisksBuilder(in private int apiVersion_ = 0; /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for apiVersion. */ - @java.lang.Override - public int getApiVersionValue() { + @java.lang.Override public int getApiVersionValue() { return apiVersion_; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The enum numeric value on the wire for apiVersion to set. * @return This builder for chaining. */ public Builder setApiVersionValue(int value) { - + apiVersion_ = value; onChanged(); return this; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The apiVersion. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.Node.ApiVersion getApiVersion() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Node.ApiVersion result = - com.google.cloud.tpu.v2alpha1.Node.ApiVersion.valueOf(apiVersion_); + com.google.cloud.tpu.v2alpha1.Node.ApiVersion result = com.google.cloud.tpu.v2alpha1.Node.ApiVersion.valueOf(apiVersion_); return result == null ? com.google.cloud.tpu.v2alpha1.Node.ApiVersion.UNRECOGNIZED : result; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param value The apiVersion to set. * @return This builder for chaining. */ @@ -6183,57 +5536,44 @@ public Builder setApiVersion(com.google.cloud.tpu.v2alpha1.Node.ApiVersion value if (value == null) { throw new NullPointerException(); } - + apiVersion_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * Output only. The API version that created this Node.
      * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return This builder for chaining. */ public Builder clearApiVersion() { - + apiVersion_ = 0; onChanged(); return this; } private java.util.List symptoms_ = - java.util.Collections.emptyList(); - + java.util.Collections.emptyList(); private void ensureSymptomsIsMutable() { if (!((bitField0_ & 0x00000020) != 0)) { symptoms_ = new java.util.ArrayList(symptoms_); bitField0_ |= 0x00000020; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Symptom, - com.google.cloud.tpu.v2alpha1.Symptom.Builder, - com.google.cloud.tpu.v2alpha1.SymptomOrBuilder> - symptomsBuilder_; + com.google.cloud.tpu.v2alpha1.Symptom, com.google.cloud.tpu.v2alpha1.Symptom.Builder, com.google.cloud.tpu.v2alpha1.SymptomOrBuilder> symptomsBuilder_; /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public java.util.List getSymptomsList() { if (symptomsBuilder_ == null) { @@ -6243,15 +5583,11 @@ public java.util.List getSymptomsList() { } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public int getSymptomsCount() { if (symptomsBuilder_ == null) { @@ -6261,15 +5597,11 @@ public int getSymptomsCount() { } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v2alpha1.Symptom getSymptoms(int index) { if (symptomsBuilder_ == null) { @@ -6279,17 +5611,14 @@ public com.google.cloud.tpu.v2alpha1.Symptom getSymptoms(int index) { } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder setSymptoms(int index, com.google.cloud.tpu.v2alpha1.Symptom value) { + public Builder setSymptoms( + int index, com.google.cloud.tpu.v2alpha1.Symptom value) { if (symptomsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6303,15 +5632,11 @@ public Builder setSymptoms(int index, com.google.cloud.tpu.v2alpha1.Symptom valu return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder setSymptoms( int index, com.google.cloud.tpu.v2alpha1.Symptom.Builder builderForValue) { @@ -6325,15 +5650,11 @@ public Builder setSymptoms( return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addSymptoms(com.google.cloud.tpu.v2alpha1.Symptom value) { if (symptomsBuilder_ == null) { @@ -6349,17 +5670,14 @@ public Builder addSymptoms(com.google.cloud.tpu.v2alpha1.Symptom value) { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder addSymptoms(int index, com.google.cloud.tpu.v2alpha1.Symptom value) { + public Builder addSymptoms( + int index, com.google.cloud.tpu.v2alpha1.Symptom value) { if (symptomsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6373,17 +5691,14 @@ public Builder addSymptoms(int index, com.google.cloud.tpu.v2alpha1.Symptom valu return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public Builder addSymptoms(com.google.cloud.tpu.v2alpha1.Symptom.Builder builderForValue) { + public Builder addSymptoms( + com.google.cloud.tpu.v2alpha1.Symptom.Builder builderForValue) { if (symptomsBuilder_ == null) { ensureSymptomsIsMutable(); symptoms_.add(builderForValue.build()); @@ -6394,15 +5709,11 @@ public Builder addSymptoms(com.google.cloud.tpu.v2alpha1.Symptom.Builder builder return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addSymptoms( int index, com.google.cloud.tpu.v2alpha1.Symptom.Builder builderForValue) { @@ -6416,21 +5727,18 @@ public Builder addSymptoms( return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder addAllSymptoms( java.lang.Iterable values) { if (symptomsBuilder_ == null) { ensureSymptomsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, symptoms_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symptoms_); onChanged(); } else { symptomsBuilder_.addAllMessages(values); @@ -6438,15 +5746,11 @@ public Builder addAllSymptoms( return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder clearSymptoms() { if (symptomsBuilder_ == null) { @@ -6459,15 +5763,11 @@ public Builder clearSymptoms() { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public Builder removeSymptoms(int index) { if (symptomsBuilder_ == null) { @@ -6480,50 +5780,39 @@ public Builder removeSymptoms(int index) { return this; } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v2alpha1.Symptom.Builder getSymptomsBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.Symptom.Builder getSymptomsBuilder( + int index) { return getSymptomsFieldBuilder().getBuilder(index); } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v2alpha1.SymptomOrBuilder getSymptomsOrBuilder(int index) { + public com.google.cloud.tpu.v2alpha1.SymptomOrBuilder getSymptomsOrBuilder( + int index) { if (symptomsBuilder_ == null) { - return symptoms_.get(index); - } else { + return symptoms_.get(index); } else { return symptomsBuilder_.getMessageOrBuilder(index); } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List - getSymptomsOrBuilderList() { + public java.util.List + getSymptomsOrBuilderList() { if (symptomsBuilder_ != null) { return symptomsBuilder_.getMessageOrBuilderList(); } else { @@ -6531,118 +5820,187 @@ public com.google.cloud.tpu.v2alpha1.SymptomOrBuilder getSymptomsOrBuilder(int i } } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ public com.google.cloud.tpu.v2alpha1.Symptom.Builder addSymptomsBuilder() { - return getSymptomsFieldBuilder() - .addBuilder(com.google.cloud.tpu.v2alpha1.Symptom.getDefaultInstance()); + return getSymptomsFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.Symptom.getDefaultInstance()); } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public com.google.cloud.tpu.v2alpha1.Symptom.Builder addSymptomsBuilder(int index) { - return getSymptomsFieldBuilder() - .addBuilder(index, com.google.cloud.tpu.v2alpha1.Symptom.getDefaultInstance()); + public com.google.cloud.tpu.v2alpha1.Symptom.Builder addSymptomsBuilder( + int index) { + return getSymptomsFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.Symptom.getDefaultInstance()); } /** - * - * *
      * Output only. The Symptoms that have occurred to the TPU Node.
      * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - public java.util.List getSymptomsBuilderList() { + public java.util.List + getSymptomsBuilderList() { return getSymptomsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Symptom, - com.google.cloud.tpu.v2alpha1.Symptom.Builder, - com.google.cloud.tpu.v2alpha1.SymptomOrBuilder> + com.google.cloud.tpu.v2alpha1.Symptom, com.google.cloud.tpu.v2alpha1.Symptom.Builder, com.google.cloud.tpu.v2alpha1.SymptomOrBuilder> getSymptomsFieldBuilder() { if (symptomsBuilder_ == null) { - symptomsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Symptom, - com.google.cloud.tpu.v2alpha1.Symptom.Builder, - com.google.cloud.tpu.v2alpha1.SymptomOrBuilder>( - symptoms_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + symptomsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.Symptom, com.google.cloud.tpu.v2alpha1.Symptom.Builder, com.google.cloud.tpu.v2alpha1.SymptomOrBuilder>( + symptoms_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); symptoms_ = null; } return symptomsBuilder_; } - private com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shieldedInstanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder> - shieldedInstanceConfigBuilder_; + private java.lang.Object queuedResource_ = ""; + /** + *
+     * Output only. The qualified name of the QueuedResource that requested this Node.
+     * 
+ * + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The queuedResource. + */ + public java.lang.String getQueuedResource() { + java.lang.Object ref = queuedResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queuedResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The qualified name of the QueuedResource that requested this Node.
+     * 
+ * + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for queuedResource. + */ + public com.google.protobuf.ByteString + getQueuedResourceBytes() { + java.lang.Object ref = queuedResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queuedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } /** + *
+     * Output only. The qualified name of the QueuedResource that requested this Node.
+     * 
* + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The queuedResource to set. + * @return This builder for chaining. + */ + public Builder setQueuedResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + queuedResource_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The qualified name of the QueuedResource that requested this Node.
+     * 
* + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearQueuedResource() { + + queuedResource_ = getDefaultInstance().getQueuedResource(); + onChanged(); + return this; + } + /** + *
+     * Output only. The qualified name of the QueuedResource that requested this Node.
+     * 
+ * + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for queuedResource to set. + * @return This builder for chaining. + */ + public Builder setQueuedResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + queuedResource_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shieldedInstanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder> shieldedInstanceConfigBuilder_; + /** *
      * Shielded Instance options.
      * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; - * * @return Whether the shieldedInstanceConfig field is set. */ public boolean hasShieldedInstanceConfig() { return shieldedInstanceConfigBuilder_ != null || shieldedInstanceConfig_ != null; } /** - * - * *
      * Shielded Instance options.
      * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; - * * @return The shieldedInstanceConfig. */ public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig getShieldedInstanceConfig() { if (shieldedInstanceConfigBuilder_ == null) { - return shieldedInstanceConfig_ == null - ? com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance() - : shieldedInstanceConfig_; + return shieldedInstanceConfig_ == null ? com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance() : shieldedInstanceConfig_; } else { return shieldedInstanceConfigBuilder_.getMessage(); } } /** - * - * *
      * Shielded Instance options.
      * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; */ - public Builder setShieldedInstanceConfig( - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig value) { + public Builder setShieldedInstanceConfig(com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig value) { if (shieldedInstanceConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6656,8 +6014,6 @@ public Builder setShieldedInstanceConfig( return this; } /** - * - * *
      * Shielded Instance options.
      * 
@@ -6676,23 +6032,17 @@ public Builder setShieldedInstanceConfig( return this; } /** - * - * *
      * Shielded Instance options.
      * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; */ - public Builder mergeShieldedInstanceConfig( - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig value) { + public Builder mergeShieldedInstanceConfig(com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig value) { if (shieldedInstanceConfigBuilder_ == null) { if (shieldedInstanceConfig_ != null) { shieldedInstanceConfig_ = - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.newBuilder( - shieldedInstanceConfig_) - .mergeFrom(value) - .buildPartial(); + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.newBuilder(shieldedInstanceConfig_).mergeFrom(value).buildPartial(); } else { shieldedInstanceConfig_ = value; } @@ -6704,8 +6054,6 @@ public Builder mergeShieldedInstanceConfig( return this; } /** - * - * *
      * Shielded Instance options.
      * 
@@ -6724,42 +6072,33 @@ public Builder clearShieldedInstanceConfig() { return this; } /** - * - * *
      * Shielded Instance options.
      * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; */ - public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder - getShieldedInstanceConfigBuilder() { - + public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder getShieldedInstanceConfigBuilder() { + onChanged(); return getShieldedInstanceConfigFieldBuilder().getBuilder(); } /** - * - * *
      * Shielded Instance options.
      * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; */ - public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder - getShieldedInstanceConfigOrBuilder() { + public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder() { if (shieldedInstanceConfigBuilder_ != null) { return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); } else { - return shieldedInstanceConfig_ == null - ? com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance() - : shieldedInstanceConfig_; + return shieldedInstanceConfig_ == null ? + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance() : shieldedInstanceConfig_; } } /** - * - * *
      * Shielded Instance options.
      * 
@@ -6767,24 +6106,21 @@ public Builder clearShieldedInstanceConfig() { * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder> + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder> getShieldedInstanceConfigFieldBuilder() { if (shieldedInstanceConfigBuilder_ == null) { - shieldedInstanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder>( - getShieldedInstanceConfig(), getParentForChildren(), isClean()); + shieldedInstanceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder>( + getShieldedInstanceConfig(), + getParentForChildren(), + isClean()); shieldedInstanceConfig_ = null; } return shieldedInstanceConfigBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -6794,12 +6130,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.Node) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.Node) private static final com.google.cloud.tpu.v2alpha1.Node DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.Node(); } @@ -6808,27 +6144,27 @@ public static com.google.cloud.tpu.v2alpha1.Node getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Node parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Node parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -6843,4 +6179,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.Node getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeName.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeName.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeName.java diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeOrBuilder.java similarity index 72% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeOrBuilder.java index 9bce8749021f..fb8cd9b33042 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/NodeOrBuilder.java @@ -1,215 +1,152 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface NodeOrBuilder - extends +public interface NodeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.Node) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Output only. Immutable. The name of the TPU.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return The name. */ java.lang.String getName(); /** - * - * *
    * Output only. Immutable. The name of the TPU.
    * 
* - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return The bytes for name. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString + getNameBytes(); /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The description. */ java.lang.String getDescription(); /** - * - * *
    * The user-supplied description of the TPU. Maximum of 512 characters.
    * 
* * string description = 3; - * * @return The bytes for description. */ - com.google.protobuf.ByteString getDescriptionBytes(); + com.google.protobuf.ByteString + getDescriptionBytes(); /** - * - * *
-   * Required. The type of hardware accelerators associated with this node.
+   * The type of hardware accelerators associated with this node.
    * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @return The acceleratorType. */ java.lang.String getAcceleratorType(); /** - * - * *
-   * Required. The type of hardware accelerators associated with this node.
+   * The type of hardware accelerators associated with this node.
    * 
* - * string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * + * string accelerator_type = 5; * @return The bytes for acceleratorType. */ - com.google.protobuf.ByteString getAcceleratorTypeBytes(); + com.google.protobuf.ByteString + getAcceleratorTypeBytes(); /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for state. */ int getStateValue(); /** - * - * *
    * Output only. The current state for the TPU Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The state. */ com.google.cloud.tpu.v2alpha1.Node.State getState(); /** - * - * *
-   * Output only. If this field is populated, it contains a description of why
-   * the TPU Node is unhealthy.
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The healthDescription. */ java.lang.String getHealthDescription(); /** - * - * *
-   * Output only. If this field is populated, it contains a description of why
-   * the TPU Node is unhealthy.
+   * Output only. If this field is populated, it contains a description of why the TPU Node
+   * is unhealthy.
    * 
* * string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The bytes for healthDescription. */ - com.google.protobuf.ByteString getHealthDescriptionBytes(); + com.google.protobuf.ByteString + getHealthDescriptionBytes(); /** - * - * *
    * Required. The runtime version running in the Node.
    * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The runtimeVersion. */ java.lang.String getRuntimeVersion(); /** - * - * *
    * Required. The runtime version running in the Node.
    * 
* * string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for runtimeVersion. */ - com.google.protobuf.ByteString getRuntimeVersionBytes(); + com.google.protobuf.ByteString + getRuntimeVersionBytes(); /** - * - * *
    * Network configurations for the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; - * * @return Whether the networkConfig field is set. */ boolean hasNetworkConfig(); /** - * - * *
    * Network configurations for the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.NetworkConfig network_config = 36; - * * @return The networkConfig. */ com.google.cloud.tpu.v2alpha1.NetworkConfig getNetworkConfig(); /** - * - * *
    * Network configurations for the TPU node.
    * 
@@ -219,8 +156,6 @@ public interface NodeOrBuilder com.google.cloud.tpu.v2alpha1.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -233,13 +168,10 @@ public interface NodeOrBuilder
    * 
* * string cidr_block = 13; - * * @return The cidrBlock. */ java.lang.String getCidrBlock(); /** - * - * *
    * The CIDR block that the TPU node will use when selecting an IP address.
    * This CIDR block must be a /29 block; the Compute Engine networks API
@@ -252,40 +184,32 @@ public interface NodeOrBuilder
    * 
* * string cidr_block = 13; - * * @return The bytes for cidrBlock. */ - com.google.protobuf.ByteString getCidrBlockBytes(); + com.google.protobuf.ByteString + getCidrBlockBytes(); /** - * - * *
    * The Google Cloud Platform Service Account to be used by the TPU node VMs.
    * If None is specified, the default compute service account will be used.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37; - * * @return Whether the serviceAccount field is set. */ boolean hasServiceAccount(); /** - * - * *
    * The Google Cloud Platform Service Account to be used by the TPU node VMs.
    * If None is specified, the default compute service account will be used.
    * 
* * .google.cloud.tpu.v2alpha1.ServiceAccount service_account = 37; - * * @return The serviceAccount. */ com.google.cloud.tpu.v2alpha1.ServiceAccount getServiceAccount(); /** - * - * *
    * The Google Cloud Platform Service Account to be used by the TPU node VMs.
    * If None is specified, the default compute service account will be used.
@@ -296,70 +220,51 @@ public interface NodeOrBuilder
   com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder getServiceAccountOrBuilder();
 
   /**
-   *
-   *
    * 
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return Whether the createTime field is set. */ boolean hasCreateTime(); /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); /** - * - * *
    * Output only. The time when the node was created.
    * 
* - * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; - * * @return Whether the schedulingConfig field is set. */ boolean hasSchedulingConfig(); /** - * - * *
    * The scheduling options for this node.
    * 
* * .google.cloud.tpu.v2alpha1.SchedulingConfig scheduling_config = 17; - * * @return The schedulingConfig. */ com.google.cloud.tpu.v2alpha1.SchedulingConfig getSchedulingConfig(); /** - * - * *
    * The scheduling options for this node.
    * 
@@ -369,105 +274,79 @@ public interface NodeOrBuilder com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder getSchedulingConfigOrBuilder(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List getNetworkEndpointsList(); + java.util.List + getNetworkEndpointsList(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ com.google.cloud.tpu.v2alpha1.NetworkEndpoint getNetworkEndpoints(int index); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ int getNetworkEndpointsCount(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List + java.util.List getNetworkEndpointsOrBuilderList(); /** - * - * *
    * Output only. The network endpoints where TPU workers can be accessed and
    * sent work. It is recommended that runtime clients of the node reach out
    * to the 0th entry in this map first.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.NetworkEndpointOrBuilder getNetworkEndpointsOrBuilder( + int index); /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @return The enum numeric value on the wire for health. */ int getHealthValue(); /** - * - * *
    * The health status of the TPU node.
    * 
* * .google.cloud.tpu.v2alpha1.Node.Health health = 22; - * * @return The health. */ com.google.cloud.tpu.v2alpha1.Node.Health getHealth(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -476,31 +355,30 @@ public interface NodeOrBuilder */ int getLabelsCount(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ @java.lang.Deprecated - java.util.Map getLabels(); + java.util.Map + getLabels(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ - java.util.Map getLabelsMap(); + java.util.Map + getLabelsMap(); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
@@ -509,24 +387,22 @@ public interface NodeOrBuilder */ /* nullable */ - java.lang.String getLabelsOrDefault( +java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ - java.lang.String defaultValue); +java.lang.String defaultValue); /** - * - * *
    * Resource labels to represent user-provided metadata.
    * 
* * map<string, string> labels = 24; */ - java.lang.String getLabelsOrThrow(java.lang.String key); + + java.lang.String getLabelsOrThrow( + java.lang.String key); /** - * - * *
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -536,8 +412,6 @@ java.lang.String getLabelsOrDefault(
    */
   int getMetadataCount();
   /**
-   *
-   *
    * 
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -545,13 +419,15 @@ java.lang.String getLabelsOrDefault(
    *
    * map<string, string> metadata = 34;
    */
-  boolean containsMetadata(java.lang.String key);
-  /** Use {@link #getMetadataMap()} instead. */
+  boolean containsMetadata(
+      java.lang.String key);
+  /**
+   * Use {@link #getMetadataMap()} instead.
+   */
   @java.lang.Deprecated
-  java.util.Map getMetadata();
+  java.util.Map
+  getMetadata();
   /**
-   *
-   *
    * 
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -559,10 +435,9 @@ java.lang.String getLabelsOrDefault(
    *
    * map<string, string> metadata = 34;
    */
-  java.util.Map getMetadataMap();
+  java.util.Map
+  getMetadataMap();
   /**
-   *
-   *
    * 
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -572,13 +447,11 @@ java.lang.String getLabelsOrDefault(
    */
 
   /* nullable */
-  java.lang.String getMetadataOrDefault(
+java.lang.String getMetadataOrDefault(
       java.lang.String key,
       /* nullable */
-      java.lang.String defaultValue);
+java.lang.String defaultValue);
   /**
-   *
-   *
    * 
    * Custom metadata to apply to the TPU Node.
    * Can set startup-script and shutdown-script
@@ -586,89 +459,75 @@ java.lang.String getMetadataOrDefault(
    *
    * map<string, string> metadata = 34;
    */
-  java.lang.String getMetadataOrThrow(java.lang.String key);
+
+  java.lang.String getMetadataOrThrow(
+      java.lang.String key);
 
   /**
-   *
-   *
    * 
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @return A list containing the tags. */ - java.util.List getTagsList(); + java.util.List + getTagsList(); /** - * - * *
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @return The count of tags. */ int getTagsCount(); /** - * - * *
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @param index The index of the element to return. * @return The tags at the given index. */ java.lang.String getTags(int index); /** - * - * *
    * Tags to apply to the TPU Node. Tags are used to identify valid sources or
    * targets for network firewalls.
    * 
* * repeated string tags = 40; - * * @param index The index of the value to return. * @return The bytes of the tags at the given index. */ - com.google.protobuf.ByteString getTagsBytes(int index); + com.google.protobuf.ByteString + getTagsBytes(int index); /** - * - * *
    * Output only. The unique identifier for the TPU Node.
    * 
* * int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * @return The id. */ long getId(); /** - * - * *
    * The additional data disks for the Node.
    * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - java.util.List getDataDisksList(); + java.util.List + getDataDisksList(); /** - * - * *
    * The additional data disks for the Node.
    * 
@@ -677,8 +536,6 @@ java.lang.String getMetadataOrDefault( */ com.google.cloud.tpu.v2alpha1.AttachedDisk getDataDisks(int index); /** - * - * *
    * The additional data disks for the Node.
    * 
@@ -687,151 +544,131 @@ java.lang.String getMetadataOrDefault( */ int getDataDisksCount(); /** - * - * *
    * The additional data disks for the Node.
    * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - java.util.List + java.util.List getDataDisksOrBuilderList(); /** - * - * *
    * The additional data disks for the Node.
    * 
* * repeated .google.cloud.tpu.v2alpha1.AttachedDisk data_disks = 41; */ - com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.AttachedDiskOrBuilder getDataDisksOrBuilder( + int index); /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The enum numeric value on the wire for apiVersion. */ int getApiVersionValue(); /** - * - * *
    * Output only. The API version that created this Node.
    * 
* - * - * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * + * .google.cloud.tpu.v2alpha1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return The apiVersion. */ com.google.cloud.tpu.v2alpha1.Node.ApiVersion getApiVersion(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List getSymptomsList(); + java.util.List + getSymptomsList(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ com.google.cloud.tpu.v2alpha1.Symptom getSymptoms(int index); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ int getSymptomsCount(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - java.util.List + java.util.List getSymptomsOrBuilderList(); /** - * - * *
    * Output only. The Symptoms that have occurred to the TPU Node.
    * 
* - * - * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated .google.cloud.tpu.v2alpha1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - com.google.cloud.tpu.v2alpha1.SymptomOrBuilder getSymptomsOrBuilder(int index); + com.google.cloud.tpu.v2alpha1.SymptomOrBuilder getSymptomsOrBuilder( + int index); /** + *
+   * Output only. The qualified name of the QueuedResource that requested this Node.
+   * 
* + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The queuedResource. + */ + java.lang.String getQueuedResource(); + /** + *
+   * Output only. The qualified name of the QueuedResource that requested this Node.
+   * 
* + * string queued_resource = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for queuedResource. + */ + com.google.protobuf.ByteString + getQueuedResourceBytes(); + + /** *
    * Shielded Instance options.
    * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; - * * @return Whether the shieldedInstanceConfig field is set. */ boolean hasShieldedInstanceConfig(); /** - * - * *
    * Shielded Instance options.
    * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; - * * @return The shieldedInstanceConfig. */ com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig getShieldedInstanceConfig(); /** - * - * *
    * Shielded Instance options.
    * 
* * .google.cloud.tpu.v2alpha1.ShieldedInstanceConfig shielded_instance_config = 45; */ - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder - getShieldedInstanceConfigOrBuilder(); + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadata.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadata.java similarity index 72% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadata.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadata.java index 181ad4e4f5ef..58820db1f261 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadata.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadata.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Metadata describing an [Operation][google.longrunning.Operation]
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.OperationMetadata} */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.OperationMetadata) OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use OperationMetadata.newBuilder() to construct. private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OperationMetadata() { target_ = ""; verb_ = ""; @@ -46,41 +28,37 @@ private OperationMetadata() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new OperationMetadata(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.OperationMetadata.class, - com.google.cloud.tpu.v2alpha1.OperationMetadata.Builder.class); + com.google.cloud.tpu.v2alpha1.OperationMetadata.class, com.google.cloud.tpu.v2alpha1.OperationMetadata.Builder.class); } public static final int CREATE_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp createTime_; /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ @java.lang.Override @@ -88,14 +66,11 @@ public boolean hasCreateTime() { return createTime_ != null; } /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ @java.lang.Override @@ -103,8 +78,6 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** - * - * *
    * The time the operation was created.
    * 
@@ -119,14 +92,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp endTime_; /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return Whether the endTime field is set. */ @java.lang.Override @@ -134,14 +104,11 @@ public boolean hasEndTime() { return endTime_ != null; } /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return The endTime. */ @java.lang.Override @@ -149,8 +116,6 @@ public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } /** - * - * *
    * The time the operation finished running.
    * 
@@ -165,15 +130,12 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int TARGET_FIELD_NUMBER = 3; private volatile java.lang.Object target_; /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The target. */ @java.lang.Override @@ -182,30 +144,30 @@ public java.lang.String getTarget() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); target_ = s; return s; } } /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The bytes for target. */ @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { + public com.google.protobuf.ByteString + getTargetBytes() { java.lang.Object ref = target_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); target_ = b; return b; } else { @@ -216,14 +178,11 @@ public com.google.protobuf.ByteString getTargetBytes() { public static final int VERB_FIELD_NUMBER = 4; private volatile java.lang.Object verb_; /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The verb. */ @java.lang.Override @@ -232,29 +191,29 @@ public java.lang.String getVerb() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); verb_ = s; return s; } } /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The bytes for verb. */ @java.lang.Override - public com.google.protobuf.ByteString getVerbBytes() { + public com.google.protobuf.ByteString + getVerbBytes() { java.lang.Object ref = verb_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); verb_ = b; return b; } else { @@ -265,14 +224,11 @@ public com.google.protobuf.ByteString getVerbBytes() { public static final int STATUS_DETAIL_FIELD_NUMBER = 5; private volatile java.lang.Object statusDetail_; /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The statusDetail. */ @java.lang.Override @@ -281,29 +237,29 @@ public java.lang.String getStatusDetail() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); statusDetail_ = s; return s; } } /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The bytes for statusDetail. */ @java.lang.Override - public com.google.protobuf.ByteString getStatusDetailBytes() { + public com.google.protobuf.ByteString + getStatusDetailBytes() { java.lang.Object ref = statusDetail_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); statusDetail_ = b; return b; } else { @@ -314,14 +270,11 @@ public com.google.protobuf.ByteString getStatusDetailBytes() { public static final int CANCEL_REQUESTED_FIELD_NUMBER = 6; private boolean cancelRequested_; /** - * - * *
    * Specifies if cancellation was requested for the operation.
    * 
* * bool cancel_requested = 6; - * * @return The cancelRequested. */ @java.lang.Override @@ -332,14 +285,11 @@ public boolean getCancelRequested() { public static final int API_VERSION_FIELD_NUMBER = 7; private volatile java.lang.Object apiVersion_; /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The apiVersion. */ @java.lang.Override @@ -348,29 +298,29 @@ public java.lang.String getApiVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); apiVersion_ = s; return s; } } /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The bytes for apiVersion. */ @java.lang.Override - public com.google.protobuf.ByteString getApiVersionBytes() { + public com.google.protobuf.ByteString + getApiVersionBytes() { java.lang.Object ref = apiVersion_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); apiVersion_ = b; return b; } else { @@ -379,7 +329,6 @@ public com.google.protobuf.ByteString getApiVersionBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -391,7 +340,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } @@ -423,10 +373,12 @@ public int getSerializedSize() { size = 0; if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); } if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); @@ -438,7 +390,8 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); } if (cancelRequested_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, cancelRequested_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, cancelRequested_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); @@ -451,27 +404,33 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.OperationMetadata)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.OperationMetadata other = - (com.google.cloud.tpu.v2alpha1.OperationMetadata) obj; + com.google.cloud.tpu.v2alpha1.OperationMetadata other = (com.google.cloud.tpu.v2alpha1.OperationMetadata) obj; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; + if (!getCreateTime() + .equals(other.getCreateTime())) return false; } if (hasEndTime() != other.hasEndTime()) return false; if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getTarget().equals(other.getTarget())) return false; - if (!getVerb().equals(other.getVerb())) return false; - if (!getStatusDetail().equals(other.getStatusDetail())) return false; - if (getCancelRequested() != other.getCancelRequested()) return false; - if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getVerb() + .equals(other.getVerb())) return false; + if (!getStatusDetail() + .equals(other.getStatusDetail())) return false; + if (getCancelRequested() + != other.getCancelRequested()) return false; + if (!getApiVersion() + .equals(other.getApiVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -498,7 +457,8 @@ public int hashCode() { hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; hash = (53 * hash) + getStatusDetail().hashCode(); hash = (37 * hash) + CANCEL_REQUESTED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCancelRequested()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCancelRequested()); hash = (37 * hash) + API_VERSION_FIELD_NUMBER; hash = (53 * hash) + getApiVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -506,136 +466,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.OperationMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.OperationMetadata prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Metadata describing an [Operation][google.longrunning.Operation]
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.OperationMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.OperationMetadata) com.google.cloud.tpu.v2alpha1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.OperationMetadata.class, - com.google.cloud.tpu.v2alpha1.OperationMetadata.Builder.class); + com.google.cloud.tpu.v2alpha1.OperationMetadata.class, com.google.cloud.tpu.v2alpha1.OperationMetadata.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.OperationMetadata.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -665,9 +619,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_OperationMetadata_descriptor; } @java.lang.Override @@ -686,8 +640,7 @@ public com.google.cloud.tpu.v2alpha1.OperationMetadata build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.OperationMetadata buildPartial() { - com.google.cloud.tpu.v2alpha1.OperationMetadata result = - new com.google.cloud.tpu.v2alpha1.OperationMetadata(this); + com.google.cloud.tpu.v2alpha1.OperationMetadata result = new com.google.cloud.tpu.v2alpha1.OperationMetadata(this); if (createTimeBuilder_ == null) { result.createTime_ = createTime_; } else { @@ -711,39 +664,38 @@ public com.google.cloud.tpu.v2alpha1.OperationMetadata buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.OperationMetadata) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.OperationMetadata) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.OperationMetadata)other); } else { super.mergeFrom(other); return this; @@ -751,8 +703,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.OperationMetadata other) { - if (other == com.google.cloud.tpu.v2alpha1.OperationMetadata.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.OperationMetadata.getDefaultInstance()) return this; if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } @@ -804,55 +755,51 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - target_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - verb_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - statusDetail_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 48: - { - cancelRequested_ = input.readBool(); - - break; - } // case 48 - case 58: - { - apiVersion_ = input.readStringRequireUtf8(); - - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + statusDetail_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: { + cancelRequested_ = input.readBool(); + + break; + } // case 48 + case 58: { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -865,47 +812,34 @@ public Builder mergeFrom( private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** - * - * *
      * The time the operation was created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return createTimeBuilder_ != null || createTime_ != null; } /** - * - * *
      * The time the operation was created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** - * - * *
      * The time the operation was created.
      * 
@@ -926,15 +860,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation was created.
      * 
* * .google.protobuf.Timestamp create_time = 1; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); onChanged(); @@ -945,8 +878,6 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal return this; } /** - * - * *
      * The time the operation was created.
      * 
@@ -957,7 +888,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (createTime_ != null) { createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); } else { createTime_ = value; } @@ -969,8 +900,6 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation was created.
      * 
@@ -989,8 +918,6 @@ public Builder clearCreateTime() { return this; } /** - * - * *
      * The time the operation was created.
      * 
@@ -998,13 +925,11 @@ public Builder clearCreateTime() { * .google.protobuf.Timestamp create_time = 1; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - + onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** - * - * *
      * The time the operation was created.
      * 
@@ -1015,14 +940,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** - * - * *
      * The time the operation was created.
      * 
@@ -1030,17 +952,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); createTime_ = null; } return createTimeBuilder_; @@ -1048,33 +967,24 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { private com.google.protobuf.Timestamp endTime_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; /** - * - * *
      * The time the operation finished running.
      * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return Whether the endTime field is set. */ public boolean hasEndTime() { return endTimeBuilder_ != null || endTime_ != null; } /** - * - * *
      * The time the operation finished running.
      * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return The endTime. */ public com.google.protobuf.Timestamp getEndTime() { @@ -1085,8 +995,6 @@ public com.google.protobuf.Timestamp getEndTime() { } } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1107,15 +1015,14 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation finished running.
      * 
* * .google.protobuf.Timestamp end_time = 2; */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (endTimeBuilder_ == null) { endTime_ = builderForValue.build(); onChanged(); @@ -1126,8 +1033,6 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) return this; } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1138,7 +1043,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { if (endTimeBuilder_ == null) { if (endTime_ != null) { endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); } else { endTime_ = value; } @@ -1150,8 +1055,6 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1170,8 +1073,6 @@ public Builder clearEndTime() { return this; } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1179,13 +1080,11 @@ public Builder clearEndTime() { * .google.protobuf.Timestamp end_time = 2; */ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - + onChanged(); return getEndTimeFieldBuilder().getBuilder(); } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1196,12 +1095,11 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { if (endTimeBuilder_ != null) { return endTimeBuilder_.getMessageOrBuilder(); } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } /** - * - * *
      * The time the operation finished running.
      * 
@@ -1209,17 +1107,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * .google.protobuf.Timestamp end_time = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); endTime_ = null; } return endTimeBuilder_; @@ -1227,21 +1122,19 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { private java.lang.Object target_ = ""; /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @return The target. */ public java.lang.String getTarget() { java.lang.Object ref = target_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); target_ = s; return s; @@ -1250,22 +1143,21 @@ public java.lang.String getTarget() { } } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @return The bytes for target. */ - public com.google.protobuf.ByteString getTargetBytes() { + public com.google.protobuf.ByteString + getTargetBytes() { java.lang.Object ref = target_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); target_ = b; return b; } else { @@ -1273,64 +1165,57 @@ public com.google.protobuf.ByteString getTargetBytes() { } } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @param value The target to set. * @return This builder for chaining. */ - public Builder setTarget(java.lang.String value) { + public Builder setTarget( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + target_ = value; onChanged(); return this; } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @return This builder for chaining. */ public Builder clearTarget() { - + target_ = getDefaultInstance().getTarget(); onChanged(); return this; } /** - * - * *
      * Target of the operation - for example
      * projects/project-1/connectivityTests/test-1
      * 
* * string target = 3; - * * @param value The bytes for target to set. * @return This builder for chaining. */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; onChanged(); return this; @@ -1338,20 +1223,18 @@ public Builder setTargetBytes(com.google.protobuf.ByteString value) { private java.lang.Object verb_ = ""; /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @return The verb. */ public java.lang.String getVerb() { java.lang.Object ref = verb_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); verb_ = s; return s; @@ -1360,21 +1243,20 @@ public java.lang.String getVerb() { } } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @return The bytes for verb. */ - public com.google.protobuf.ByteString getVerbBytes() { + public com.google.protobuf.ByteString + getVerbBytes() { java.lang.Object ref = verb_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); verb_ = b; return b; } else { @@ -1382,61 +1264,54 @@ public com.google.protobuf.ByteString getVerbBytes() { } } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @param value The verb to set. * @return This builder for chaining. */ - public Builder setVerb(java.lang.String value) { + public Builder setVerb( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + verb_ = value; onChanged(); return this; } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @return This builder for chaining. */ public Builder clearVerb() { - + verb_ = getDefaultInstance().getVerb(); onChanged(); return this; } /** - * - * *
      * Name of the verb executed by the operation.
      * 
* * string verb = 4; - * * @param value The bytes for verb to set. * @return This builder for chaining. */ - public Builder setVerbBytes(com.google.protobuf.ByteString value) { + public Builder setVerbBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; onChanged(); return this; @@ -1444,20 +1319,18 @@ public Builder setVerbBytes(com.google.protobuf.ByteString value) { private java.lang.Object statusDetail_ = ""; /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @return The statusDetail. */ public java.lang.String getStatusDetail() { java.lang.Object ref = statusDetail_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); statusDetail_ = s; return s; @@ -1466,21 +1339,20 @@ public java.lang.String getStatusDetail() { } } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @return The bytes for statusDetail. */ - public com.google.protobuf.ByteString getStatusDetailBytes() { + public com.google.protobuf.ByteString + getStatusDetailBytes() { java.lang.Object ref = statusDetail_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); statusDetail_ = b; return b; } else { @@ -1488,76 +1360,66 @@ public com.google.protobuf.ByteString getStatusDetailBytes() { } } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @param value The statusDetail to set. * @return This builder for chaining. */ - public Builder setStatusDetail(java.lang.String value) { + public Builder setStatusDetail( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + statusDetail_ = value; onChanged(); return this; } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @return This builder for chaining. */ public Builder clearStatusDetail() { - + statusDetail_ = getDefaultInstance().getStatusDetail(); onChanged(); return this; } /** - * - * *
      * Human-readable status of the operation, if any.
      * 
* * string status_detail = 5; - * * @param value The bytes for statusDetail to set. * @return This builder for chaining. */ - public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { + public Builder setStatusDetailBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusDetail_ = value; onChanged(); return this; } - private boolean cancelRequested_; + private boolean cancelRequested_ ; /** - * - * *
      * Specifies if cancellation was requested for the operation.
      * 
* * bool cancel_requested = 6; - * * @return The cancelRequested. */ @java.lang.Override @@ -1565,36 +1427,30 @@ public boolean getCancelRequested() { return cancelRequested_; } /** - * - * *
      * Specifies if cancellation was requested for the operation.
      * 
* * bool cancel_requested = 6; - * * @param value The cancelRequested to set. * @return This builder for chaining. */ public Builder setCancelRequested(boolean value) { - + cancelRequested_ = value; onChanged(); return this; } /** - * - * *
      * Specifies if cancellation was requested for the operation.
      * 
* * bool cancel_requested = 6; - * * @return This builder for chaining. */ public Builder clearCancelRequested() { - + cancelRequested_ = false; onChanged(); return this; @@ -1602,20 +1458,18 @@ public Builder clearCancelRequested() { private java.lang.Object apiVersion_ = ""; /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @return The apiVersion. */ public java.lang.String getApiVersion() { java.lang.Object ref = apiVersion_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); apiVersion_ = s; return s; @@ -1624,21 +1478,20 @@ public java.lang.String getApiVersion() { } } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @return The bytes for apiVersion. */ - public com.google.protobuf.ByteString getApiVersionBytes() { + public com.google.protobuf.ByteString + getApiVersionBytes() { java.lang.Object ref = apiVersion_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); apiVersion_ = b; return b; } else { @@ -1646,68 +1499,61 @@ public com.google.protobuf.ByteString getApiVersionBytes() { } } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @param value The apiVersion to set. * @return This builder for chaining. */ - public Builder setApiVersion(java.lang.String value) { + public Builder setApiVersion( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + apiVersion_ = value; onChanged(); return this; } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @return This builder for chaining. */ public Builder clearApiVersion() { - + apiVersion_ = getDefaultInstance().getApiVersion(); onChanged(); return this; } /** - * - * *
      * API version.
      * 
* * string api_version = 7; - * * @param value The bytes for apiVersion to set. * @return This builder for chaining. */ - public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + public Builder setApiVersionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1717,12 +1563,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.OperationMetadata) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.OperationMetadata) private static final com.google.cloud.tpu.v2alpha1.OperationMetadata DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.OperationMetadata(); } @@ -1731,27 +1577,27 @@ public static com.google.cloud.tpu.v2alpha1.OperationMetadata getDefaultInstance return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1766,4 +1612,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.OperationMetadata getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadataOrBuilder.java similarity index 75% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadataOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadataOrBuilder.java index 57e0d5d40321..c6e532d4d93b 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadataOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/OperationMetadataOrBuilder.java @@ -1,55 +1,31 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface OperationMetadataOrBuilder - extends +public interface OperationMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.OperationMetadata) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ boolean hasCreateTime(); /** - * - * *
    * The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); /** - * - * *
    * The time the operation was created.
    * 
@@ -59,32 +35,24 @@ public interface OperationMetadataOrBuilder com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return Whether the endTime field is set. */ boolean hasEndTime(); /** - * - * *
    * The time the operation finished running.
    * 
* * .google.protobuf.Timestamp end_time = 2; - * * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); /** - * - * *
    * The time the operation finished running.
    * 
@@ -94,117 +62,94 @@ public interface OperationMetadataOrBuilder com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The target. */ java.lang.String getTarget(); /** - * - * *
    * Target of the operation - for example
    * projects/project-1/connectivityTests/test-1
    * 
* * string target = 3; - * * @return The bytes for target. */ - com.google.protobuf.ByteString getTargetBytes(); + com.google.protobuf.ByteString + getTargetBytes(); /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The verb. */ java.lang.String getVerb(); /** - * - * *
    * Name of the verb executed by the operation.
    * 
* * string verb = 4; - * * @return The bytes for verb. */ - com.google.protobuf.ByteString getVerbBytes(); + com.google.protobuf.ByteString + getVerbBytes(); /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The statusDetail. */ java.lang.String getStatusDetail(); /** - * - * *
    * Human-readable status of the operation, if any.
    * 
* * string status_detail = 5; - * * @return The bytes for statusDetail. */ - com.google.protobuf.ByteString getStatusDetailBytes(); + com.google.protobuf.ByteString + getStatusDetailBytes(); /** - * - * *
    * Specifies if cancellation was requested for the operation.
    * 
* * bool cancel_requested = 6; - * * @return The cancelRequested. */ boolean getCancelRequested(); /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The apiVersion. */ java.lang.String getApiVersion(); /** - * - * *
    * API version.
    * 
* * string api_version = 7; - * * @return The bytes for apiVersion. */ - com.google.protobuf.ByteString getApiVersionBytes(); + com.google.protobuf.ByteString + getApiVersionBytes(); } diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResource.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResource.java new file mode 100644 index 000000000000..565b9af0210b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResource.java @@ -0,0 +1,7075 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * A QueuedResource represents a request for resources that will be placed
+ * in a queue and fulfilled when the necessary resources are available.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource} + */ +public final class QueuedResource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResource) + QueuedResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueuedResource.newBuilder() to construct. + private QueuedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueuedResource() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueuedResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder.class); + } + + public interface TpuOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResource.Tpu) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + java.util.List + getNodeSpecList(); + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec getNodeSpec(int index); + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + int getNodeSpecCount(); + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + java.util.List + getNodeSpecOrBuilderList(); + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpecOrBuilder getNodeSpecOrBuilder( + int index); + } + /** + *
+   * Details of the TPU resource(s) being requested.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.Tpu} + */ + public static final class Tpu extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResource.Tpu) + TpuOrBuilder { + private static final long serialVersionUID = 0L; + // Use Tpu.newBuilder() to construct. + private Tpu(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Tpu() { + nodeSpec_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Tpu(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.Builder.class); + } + + public interface NodeSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Required. The parent resource name.
+       * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+       * Required. The parent resource name.
+       * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+       * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+       * regex format. This is only specified when requesting a single node.
+       * In case of multi-node requests, multi_node_params must be populated
+       * instead. It's an error to specify both node_id and multi_node_params.
+       * 
+ * + * string node_id = 2; + * @return The nodeId. + */ + java.lang.String getNodeId(); + /** + *
+       * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+       * regex format. This is only specified when requesting a single node.
+       * In case of multi-node requests, multi_node_params must be populated
+       * instead. It's an error to specify both node_id and multi_node_params.
+       * 
+ * + * string node_id = 2; + * @return The bytes for nodeId. + */ + com.google.protobuf.ByteString + getNodeIdBytes(); + + /** + *
+       * Required. The node.
+       * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + boolean hasNode(); + /** + *
+       * Required. The node.
+       * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + com.google.cloud.tpu.v2alpha1.Node getNode(); + /** + *
+       * Required. The node.
+       * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder(); + } + /** + *
+     * Details of the TPU node(s) being requested. Users can request either a
+     * single node or multiple nodes.
+     * NodeSpec provides the specification for node(s) to be created.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec} + */ + public static final class NodeSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec) + NodeSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeSpec.newBuilder() to construct. + private NodeSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NodeSpec() { + parent_ = ""; + nodeId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NodeSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_NodeSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_NodeSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+       * Required. The parent resource name.
+       * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+       * Required. The parent resource name.
+       * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object nodeId_; + /** + *
+       * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+       * regex format. This is only specified when requesting a single node.
+       * In case of multi-node requests, multi_node_params must be populated
+       * instead. It's an error to specify both node_id and multi_node_params.
+       * 
+ * + * string node_id = 2; + * @return The nodeId. + */ + @java.lang.Override + public java.lang.String getNodeId() { + java.lang.Object ref = nodeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeId_ = s; + return s; + } + } + /** + *
+       * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+       * regex format. This is only specified when requesting a single node.
+       * In case of multi-node requests, multi_node_params must be populated
+       * instead. It's an error to specify both node_id and multi_node_params.
+       * 
+ * + * string node_id = 2; + * @return The bytes for nodeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNodeIdBytes() { + java.lang.Object ref = nodeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_FIELD_NUMBER = 3; + private com.google.cloud.tpu.v2alpha1.Node node_; + /** + *
+       * Required. The node.
+       * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + @java.lang.Override + public boolean hasNode() { + return node_ != null; + } + /** + *
+       * Required. The node.
+       * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.Node getNode() { + return node_ == null ? com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; + } + /** + *
+       * Required. The node.
+       * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder() { + return getNode(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nodeId_); + } + if (node_ != null) { + output.writeMessage(3, getNode()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nodeId_); + } + if (node_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNode()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec other = (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getNodeId() + .equals(other.getNodeId())) return false; + if (hasNode() != other.hasNode()) return false; + if (hasNode()) { + if (!getNode() + .equals(other.getNode())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + NODE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeId().hashCode(); + if (hasNode()) { + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNode().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Details of the TPU node(s) being requested. Users can request either a
+       * single node or multiple nodes.
+       * NodeSpec provides the specification for node(s) to be created.
+       * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec) + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_NodeSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_NodeSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + nodeId_ = ""; + + if (nodeBuilder_ == null) { + node_ = null; + } else { + node_ = null; + nodeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_NodeSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec build() { + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec result = new com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec(this); + result.parent_ = parent_; + result.nodeId_ = nodeId_; + if (nodeBuilder_ == null) { + result.node_ = node_; + } else { + result.node_ = nodeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getNodeId().isEmpty()) { + nodeId_ = other.nodeId_; + onChanged(); + } + if (other.hasNode()) { + mergeNode(other.getNode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + nodeId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + input.readMessage( + getNodeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+         * Required. The parent resource name.
+         * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * Required. The parent resource name.
+         * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * Required. The parent resource name.
+         * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+         * Required. The parent resource name.
+         * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+         * Required. The parent resource name.
+         * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object nodeId_ = ""; + /** + *
+         * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+         * regex format. This is only specified when requesting a single node.
+         * In case of multi-node requests, multi_node_params must be populated
+         * instead. It's an error to specify both node_id and multi_node_params.
+         * 
+ * + * string node_id = 2; + * @return The nodeId. + */ + public java.lang.String getNodeId() { + java.lang.Object ref = nodeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+         * regex format. This is only specified when requesting a single node.
+         * In case of multi-node requests, multi_node_params must be populated
+         * instead. It's an error to specify both node_id and multi_node_params.
+         * 
+ * + * string node_id = 2; + * @return The bytes for nodeId. + */ + public com.google.protobuf.ByteString + getNodeIdBytes() { + java.lang.Object ref = nodeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+         * regex format. This is only specified when requesting a single node.
+         * In case of multi-node requests, multi_node_params must be populated
+         * instead. It's an error to specify both node_id and multi_node_params.
+         * 
+ * + * string node_id = 2; + * @param value The nodeId to set. + * @return This builder for chaining. + */ + public Builder setNodeId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeId_ = value; + onChanged(); + return this; + } + /** + *
+         * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+         * regex format. This is only specified when requesting a single node.
+         * In case of multi-node requests, multi_node_params must be populated
+         * instead. It's an error to specify both node_id and multi_node_params.
+         * 
+ * + * string node_id = 2; + * @return This builder for chaining. + */ + public Builder clearNodeId() { + + nodeId_ = getDefaultInstance().getNodeId(); + onChanged(); + return this; + } + /** + *
+         * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
+         * regex format. This is only specified when requesting a single node.
+         * In case of multi-node requests, multi_node_params must be populated
+         * instead. It's an error to specify both node_id and multi_node_params.
+         * 
+ * + * string node_id = 2; + * @param value The bytes for nodeId to set. + * @return This builder for chaining. + */ + public Builder setNodeIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tpu.v2alpha1.Node node_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> nodeBuilder_; + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the node field is set. + */ + public boolean hasNode() { + return nodeBuilder_ != null || node_ != null; + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The node. + */ + public com.google.cloud.tpu.v2alpha1.Node getNode() { + if (nodeBuilder_ == null) { + return node_ == null ? com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; + } else { + return nodeBuilder_.getMessage(); + } + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNode(com.google.cloud.tpu.v2alpha1.Node value) { + if (nodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + node_ = value; + onChanged(); + } else { + nodeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNode( + com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { + if (nodeBuilder_ == null) { + node_ = builderForValue.build(); + onChanged(); + } else { + nodeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNode(com.google.cloud.tpu.v2alpha1.Node value) { + if (nodeBuilder_ == null) { + if (node_ != null) { + node_ = + com.google.cloud.tpu.v2alpha1.Node.newBuilder(node_).mergeFrom(value).buildPartial(); + } else { + node_ = value; + } + onChanged(); + } else { + nodeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNode() { + if (nodeBuilder_ == null) { + node_ = null; + onChanged(); + } else { + node_ = null; + nodeBuilder_ = null; + } + + return this; + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2alpha1.Node.Builder getNodeBuilder() { + + onChanged(); + return getNodeFieldBuilder().getBuilder(); + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder() { + if (nodeBuilder_ != null) { + return nodeBuilder_.getMessageOrBuilder(); + } else { + return node_ == null ? + com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; + } + } + /** + *
+         * Required. The node.
+         * 
+ * + * .google.cloud.tpu.v2alpha1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> + getNodeFieldBuilder() { + if (nodeBuilder_ == null) { + nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder>( + getNode(), + getParentForChildren(), + isClean()); + node_ = null; + } + return nodeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec) + private static final com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NODE_SPEC_FIELD_NUMBER = 1; + private java.util.List nodeSpec_; + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + @java.lang.Override + public java.util.List getNodeSpecList() { + return nodeSpec_; + } + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + @java.lang.Override + public java.util.List + getNodeSpecOrBuilderList() { + return nodeSpec_; + } + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + @java.lang.Override + public int getNodeSpecCount() { + return nodeSpec_.size(); + } + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec getNodeSpec(int index) { + return nodeSpec_.get(index); + } + /** + *
+     * The TPU node(s) being requested.
+     * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpecOrBuilder getNodeSpecOrBuilder( + int index) { + return nodeSpec_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < nodeSpec_.size(); i++) { + output.writeMessage(1, nodeSpec_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nodeSpec_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, nodeSpec_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu other = (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) obj; + + if (!getNodeSpecList() + .equals(other.getNodeSpecList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodeSpecCount() > 0) { + hash = (37 * hash) + NODE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getNodeSpecList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Details of the TPU resource(s) being requested.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.Tpu} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResource.Tpu) + com.google.cloud.tpu.v2alpha1.QueuedResource.TpuOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (nodeSpecBuilder_ == null) { + nodeSpec_ = java.util.Collections.emptyList(); + } else { + nodeSpec_ = null; + nodeSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Tpu_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu build() { + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu result = new com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu(this); + int from_bitField0_ = bitField0_; + if (nodeSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nodeSpec_ = java.util.Collections.unmodifiableList(nodeSpec_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodeSpec_ = nodeSpec_; + } else { + result.nodeSpec_ = nodeSpecBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance()) return this; + if (nodeSpecBuilder_ == null) { + if (!other.nodeSpec_.isEmpty()) { + if (nodeSpec_.isEmpty()) { + nodeSpec_ = other.nodeSpec_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodeSpecIsMutable(); + nodeSpec_.addAll(other.nodeSpec_); + } + onChanged(); + } + } else { + if (!other.nodeSpec_.isEmpty()) { + if (nodeSpecBuilder_.isEmpty()) { + nodeSpecBuilder_.dispose(); + nodeSpecBuilder_ = null; + nodeSpec_ = other.nodeSpec_; + bitField0_ = (bitField0_ & ~0x00000001); + nodeSpecBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeSpecFieldBuilder() : null; + } else { + nodeSpecBuilder_.addAllMessages(other.nodeSpec_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec m = + input.readMessage( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.parser(), + extensionRegistry); + if (nodeSpecBuilder_ == null) { + ensureNodeSpecIsMutable(); + nodeSpec_.add(m); + } else { + nodeSpecBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List nodeSpec_ = + java.util.Collections.emptyList(); + private void ensureNodeSpecIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodeSpec_ = new java.util.ArrayList(nodeSpec_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpecOrBuilder> nodeSpecBuilder_; + + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public java.util.List getNodeSpecList() { + if (nodeSpecBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeSpec_); + } else { + return nodeSpecBuilder_.getMessageList(); + } + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public int getNodeSpecCount() { + if (nodeSpecBuilder_ == null) { + return nodeSpec_.size(); + } else { + return nodeSpecBuilder_.getCount(); + } + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec getNodeSpec(int index) { + if (nodeSpecBuilder_ == null) { + return nodeSpec_.get(index); + } else { + return nodeSpecBuilder_.getMessage(index); + } + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder setNodeSpec( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec value) { + if (nodeSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeSpecIsMutable(); + nodeSpec_.set(index, value); + onChanged(); + } else { + nodeSpecBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder setNodeSpec( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder builderForValue) { + if (nodeSpecBuilder_ == null) { + ensureNodeSpecIsMutable(); + nodeSpec_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeSpecBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder addNodeSpec(com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec value) { + if (nodeSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeSpecIsMutable(); + nodeSpec_.add(value); + onChanged(); + } else { + nodeSpecBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder addNodeSpec( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec value) { + if (nodeSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeSpecIsMutable(); + nodeSpec_.add(index, value); + onChanged(); + } else { + nodeSpecBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder addNodeSpec( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder builderForValue) { + if (nodeSpecBuilder_ == null) { + ensureNodeSpecIsMutable(); + nodeSpec_.add(builderForValue.build()); + onChanged(); + } else { + nodeSpecBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder addNodeSpec( + int index, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder builderForValue) { + if (nodeSpecBuilder_ == null) { + ensureNodeSpecIsMutable(); + nodeSpec_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeSpecBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder addAllNodeSpec( + java.lang.Iterable values) { + if (nodeSpecBuilder_ == null) { + ensureNodeSpecIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodeSpec_); + onChanged(); + } else { + nodeSpecBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder clearNodeSpec() { + if (nodeSpecBuilder_ == null) { + nodeSpec_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodeSpecBuilder_.clear(); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public Builder removeNodeSpec(int index) { + if (nodeSpecBuilder_ == null) { + ensureNodeSpecIsMutable(); + nodeSpec_.remove(index); + onChanged(); + } else { + nodeSpecBuilder_.remove(index); + } + return this; + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder getNodeSpecBuilder( + int index) { + return getNodeSpecFieldBuilder().getBuilder(index); + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpecOrBuilder getNodeSpecOrBuilder( + int index) { + if (nodeSpecBuilder_ == null) { + return nodeSpec_.get(index); } else { + return nodeSpecBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public java.util.List + getNodeSpecOrBuilderList() { + if (nodeSpecBuilder_ != null) { + return nodeSpecBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeSpec_); + } + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder addNodeSpecBuilder() { + return getNodeSpecFieldBuilder().addBuilder( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.getDefaultInstance()); + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder addNodeSpecBuilder( + int index) { + return getNodeSpecFieldBuilder().addBuilder( + index, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.getDefaultInstance()); + } + /** + *
+       * The TPU node(s) being requested.
+       * 
+ * + * repeated .google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec node_spec = 1; + */ + public java.util.List + getNodeSpecBuilderList() { + return getNodeSpecFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpecOrBuilder> + getNodeSpecFieldBuilder() { + if (nodeSpecBuilder_ == null) { + nodeSpecBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpec.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.NodeSpecOrBuilder>( + nodeSpec_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nodeSpec_ = null; + } + return nodeSpecBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResource.Tpu) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResource.Tpu) + private static final com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tpu parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BestEffortOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * BestEffort tier definition.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.BestEffort} + */ + public static final class BestEffort extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) + BestEffortOrBuilder { + private static final long serialVersionUID = 0L; + // Use BestEffort.newBuilder() to construct. + private BestEffort(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BestEffort() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BestEffort(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_BestEffort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_BestEffort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.class, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort other = (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * BestEffort tier definition.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.BestEffort} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_BestEffort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_BestEffort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.class, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_BestEffort_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort build() { + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort result = new com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) + private static final com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BestEffort parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GuaranteedOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Optional. Defines the minimum duration of the guarantee. If specified,
+     * the requested resources will only be provisioned if they can be
+     * allocated for at least the given duration.
+     * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the minDuration field is set. + */ + boolean hasMinDuration(); + /** + *
+     * Optional. Defines the minimum duration of the guarantee. If specified,
+     * the requested resources will only be provisioned if they can be
+     * allocated for at least the given duration.
+     * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The minDuration. + */ + com.google.protobuf.Duration getMinDuration(); + /** + *
+     * Optional. Defines the minimum duration of the guarantee. If specified,
+     * the requested resources will only be provisioned if they can be
+     * allocated for at least the given duration.
+     * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder(); + + /** + *
+     * Optional. Specifies the request should be scheduled on reserved capacity.
+     * 
+ * + * bool reserved = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The reserved. + */ + boolean getReserved(); + } + /** + *
+   * Guaranteed tier definition.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed} + */ + public static final class Guaranteed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) + GuaranteedOrBuilder { + private static final long serialVersionUID = 0L; + // Use Guaranteed.newBuilder() to construct. + private Guaranteed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Guaranteed() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Guaranteed(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Guaranteed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Guaranteed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.Builder.class); + } + + public static final int MIN_DURATION_FIELD_NUMBER = 1; + private com.google.protobuf.Duration minDuration_; + /** + *
+     * Optional. Defines the minimum duration of the guarantee. If specified,
+     * the requested resources will only be provisioned if they can be
+     * allocated for at least the given duration.
+     * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the minDuration field is set. + */ + @java.lang.Override + public boolean hasMinDuration() { + return minDuration_ != null; + } + /** + *
+     * Optional. Defines the minimum duration of the guarantee. If specified,
+     * the requested resources will only be provisioned if they can be
+     * allocated for at least the given duration.
+     * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The minDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMinDuration() { + return minDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : minDuration_; + } + /** + *
+     * Optional. Defines the minimum duration of the guarantee. If specified,
+     * the requested resources will only be provisioned if they can be
+     * allocated for at least the given duration.
+     * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder() { + return getMinDuration(); + } + + public static final int RESERVED_FIELD_NUMBER = 2; + private boolean reserved_; + /** + *
+     * Optional. Specifies the request should be scheduled on reserved capacity.
+     * 
+ * + * bool reserved = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The reserved. + */ + @java.lang.Override + public boolean getReserved() { + return reserved_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minDuration_ != null) { + output.writeMessage(1, getMinDuration()); + } + if (reserved_ != false) { + output.writeBool(2, reserved_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minDuration_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMinDuration()); + } + if (reserved_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, reserved_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed other = (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) obj; + + if (hasMinDuration() != other.hasMinDuration()) return false; + if (hasMinDuration()) { + if (!getMinDuration() + .equals(other.getMinDuration())) return false; + } + if (getReserved() + != other.getReserved()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinDuration()) { + hash = (37 * hash) + MIN_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMinDuration().hashCode(); + } + hash = (37 * hash) + RESERVED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReserved()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Guaranteed tier definition.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) + com.google.cloud.tpu.v2alpha1.QueuedResource.GuaranteedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Guaranteed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Guaranteed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minDurationBuilder_ == null) { + minDuration_ = null; + } else { + minDuration_ = null; + minDurationBuilder_ = null; + } + reserved_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_Guaranteed_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed build() { + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed result = new com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed(this); + if (minDurationBuilder_ == null) { + result.minDuration_ = minDuration_; + } else { + result.minDuration_ = minDurationBuilder_.build(); + } + result.reserved_ = reserved_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance()) return this; + if (other.hasMinDuration()) { + mergeMinDuration(other.getMinDuration()); + } + if (other.getReserved() != false) { + setReserved(other.getReserved()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getMinDurationFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 16: { + reserved_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.protobuf.Duration minDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> minDurationBuilder_; + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the minDuration field is set. + */ + public boolean hasMinDuration() { + return minDurationBuilder_ != null || minDuration_ != null; + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The minDuration. + */ + public com.google.protobuf.Duration getMinDuration() { + if (minDurationBuilder_ == null) { + return minDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : minDuration_; + } else { + return minDurationBuilder_.getMessage(); + } + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setMinDuration(com.google.protobuf.Duration value) { + if (minDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minDuration_ = value; + onChanged(); + } else { + minDurationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setMinDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (minDurationBuilder_ == null) { + minDuration_ = builderForValue.build(); + onChanged(); + } else { + minDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeMinDuration(com.google.protobuf.Duration value) { + if (minDurationBuilder_ == null) { + if (minDuration_ != null) { + minDuration_ = + com.google.protobuf.Duration.newBuilder(minDuration_).mergeFrom(value).buildPartial(); + } else { + minDuration_ = value; + } + onChanged(); + } else { + minDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearMinDuration() { + if (minDurationBuilder_ == null) { + minDuration_ = null; + onChanged(); + } else { + minDuration_ = null; + minDurationBuilder_ = null; + } + + return this; + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Duration.Builder getMinDurationBuilder() { + + onChanged(); + return getMinDurationFieldBuilder().getBuilder(); + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder() { + if (minDurationBuilder_ != null) { + return minDurationBuilder_.getMessageOrBuilder(); + } else { + return minDuration_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : minDuration_; + } + } + /** + *
+       * Optional. Defines the minimum duration of the guarantee. If specified,
+       * the requested resources will only be provisioned if they can be
+       * allocated for at least the given duration.
+       * 
+ * + * .google.protobuf.Duration min_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getMinDurationFieldBuilder() { + if (minDurationBuilder_ == null) { + minDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getMinDuration(), + getParentForChildren(), + isClean()); + minDuration_ = null; + } + return minDurationBuilder_; + } + + private boolean reserved_ ; + /** + *
+       * Optional. Specifies the request should be scheduled on reserved capacity.
+       * 
+ * + * bool reserved = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The reserved. + */ + @java.lang.Override + public boolean getReserved() { + return reserved_; + } + /** + *
+       * Optional. Specifies the request should be scheduled on reserved capacity.
+       * 
+ * + * bool reserved = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The reserved to set. + * @return This builder for chaining. + */ + public Builder setReserved(boolean value) { + + reserved_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. Specifies the request should be scheduled on reserved capacity.
+       * 
+ * + * bool reserved = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearReserved() { + + reserved_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) + private static final com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Guaranteed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QueueingPolicyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A relative time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + * @return Whether the validUntilDuration field is set. + */ + boolean hasValidUntilDuration(); + /** + *
+     * A relative time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + * @return The validUntilDuration. + */ + com.google.protobuf.Duration getValidUntilDuration(); + /** + *
+     * A relative time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + com.google.protobuf.DurationOrBuilder getValidUntilDurationOrBuilder(); + + /** + *
+     * An absolute time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + * @return Whether the validUntilTime field is set. + */ + boolean hasValidUntilTime(); + /** + *
+     * An absolute time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + * @return The validUntilTime. + */ + com.google.protobuf.Timestamp getValidUntilTime(); + /** + *
+     * An absolute time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getValidUntilTimeOrBuilder(); + + /** + *
+     * A relative time after which resources may be created.
+     * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + * @return Whether the validAfterDuration field is set. + */ + boolean hasValidAfterDuration(); + /** + *
+     * A relative time after which resources may be created.
+     * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + * @return The validAfterDuration. + */ + com.google.protobuf.Duration getValidAfterDuration(); + /** + *
+     * A relative time after which resources may be created.
+     * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + com.google.protobuf.DurationOrBuilder getValidAfterDurationOrBuilder(); + + /** + *
+     * An absolute time at which resources may be created.
+     * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + * @return Whether the validAfterTime field is set. + */ + boolean hasValidAfterTime(); + /** + *
+     * An absolute time at which resources may be created.
+     * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + * @return The validAfterTime. + */ + com.google.protobuf.Timestamp getValidAfterTime(); + /** + *
+     * An absolute time at which resources may be created.
+     * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getValidAfterTimeOrBuilder(); + + /** + *
+     * An absolute time interval within which resources may be created.
+     * 
+ * + * .google.type.Interval valid_interval = 5; + * @return Whether the validInterval field is set. + */ + boolean hasValidInterval(); + /** + *
+     * An absolute time interval within which resources may be created.
+     * 
+ * + * .google.type.Interval valid_interval = 5; + * @return The validInterval. + */ + com.google.type.Interval getValidInterval(); + /** + *
+     * An absolute time interval within which resources may be created.
+     * 
+ * + * .google.type.Interval valid_interval = 5; + */ + com.google.type.IntervalOrBuilder getValidIntervalOrBuilder(); + + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.StartTimingConstraintsCase getStartTimingConstraintsCase(); + } + /** + *
+   * Defines the policy of the QueuedRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy} + */ + public static final class QueueingPolicy extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy) + QueueingPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueueingPolicy.newBuilder() to construct. + private QueueingPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueueingPolicy() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueueingPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_QueueingPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_QueueingPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.class, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.Builder.class); + } + + private int startTimingConstraintsCase_ = 0; + private java.lang.Object startTimingConstraints_; + public enum StartTimingConstraintsCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALID_UNTIL_DURATION(1), + VALID_UNTIL_TIME(2), + VALID_AFTER_DURATION(3), + VALID_AFTER_TIME(4), + VALID_INTERVAL(5), + STARTTIMINGCONSTRAINTS_NOT_SET(0); + private final int value; + private StartTimingConstraintsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StartTimingConstraintsCase valueOf(int value) { + return forNumber(value); + } + + public static StartTimingConstraintsCase forNumber(int value) { + switch (value) { + case 1: return VALID_UNTIL_DURATION; + case 2: return VALID_UNTIL_TIME; + case 3: return VALID_AFTER_DURATION; + case 4: return VALID_AFTER_TIME; + case 5: return VALID_INTERVAL; + case 0: return STARTTIMINGCONSTRAINTS_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public StartTimingConstraintsCase + getStartTimingConstraintsCase() { + return StartTimingConstraintsCase.forNumber( + startTimingConstraintsCase_); + } + + public static final int VALID_UNTIL_DURATION_FIELD_NUMBER = 1; + /** + *
+     * A relative time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + * @return Whether the validUntilDuration field is set. + */ + @java.lang.Override + public boolean hasValidUntilDuration() { + return startTimingConstraintsCase_ == 1; + } + /** + *
+     * A relative time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + * @return The validUntilDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getValidUntilDuration() { + if (startTimingConstraintsCase_ == 1) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + *
+     * A relative time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getValidUntilDurationOrBuilder() { + if (startTimingConstraintsCase_ == 1) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int VALID_UNTIL_TIME_FIELD_NUMBER = 2; + /** + *
+     * An absolute time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + * @return Whether the validUntilTime field is set. + */ + @java.lang.Override + public boolean hasValidUntilTime() { + return startTimingConstraintsCase_ == 2; + } + /** + *
+     * An absolute time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + * @return The validUntilTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getValidUntilTime() { + if (startTimingConstraintsCase_ == 2) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + *
+     * An absolute time after which resources should not be created.
+     * If the request cannot be fulfilled by this time the request will be
+     * failed.
+     * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getValidUntilTimeOrBuilder() { + if (startTimingConstraintsCase_ == 2) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int VALID_AFTER_DURATION_FIELD_NUMBER = 3; + /** + *
+     * A relative time after which resources may be created.
+     * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + * @return Whether the validAfterDuration field is set. + */ + @java.lang.Override + public boolean hasValidAfterDuration() { + return startTimingConstraintsCase_ == 3; + } + /** + *
+     * A relative time after which resources may be created.
+     * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + * @return The validAfterDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getValidAfterDuration() { + if (startTimingConstraintsCase_ == 3) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + *
+     * A relative time after which resources may be created.
+     * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getValidAfterDurationOrBuilder() { + if (startTimingConstraintsCase_ == 3) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int VALID_AFTER_TIME_FIELD_NUMBER = 4; + /** + *
+     * An absolute time at which resources may be created.
+     * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + * @return Whether the validAfterTime field is set. + */ + @java.lang.Override + public boolean hasValidAfterTime() { + return startTimingConstraintsCase_ == 4; + } + /** + *
+     * An absolute time at which resources may be created.
+     * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + * @return The validAfterTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getValidAfterTime() { + if (startTimingConstraintsCase_ == 4) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + *
+     * An absolute time at which resources may be created.
+     * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getValidAfterTimeOrBuilder() { + if (startTimingConstraintsCase_ == 4) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int VALID_INTERVAL_FIELD_NUMBER = 5; + /** + *
+     * An absolute time interval within which resources may be created.
+     * 
+ * + * .google.type.Interval valid_interval = 5; + * @return Whether the validInterval field is set. + */ + @java.lang.Override + public boolean hasValidInterval() { + return startTimingConstraintsCase_ == 5; + } + /** + *
+     * An absolute time interval within which resources may be created.
+     * 
+ * + * .google.type.Interval valid_interval = 5; + * @return The validInterval. + */ + @java.lang.Override + public com.google.type.Interval getValidInterval() { + if (startTimingConstraintsCase_ == 5) { + return (com.google.type.Interval) startTimingConstraints_; + } + return com.google.type.Interval.getDefaultInstance(); + } + /** + *
+     * An absolute time interval within which resources may be created.
+     * 
+ * + * .google.type.Interval valid_interval = 5; + */ + @java.lang.Override + public com.google.type.IntervalOrBuilder getValidIntervalOrBuilder() { + if (startTimingConstraintsCase_ == 5) { + return (com.google.type.Interval) startTimingConstraints_; + } + return com.google.type.Interval.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTimingConstraintsCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Duration) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 2) { + output.writeMessage(2, (com.google.protobuf.Timestamp) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 3) { + output.writeMessage(3, (com.google.protobuf.Duration) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Timestamp) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 5) { + output.writeMessage(5, (com.google.type.Interval) startTimingConstraints_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTimingConstraintsCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.protobuf.Duration) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.protobuf.Timestamp) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.protobuf.Duration) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.protobuf.Timestamp) startTimingConstraints_); + } + if (startTimingConstraintsCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.type.Interval) startTimingConstraints_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy other = (com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy) obj; + + if (!getStartTimingConstraintsCase().equals(other.getStartTimingConstraintsCase())) return false; + switch (startTimingConstraintsCase_) { + case 1: + if (!getValidUntilDuration() + .equals(other.getValidUntilDuration())) return false; + break; + case 2: + if (!getValidUntilTime() + .equals(other.getValidUntilTime())) return false; + break; + case 3: + if (!getValidAfterDuration() + .equals(other.getValidAfterDuration())) return false; + break; + case 4: + if (!getValidAfterTime() + .equals(other.getValidAfterTime())) return false; + break; + case 5: + if (!getValidInterval() + .equals(other.getValidInterval())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (startTimingConstraintsCase_) { + case 1: + hash = (37 * hash) + VALID_UNTIL_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getValidUntilDuration().hashCode(); + break; + case 2: + hash = (37 * hash) + VALID_UNTIL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getValidUntilTime().hashCode(); + break; + case 3: + hash = (37 * hash) + VALID_AFTER_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getValidAfterDuration().hashCode(); + break; + case 4: + hash = (37 * hash) + VALID_AFTER_TIME_FIELD_NUMBER; + hash = (53 * hash) + getValidAfterTime().hashCode(); + break; + case 5: + hash = (37 * hash) + VALID_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getValidInterval().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Defines the policy of the QueuedRequest.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy) + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_QueueingPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_QueueingPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.class, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (validUntilDurationBuilder_ != null) { + validUntilDurationBuilder_.clear(); + } + if (validUntilTimeBuilder_ != null) { + validUntilTimeBuilder_.clear(); + } + if (validAfterDurationBuilder_ != null) { + validAfterDurationBuilder_.clear(); + } + if (validAfterTimeBuilder_ != null) { + validAfterTimeBuilder_.clear(); + } + if (validIntervalBuilder_ != null) { + validIntervalBuilder_.clear(); + } + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_QueueingPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy build() { + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy result = new com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy(this); + if (startTimingConstraintsCase_ == 1) { + if (validUntilDurationBuilder_ == null) { + result.startTimingConstraints_ = startTimingConstraints_; + } else { + result.startTimingConstraints_ = validUntilDurationBuilder_.build(); + } + } + if (startTimingConstraintsCase_ == 2) { + if (validUntilTimeBuilder_ == null) { + result.startTimingConstraints_ = startTimingConstraints_; + } else { + result.startTimingConstraints_ = validUntilTimeBuilder_.build(); + } + } + if (startTimingConstraintsCase_ == 3) { + if (validAfterDurationBuilder_ == null) { + result.startTimingConstraints_ = startTimingConstraints_; + } else { + result.startTimingConstraints_ = validAfterDurationBuilder_.build(); + } + } + if (startTimingConstraintsCase_ == 4) { + if (validAfterTimeBuilder_ == null) { + result.startTimingConstraints_ = startTimingConstraints_; + } else { + result.startTimingConstraints_ = validAfterTimeBuilder_.build(); + } + } + if (startTimingConstraintsCase_ == 5) { + if (validIntervalBuilder_ == null) { + result.startTimingConstraints_ = startTimingConstraints_; + } else { + result.startTimingConstraints_ = validIntervalBuilder_.build(); + } + } + result.startTimingConstraintsCase_ = startTimingConstraintsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.getDefaultInstance()) return this; + switch (other.getStartTimingConstraintsCase()) { + case VALID_UNTIL_DURATION: { + mergeValidUntilDuration(other.getValidUntilDuration()); + break; + } + case VALID_UNTIL_TIME: { + mergeValidUntilTime(other.getValidUntilTime()); + break; + } + case VALID_AFTER_DURATION: { + mergeValidAfterDuration(other.getValidAfterDuration()); + break; + } + case VALID_AFTER_TIME: { + mergeValidAfterTime(other.getValidAfterTime()); + break; + } + case VALID_INTERVAL: { + mergeValidInterval(other.getValidInterval()); + break; + } + case STARTTIMINGCONSTRAINTS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValidUntilDurationFieldBuilder().getBuilder(), + extensionRegistry); + startTimingConstraintsCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getValidUntilTimeFieldBuilder().getBuilder(), + extensionRegistry); + startTimingConstraintsCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getValidAfterDurationFieldBuilder().getBuilder(), + extensionRegistry); + startTimingConstraintsCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getValidAfterTimeFieldBuilder().getBuilder(), + extensionRegistry); + startTimingConstraintsCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getValidIntervalFieldBuilder().getBuilder(), + extensionRegistry); + startTimingConstraintsCase_ = 5; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int startTimingConstraintsCase_ = 0; + private java.lang.Object startTimingConstraints_; + public StartTimingConstraintsCase + getStartTimingConstraintsCase() { + return StartTimingConstraintsCase.forNumber( + startTimingConstraintsCase_); + } + + public Builder clearStartTimingConstraints() { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> validUntilDurationBuilder_; + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + * @return Whether the validUntilDuration field is set. + */ + @java.lang.Override + public boolean hasValidUntilDuration() { + return startTimingConstraintsCase_ == 1; + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + * @return The validUntilDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getValidUntilDuration() { + if (validUntilDurationBuilder_ == null) { + if (startTimingConstraintsCase_ == 1) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (startTimingConstraintsCase_ == 1) { + return validUntilDurationBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + public Builder setValidUntilDuration(com.google.protobuf.Duration value) { + if (validUntilDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimingConstraints_ = value; + onChanged(); + } else { + validUntilDurationBuilder_.setMessage(value); + } + startTimingConstraintsCase_ = 1; + return this; + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + public Builder setValidUntilDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (validUntilDurationBuilder_ == null) { + startTimingConstraints_ = builderForValue.build(); + onChanged(); + } else { + validUntilDurationBuilder_.setMessage(builderForValue.build()); + } + startTimingConstraintsCase_ = 1; + return this; + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + public Builder mergeValidUntilDuration(com.google.protobuf.Duration value) { + if (validUntilDurationBuilder_ == null) { + if (startTimingConstraintsCase_ == 1 && + startTimingConstraints_ != com.google.protobuf.Duration.getDefaultInstance()) { + startTimingConstraints_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) startTimingConstraints_) + .mergeFrom(value).buildPartial(); + } else { + startTimingConstraints_ = value; + } + onChanged(); + } else { + if (startTimingConstraintsCase_ == 1) { + validUntilDurationBuilder_.mergeFrom(value); + } else { + validUntilDurationBuilder_.setMessage(value); + } + } + startTimingConstraintsCase_ = 1; + return this; + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + public Builder clearValidUntilDuration() { + if (validUntilDurationBuilder_ == null) { + if (startTimingConstraintsCase_ == 1) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + onChanged(); + } + } else { + if (startTimingConstraintsCase_ == 1) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + } + validUntilDurationBuilder_.clear(); + } + return this; + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + public com.google.protobuf.Duration.Builder getValidUntilDurationBuilder() { + return getValidUntilDurationFieldBuilder().getBuilder(); + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getValidUntilDurationOrBuilder() { + if ((startTimingConstraintsCase_ == 1) && (validUntilDurationBuilder_ != null)) { + return validUntilDurationBuilder_.getMessageOrBuilder(); + } else { + if (startTimingConstraintsCase_ == 1) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+       * A relative time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Duration valid_until_duration = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getValidUntilDurationFieldBuilder() { + if (validUntilDurationBuilder_ == null) { + if (!(startTimingConstraintsCase_ == 1)) { + startTimingConstraints_ = com.google.protobuf.Duration.getDefaultInstance(); + } + validUntilDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) startTimingConstraints_, + getParentForChildren(), + isClean()); + startTimingConstraints_ = null; + } + startTimingConstraintsCase_ = 1; + onChanged();; + return validUntilDurationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> validUntilTimeBuilder_; + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + * @return Whether the validUntilTime field is set. + */ + @java.lang.Override + public boolean hasValidUntilTime() { + return startTimingConstraintsCase_ == 2; + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + * @return The validUntilTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getValidUntilTime() { + if (validUntilTimeBuilder_ == null) { + if (startTimingConstraintsCase_ == 2) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (startTimingConstraintsCase_ == 2) { + return validUntilTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + public Builder setValidUntilTime(com.google.protobuf.Timestamp value) { + if (validUntilTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimingConstraints_ = value; + onChanged(); + } else { + validUntilTimeBuilder_.setMessage(value); + } + startTimingConstraintsCase_ = 2; + return this; + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + public Builder setValidUntilTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (validUntilTimeBuilder_ == null) { + startTimingConstraints_ = builderForValue.build(); + onChanged(); + } else { + validUntilTimeBuilder_.setMessage(builderForValue.build()); + } + startTimingConstraintsCase_ = 2; + return this; + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + public Builder mergeValidUntilTime(com.google.protobuf.Timestamp value) { + if (validUntilTimeBuilder_ == null) { + if (startTimingConstraintsCase_ == 2 && + startTimingConstraints_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + startTimingConstraints_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) startTimingConstraints_) + .mergeFrom(value).buildPartial(); + } else { + startTimingConstraints_ = value; + } + onChanged(); + } else { + if (startTimingConstraintsCase_ == 2) { + validUntilTimeBuilder_.mergeFrom(value); + } else { + validUntilTimeBuilder_.setMessage(value); + } + } + startTimingConstraintsCase_ = 2; + return this; + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + public Builder clearValidUntilTime() { + if (validUntilTimeBuilder_ == null) { + if (startTimingConstraintsCase_ == 2) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + onChanged(); + } + } else { + if (startTimingConstraintsCase_ == 2) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + } + validUntilTimeBuilder_.clear(); + } + return this; + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getValidUntilTimeBuilder() { + return getValidUntilTimeFieldBuilder().getBuilder(); + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getValidUntilTimeOrBuilder() { + if ((startTimingConstraintsCase_ == 2) && (validUntilTimeBuilder_ != null)) { + return validUntilTimeBuilder_.getMessageOrBuilder(); + } else { + if (startTimingConstraintsCase_ == 2) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * An absolute time after which resources should not be created.
+       * If the request cannot be fulfilled by this time the request will be
+       * failed.
+       * 
+ * + * .google.protobuf.Timestamp valid_until_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getValidUntilTimeFieldBuilder() { + if (validUntilTimeBuilder_ == null) { + if (!(startTimingConstraintsCase_ == 2)) { + startTimingConstraints_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + validUntilTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) startTimingConstraints_, + getParentForChildren(), + isClean()); + startTimingConstraints_ = null; + } + startTimingConstraintsCase_ = 2; + onChanged();; + return validUntilTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> validAfterDurationBuilder_; + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + * @return Whether the validAfterDuration field is set. + */ + @java.lang.Override + public boolean hasValidAfterDuration() { + return startTimingConstraintsCase_ == 3; + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + * @return The validAfterDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getValidAfterDuration() { + if (validAfterDurationBuilder_ == null) { + if (startTimingConstraintsCase_ == 3) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (startTimingConstraintsCase_ == 3) { + return validAfterDurationBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + public Builder setValidAfterDuration(com.google.protobuf.Duration value) { + if (validAfterDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimingConstraints_ = value; + onChanged(); + } else { + validAfterDurationBuilder_.setMessage(value); + } + startTimingConstraintsCase_ = 3; + return this; + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + public Builder setValidAfterDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (validAfterDurationBuilder_ == null) { + startTimingConstraints_ = builderForValue.build(); + onChanged(); + } else { + validAfterDurationBuilder_.setMessage(builderForValue.build()); + } + startTimingConstraintsCase_ = 3; + return this; + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + public Builder mergeValidAfterDuration(com.google.protobuf.Duration value) { + if (validAfterDurationBuilder_ == null) { + if (startTimingConstraintsCase_ == 3 && + startTimingConstraints_ != com.google.protobuf.Duration.getDefaultInstance()) { + startTimingConstraints_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) startTimingConstraints_) + .mergeFrom(value).buildPartial(); + } else { + startTimingConstraints_ = value; + } + onChanged(); + } else { + if (startTimingConstraintsCase_ == 3) { + validAfterDurationBuilder_.mergeFrom(value); + } else { + validAfterDurationBuilder_.setMessage(value); + } + } + startTimingConstraintsCase_ = 3; + return this; + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + public Builder clearValidAfterDuration() { + if (validAfterDurationBuilder_ == null) { + if (startTimingConstraintsCase_ == 3) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + onChanged(); + } + } else { + if (startTimingConstraintsCase_ == 3) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + } + validAfterDurationBuilder_.clear(); + } + return this; + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + public com.google.protobuf.Duration.Builder getValidAfterDurationBuilder() { + return getValidAfterDurationFieldBuilder().getBuilder(); + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getValidAfterDurationOrBuilder() { + if ((startTimingConstraintsCase_ == 3) && (validAfterDurationBuilder_ != null)) { + return validAfterDurationBuilder_.getMessageOrBuilder(); + } else { + if (startTimingConstraintsCase_ == 3) { + return (com.google.protobuf.Duration) startTimingConstraints_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+       * A relative time after which resources may be created.
+       * 
+ * + * .google.protobuf.Duration valid_after_duration = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getValidAfterDurationFieldBuilder() { + if (validAfterDurationBuilder_ == null) { + if (!(startTimingConstraintsCase_ == 3)) { + startTimingConstraints_ = com.google.protobuf.Duration.getDefaultInstance(); + } + validAfterDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) startTimingConstraints_, + getParentForChildren(), + isClean()); + startTimingConstraints_ = null; + } + startTimingConstraintsCase_ = 3; + onChanged();; + return validAfterDurationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> validAfterTimeBuilder_; + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + * @return Whether the validAfterTime field is set. + */ + @java.lang.Override + public boolean hasValidAfterTime() { + return startTimingConstraintsCase_ == 4; + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + * @return The validAfterTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getValidAfterTime() { + if (validAfterTimeBuilder_ == null) { + if (startTimingConstraintsCase_ == 4) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (startTimingConstraintsCase_ == 4) { + return validAfterTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + public Builder setValidAfterTime(com.google.protobuf.Timestamp value) { + if (validAfterTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimingConstraints_ = value; + onChanged(); + } else { + validAfterTimeBuilder_.setMessage(value); + } + startTimingConstraintsCase_ = 4; + return this; + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + public Builder setValidAfterTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (validAfterTimeBuilder_ == null) { + startTimingConstraints_ = builderForValue.build(); + onChanged(); + } else { + validAfterTimeBuilder_.setMessage(builderForValue.build()); + } + startTimingConstraintsCase_ = 4; + return this; + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + public Builder mergeValidAfterTime(com.google.protobuf.Timestamp value) { + if (validAfterTimeBuilder_ == null) { + if (startTimingConstraintsCase_ == 4 && + startTimingConstraints_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + startTimingConstraints_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) startTimingConstraints_) + .mergeFrom(value).buildPartial(); + } else { + startTimingConstraints_ = value; + } + onChanged(); + } else { + if (startTimingConstraintsCase_ == 4) { + validAfterTimeBuilder_.mergeFrom(value); + } else { + validAfterTimeBuilder_.setMessage(value); + } + } + startTimingConstraintsCase_ = 4; + return this; + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + public Builder clearValidAfterTime() { + if (validAfterTimeBuilder_ == null) { + if (startTimingConstraintsCase_ == 4) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + onChanged(); + } + } else { + if (startTimingConstraintsCase_ == 4) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + } + validAfterTimeBuilder_.clear(); + } + return this; + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getValidAfterTimeBuilder() { + return getValidAfterTimeFieldBuilder().getBuilder(); + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getValidAfterTimeOrBuilder() { + if ((startTimingConstraintsCase_ == 4) && (validAfterTimeBuilder_ != null)) { + return validAfterTimeBuilder_.getMessageOrBuilder(); + } else { + if (startTimingConstraintsCase_ == 4) { + return (com.google.protobuf.Timestamp) startTimingConstraints_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * An absolute time at which resources may be created.
+       * 
+ * + * .google.protobuf.Timestamp valid_after_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getValidAfterTimeFieldBuilder() { + if (validAfterTimeBuilder_ == null) { + if (!(startTimingConstraintsCase_ == 4)) { + startTimingConstraints_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + validAfterTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) startTimingConstraints_, + getParentForChildren(), + isClean()); + startTimingConstraints_ = null; + } + startTimingConstraintsCase_ = 4; + onChanged();; + return validAfterTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Interval, com.google.type.Interval.Builder, com.google.type.IntervalOrBuilder> validIntervalBuilder_; + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + * @return Whether the validInterval field is set. + */ + @java.lang.Override + public boolean hasValidInterval() { + return startTimingConstraintsCase_ == 5; + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + * @return The validInterval. + */ + @java.lang.Override + public com.google.type.Interval getValidInterval() { + if (validIntervalBuilder_ == null) { + if (startTimingConstraintsCase_ == 5) { + return (com.google.type.Interval) startTimingConstraints_; + } + return com.google.type.Interval.getDefaultInstance(); + } else { + if (startTimingConstraintsCase_ == 5) { + return validIntervalBuilder_.getMessage(); + } + return com.google.type.Interval.getDefaultInstance(); + } + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + */ + public Builder setValidInterval(com.google.type.Interval value) { + if (validIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimingConstraints_ = value; + onChanged(); + } else { + validIntervalBuilder_.setMessage(value); + } + startTimingConstraintsCase_ = 5; + return this; + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + */ + public Builder setValidInterval( + com.google.type.Interval.Builder builderForValue) { + if (validIntervalBuilder_ == null) { + startTimingConstraints_ = builderForValue.build(); + onChanged(); + } else { + validIntervalBuilder_.setMessage(builderForValue.build()); + } + startTimingConstraintsCase_ = 5; + return this; + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + */ + public Builder mergeValidInterval(com.google.type.Interval value) { + if (validIntervalBuilder_ == null) { + if (startTimingConstraintsCase_ == 5 && + startTimingConstraints_ != com.google.type.Interval.getDefaultInstance()) { + startTimingConstraints_ = com.google.type.Interval.newBuilder((com.google.type.Interval) startTimingConstraints_) + .mergeFrom(value).buildPartial(); + } else { + startTimingConstraints_ = value; + } + onChanged(); + } else { + if (startTimingConstraintsCase_ == 5) { + validIntervalBuilder_.mergeFrom(value); + } else { + validIntervalBuilder_.setMessage(value); + } + } + startTimingConstraintsCase_ = 5; + return this; + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + */ + public Builder clearValidInterval() { + if (validIntervalBuilder_ == null) { + if (startTimingConstraintsCase_ == 5) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + onChanged(); + } + } else { + if (startTimingConstraintsCase_ == 5) { + startTimingConstraintsCase_ = 0; + startTimingConstraints_ = null; + } + validIntervalBuilder_.clear(); + } + return this; + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + */ + public com.google.type.Interval.Builder getValidIntervalBuilder() { + return getValidIntervalFieldBuilder().getBuilder(); + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + */ + @java.lang.Override + public com.google.type.IntervalOrBuilder getValidIntervalOrBuilder() { + if ((startTimingConstraintsCase_ == 5) && (validIntervalBuilder_ != null)) { + return validIntervalBuilder_.getMessageOrBuilder(); + } else { + if (startTimingConstraintsCase_ == 5) { + return (com.google.type.Interval) startTimingConstraints_; + } + return com.google.type.Interval.getDefaultInstance(); + } + } + /** + *
+       * An absolute time interval within which resources may be created.
+       * 
+ * + * .google.type.Interval valid_interval = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Interval, com.google.type.Interval.Builder, com.google.type.IntervalOrBuilder> + getValidIntervalFieldBuilder() { + if (validIntervalBuilder_ == null) { + if (!(startTimingConstraintsCase_ == 5)) { + startTimingConstraints_ = com.google.type.Interval.getDefaultInstance(); + } + validIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Interval, com.google.type.Interval.Builder, com.google.type.IntervalOrBuilder>( + (com.google.type.Interval) startTimingConstraints_, + getParentForChildren(), + isClean()); + startTimingConstraints_ = null; + } + startTimingConstraintsCase_ = 5; + onChanged();; + return validIntervalBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy) + private static final com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueueingPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int resourceCase_ = 0; + private java.lang.Object resource_; + public enum ResourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TPU(2), + RESOURCE_NOT_SET(0); + private final int value; + private ResourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourceCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceCase forNumber(int value) { + switch (value) { + case 2: return TPU; + case 0: return RESOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResourceCase + getResourceCase() { + return ResourceCase.forNumber( + resourceCase_); + } + + private int tierCase_ = 0; + private java.lang.Object tier_; + public enum TierCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BEST_EFFORT(3), + GUARANTEED(4), + TIER_NOT_SET(0); + private final int value; + private TierCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TierCase valueOf(int value) { + return forNumber(value); + } + + public static TierCase forNumber(int value) { + switch (value) { + case 3: return BEST_EFFORT; + case 4: return GUARANTEED; + case 0: return TIER_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TierCase + getTierCase() { + return TierCase.forNumber( + tierCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Output only. Immutable. The name of the QueuedResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. Immutable. The name of the QueuedResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TPU_FIELD_NUMBER = 2; + /** + *
+   * Defines a TPU resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + * @return Whether the tpu field is set. + */ + @java.lang.Override + public boolean hasTpu() { + return resourceCase_ == 2; + } + /** + *
+   * Defines a TPU resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + * @return The tpu. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu getTpu() { + if (resourceCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance(); + } + /** + *
+   * Defines a TPU resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.TpuOrBuilder getTpuOrBuilder() { + if (resourceCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance(); + } + + public static final int BEST_EFFORT_FIELD_NUMBER = 3; + /** + *
+   * The BestEffort tier.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + * @return Whether the bestEffort field is set. + */ + @java.lang.Override + public boolean hasBestEffort() { + return tierCase_ == 3; + } + /** + *
+   * The BestEffort tier.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + * @return The bestEffort. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort getBestEffort() { + if (tierCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance(); + } + /** + *
+   * The BestEffort tier.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffortOrBuilder getBestEffortOrBuilder() { + if (tierCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance(); + } + + public static final int GUARANTEED_FIELD_NUMBER = 4; + /** + *
+   * The Guaranteed tier
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + * @return Whether the guaranteed field is set. + */ + @java.lang.Override + public boolean hasGuaranteed() { + return tierCase_ == 4; + } + /** + *
+   * The Guaranteed tier
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + * @return The guaranteed. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed getGuaranteed() { + if (tierCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance(); + } + /** + *
+   * The Guaranteed tier
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.GuaranteedOrBuilder getGuaranteedOrBuilder() { + if (tierCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance(); + } + + public static final int QUEUEING_POLICY_FIELD_NUMBER = 5; + private com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueingPolicy_; + /** + *
+   * The queueing policy of the QueuedRequest.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + * @return Whether the queueingPolicy field is set. + */ + @java.lang.Override + public boolean hasQueueingPolicy() { + return queueingPolicy_ != null; + } + /** + *
+   * The queueing policy of the QueuedRequest.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + * @return The queueingPolicy. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy getQueueingPolicy() { + return queueingPolicy_ == null ? com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.getDefaultInstance() : queueingPolicy_; + } + /** + *
+   * The queueing policy of the QueuedRequest.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicyOrBuilder getQueueingPolicyOrBuilder() { + return getQueueingPolicy(); + } + + public static final int STATE_FIELD_NUMBER = 6; + private com.google.cloud.tpu.v2alpha1.QueuedResourceState state_; + /** + *
+   * Output only. State of the QueuedResource request
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the state field is set. + */ + @java.lang.Override + public boolean hasState() { + return state_ != null; + } + /** + *
+   * Output only. State of the QueuedResource request
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState getState() { + return state_ == null ? com.google.cloud.tpu.v2alpha1.QueuedResourceState.getDefaultInstance() : state_; + } + /** + *
+   * Output only. State of the QueuedResource request
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceStateOrBuilder getStateOrBuilder() { + return getState(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (resourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_); + } + if (tierCase_ == 3) { + output.writeMessage(3, (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_); + } + if (tierCase_ == 4) { + output.writeMessage(4, (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_); + } + if (queueingPolicy_ != null) { + output.writeMessage(5, getQueueingPolicy()); + } + if (state_ != null) { + output.writeMessage(6, getState()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (resourceCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_); + } + if (tierCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_); + } + if (tierCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_); + } + if (queueingPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getQueueingPolicy()); + } + if (state_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getState()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResource)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResource other = (com.google.cloud.tpu.v2alpha1.QueuedResource) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasQueueingPolicy() != other.hasQueueingPolicy()) return false; + if (hasQueueingPolicy()) { + if (!getQueueingPolicy() + .equals(other.getQueueingPolicy())) return false; + } + if (hasState() != other.hasState()) return false; + if (hasState()) { + if (!getState() + .equals(other.getState())) return false; + } + if (!getResourceCase().equals(other.getResourceCase())) return false; + switch (resourceCase_) { + case 2: + if (!getTpu() + .equals(other.getTpu())) return false; + break; + case 0: + default: + } + if (!getTierCase().equals(other.getTierCase())) return false; + switch (tierCase_) { + case 3: + if (!getBestEffort() + .equals(other.getBestEffort())) return false; + break; + case 4: + if (!getGuaranteed() + .equals(other.getGuaranteed())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasQueueingPolicy()) { + hash = (37 * hash) + QUEUEING_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getQueueingPolicy().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + switch (resourceCase_) { + case 2: + hash = (37 * hash) + TPU_FIELD_NUMBER; + hash = (53 * hash) + getTpu().hashCode(); + break; + case 0: + default: + } + switch (tierCase_) { + case 3: + hash = (37 * hash) + BEST_EFFORT_FIELD_NUMBER; + hash = (53 * hash) + getBestEffort().hashCode(); + break; + case 4: + hash = (37 * hash) + GUARANTEED_FIELD_NUMBER; + hash = (53 * hash) + getGuaranteed().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A QueuedResource represents a request for resources that will be placed
+   * in a queue and fulfilled when the necessary resources are available.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResource) + com.google.cloud.tpu.v2alpha1.QueuedResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResource.class, com.google.cloud.tpu.v2alpha1.QueuedResource.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResource.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (tpuBuilder_ != null) { + tpuBuilder_.clear(); + } + if (bestEffortBuilder_ != null) { + bestEffortBuilder_.clear(); + } + if (guaranteedBuilder_ != null) { + guaranteedBuilder_.clear(); + } + if (queueingPolicyBuilder_ == null) { + queueingPolicy_ = null; + } else { + queueingPolicy_ = null; + queueingPolicyBuilder_ = null; + } + if (stateBuilder_ == null) { + state_ = null; + } else { + state_ = null; + stateBuilder_ = null; + } + resourceCase_ = 0; + resource_ = null; + tierCase_ = 0; + tier_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource build() { + com.google.cloud.tpu.v2alpha1.QueuedResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResource result = new com.google.cloud.tpu.v2alpha1.QueuedResource(this); + result.name_ = name_; + if (resourceCase_ == 2) { + if (tpuBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = tpuBuilder_.build(); + } + } + if (tierCase_ == 3) { + if (bestEffortBuilder_ == null) { + result.tier_ = tier_; + } else { + result.tier_ = bestEffortBuilder_.build(); + } + } + if (tierCase_ == 4) { + if (guaranteedBuilder_ == null) { + result.tier_ = tier_; + } else { + result.tier_ = guaranteedBuilder_.build(); + } + } + if (queueingPolicyBuilder_ == null) { + result.queueingPolicy_ = queueingPolicy_; + } else { + result.queueingPolicy_ = queueingPolicyBuilder_.build(); + } + if (stateBuilder_ == null) { + result.state_ = state_; + } else { + result.state_ = stateBuilder_.build(); + } + result.resourceCase_ = resourceCase_; + result.tierCase_ = tierCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResource) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResource other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResource.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasQueueingPolicy()) { + mergeQueueingPolicy(other.getQueueingPolicy()); + } + if (other.hasState()) { + mergeState(other.getState()); + } + switch (other.getResourceCase()) { + case TPU: { + mergeTpu(other.getTpu()); + break; + } + case RESOURCE_NOT_SET: { + break; + } + } + switch (other.getTierCase()) { + case BEST_EFFORT: { + mergeBestEffort(other.getBestEffort()); + break; + } + case GUARANTEED: { + mergeGuaranteed(other.getGuaranteed()); + break; + } + case TIER_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + input.readMessage( + getTpuFieldBuilder().getBuilder(), + extensionRegistry); + resourceCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getBestEffortFieldBuilder().getBuilder(), + extensionRegistry); + tierCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getGuaranteedFieldBuilder().getBuilder(), + extensionRegistry); + tierCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getQueueingPolicyFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 42 + case 50: { + input.readMessage( + getStateFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int resourceCase_ = 0; + private java.lang.Object resource_; + public ResourceCase + getResourceCase() { + return ResourceCase.forNumber( + resourceCase_); + } + + public Builder clearResource() { + resourceCase_ = 0; + resource_ = null; + onChanged(); + return this; + } + + private int tierCase_ = 0; + private java.lang.Object tier_; + public TierCase + getTierCase() { + return TierCase.forNumber( + tierCase_); + } + + public Builder clearTier() { + tierCase_ = 0; + tier_ = null; + onChanged(); + return this; + } + + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. Immutable. The name of the QueuedResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Immutable. The name of the QueuedResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Immutable. The name of the QueuedResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The name of the QueuedResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Output only. Immutable. The name of the QueuedResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.TpuOrBuilder> tpuBuilder_; + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + * @return Whether the tpu field is set. + */ + @java.lang.Override + public boolean hasTpu() { + return resourceCase_ == 2; + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + * @return The tpu. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu getTpu() { + if (tpuBuilder_ == null) { + if (resourceCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance(); + } else { + if (resourceCase_ == 2) { + return tpuBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance(); + } + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + public Builder setTpu(com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu value) { + if (tpuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + tpuBuilder_.setMessage(value); + } + resourceCase_ = 2; + return this; + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + public Builder setTpu( + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.Builder builderForValue) { + if (tpuBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + tpuBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 2; + return this; + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + public Builder mergeTpu(com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu value) { + if (tpuBuilder_ == null) { + if (resourceCase_ == 2 && + resource_ != com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance()) { + resource_ = com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_) + .mergeFrom(value).buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 2) { + tpuBuilder_.mergeFrom(value); + } else { + tpuBuilder_.setMessage(value); + } + } + resourceCase_ = 2; + return this; + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + public Builder clearTpu() { + if (tpuBuilder_ == null) { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + } + tpuBuilder_.clear(); + } + return this; + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.Builder getTpuBuilder() { + return getTpuFieldBuilder().getBuilder(); + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.TpuOrBuilder getTpuOrBuilder() { + if ((resourceCase_ == 2) && (tpuBuilder_ != null)) { + return tpuBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance(); + } + } + /** + *
+     * Defines a TPU resource.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.TpuOrBuilder> + getTpuFieldBuilder() { + if (tpuBuilder_ == null) { + if (!(resourceCase_ == 2)) { + resource_ = com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.getDefaultInstance(); + } + tpuBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu, com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.TpuOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 2; + onChanged();; + return tpuBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffortOrBuilder> bestEffortBuilder_; + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + * @return Whether the bestEffort field is set. + */ + @java.lang.Override + public boolean hasBestEffort() { + return tierCase_ == 3; + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + * @return The bestEffort. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort getBestEffort() { + if (bestEffortBuilder_ == null) { + if (tierCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance(); + } else { + if (tierCase_ == 3) { + return bestEffortBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance(); + } + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + public Builder setBestEffort(com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort value) { + if (bestEffortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tier_ = value; + onChanged(); + } else { + bestEffortBuilder_.setMessage(value); + } + tierCase_ = 3; + return this; + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + public Builder setBestEffort( + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.Builder builderForValue) { + if (bestEffortBuilder_ == null) { + tier_ = builderForValue.build(); + onChanged(); + } else { + bestEffortBuilder_.setMessage(builderForValue.build()); + } + tierCase_ = 3; + return this; + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + public Builder mergeBestEffort(com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort value) { + if (bestEffortBuilder_ == null) { + if (tierCase_ == 3 && + tier_ != com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance()) { + tier_ = com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_) + .mergeFrom(value).buildPartial(); + } else { + tier_ = value; + } + onChanged(); + } else { + if (tierCase_ == 3) { + bestEffortBuilder_.mergeFrom(value); + } else { + bestEffortBuilder_.setMessage(value); + } + } + tierCase_ = 3; + return this; + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + public Builder clearBestEffort() { + if (bestEffortBuilder_ == null) { + if (tierCase_ == 3) { + tierCase_ = 0; + tier_ = null; + onChanged(); + } + } else { + if (tierCase_ == 3) { + tierCase_ = 0; + tier_ = null; + } + bestEffortBuilder_.clear(); + } + return this; + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.Builder getBestEffortBuilder() { + return getBestEffortFieldBuilder().getBuilder(); + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffortOrBuilder getBestEffortOrBuilder() { + if ((tierCase_ == 3) && (bestEffortBuilder_ != null)) { + return bestEffortBuilder_.getMessageOrBuilder(); + } else { + if (tierCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance(); + } + } + /** + *
+     * The BestEffort tier.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffortOrBuilder> + getBestEffortFieldBuilder() { + if (bestEffortBuilder_ == null) { + if (!(tierCase_ == 3)) { + tier_ = com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.getDefaultInstance(); + } + bestEffortBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffortOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort) tier_, + getParentForChildren(), + isClean()); + tier_ = null; + } + tierCase_ = 3; + onChanged();; + return bestEffortBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed, com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.GuaranteedOrBuilder> guaranteedBuilder_; + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + * @return Whether the guaranteed field is set. + */ + @java.lang.Override + public boolean hasGuaranteed() { + return tierCase_ == 4; + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + * @return The guaranteed. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed getGuaranteed() { + if (guaranteedBuilder_ == null) { + if (tierCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance(); + } else { + if (tierCase_ == 4) { + return guaranteedBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance(); + } + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + public Builder setGuaranteed(com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed value) { + if (guaranteedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tier_ = value; + onChanged(); + } else { + guaranteedBuilder_.setMessage(value); + } + tierCase_ = 4; + return this; + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + public Builder setGuaranteed( + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.Builder builderForValue) { + if (guaranteedBuilder_ == null) { + tier_ = builderForValue.build(); + onChanged(); + } else { + guaranteedBuilder_.setMessage(builderForValue.build()); + } + tierCase_ = 4; + return this; + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + public Builder mergeGuaranteed(com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed value) { + if (guaranteedBuilder_ == null) { + if (tierCase_ == 4 && + tier_ != com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance()) { + tier_ = com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_) + .mergeFrom(value).buildPartial(); + } else { + tier_ = value; + } + onChanged(); + } else { + if (tierCase_ == 4) { + guaranteedBuilder_.mergeFrom(value); + } else { + guaranteedBuilder_.setMessage(value); + } + } + tierCase_ = 4; + return this; + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + public Builder clearGuaranteed() { + if (guaranteedBuilder_ == null) { + if (tierCase_ == 4) { + tierCase_ = 0; + tier_ = null; + onChanged(); + } + } else { + if (tierCase_ == 4) { + tierCase_ = 0; + tier_ = null; + } + guaranteedBuilder_.clear(); + } + return this; + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.Builder getGuaranteedBuilder() { + return getGuaranteedFieldBuilder().getBuilder(); + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource.GuaranteedOrBuilder getGuaranteedOrBuilder() { + if ((tierCase_ == 4) && (guaranteedBuilder_ != null)) { + return guaranteedBuilder_.getMessageOrBuilder(); + } else { + if (tierCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance(); + } + } + /** + *
+     * The Guaranteed tier
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed, com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.GuaranteedOrBuilder> + getGuaranteedFieldBuilder() { + if (guaranteedBuilder_ == null) { + if (!(tierCase_ == 4)) { + tier_ = com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.getDefaultInstance(); + } + guaranteedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed, com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.GuaranteedOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed) tier_, + getParentForChildren(), + isClean()); + tier_ = null; + } + tierCase_ = 4; + onChanged();; + return guaranteedBuilder_; + } + + private com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueingPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicyOrBuilder> queueingPolicyBuilder_; + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + * @return Whether the queueingPolicy field is set. + */ + public boolean hasQueueingPolicy() { + return queueingPolicyBuilder_ != null || queueingPolicy_ != null; + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + * @return The queueingPolicy. + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy getQueueingPolicy() { + if (queueingPolicyBuilder_ == null) { + return queueingPolicy_ == null ? com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.getDefaultInstance() : queueingPolicy_; + } else { + return queueingPolicyBuilder_.getMessage(); + } + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + public Builder setQueueingPolicy(com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy value) { + if (queueingPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queueingPolicy_ = value; + onChanged(); + } else { + queueingPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + public Builder setQueueingPolicy( + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.Builder builderForValue) { + if (queueingPolicyBuilder_ == null) { + queueingPolicy_ = builderForValue.build(); + onChanged(); + } else { + queueingPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + public Builder mergeQueueingPolicy(com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy value) { + if (queueingPolicyBuilder_ == null) { + if (queueingPolicy_ != null) { + queueingPolicy_ = + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.newBuilder(queueingPolicy_).mergeFrom(value).buildPartial(); + } else { + queueingPolicy_ = value; + } + onChanged(); + } else { + queueingPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + public Builder clearQueueingPolicy() { + if (queueingPolicyBuilder_ == null) { + queueingPolicy_ = null; + onChanged(); + } else { + queueingPolicy_ = null; + queueingPolicyBuilder_ = null; + } + + return this; + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.Builder getQueueingPolicyBuilder() { + + onChanged(); + return getQueueingPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicyOrBuilder getQueueingPolicyOrBuilder() { + if (queueingPolicyBuilder_ != null) { + return queueingPolicyBuilder_.getMessageOrBuilder(); + } else { + return queueingPolicy_ == null ? + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.getDefaultInstance() : queueingPolicy_; + } + } + /** + *
+     * The queueing policy of the QueuedRequest.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicyOrBuilder> + getQueueingPolicyFieldBuilder() { + if (queueingPolicyBuilder_ == null) { + queueingPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.Builder, com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicyOrBuilder>( + getQueueingPolicy(), + getParentForChildren(), + isClean()); + queueingPolicy_ = null; + } + return queueingPolicyBuilder_; + } + + private com.google.cloud.tpu.v2alpha1.QueuedResourceState state_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState, com.google.cloud.tpu.v2alpha1.QueuedResourceState.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceStateOrBuilder> stateBuilder_; + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the state field is set. + */ + public boolean hasState() { + return stateBuilder_ != null || state_ != null; + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState getState() { + if (stateBuilder_ == null) { + return state_ == null ? com.google.cloud.tpu.v2alpha1.QueuedResourceState.getDefaultInstance() : state_; + } else { + return stateBuilder_.getMessage(); + } + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setState(com.google.cloud.tpu.v2alpha1.QueuedResourceState value) { + if (stateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + onChanged(); + } else { + stateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setState( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.Builder builderForValue) { + if (stateBuilder_ == null) { + state_ = builderForValue.build(); + onChanged(); + } else { + stateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeState(com.google.cloud.tpu.v2alpha1.QueuedResourceState value) { + if (stateBuilder_ == null) { + if (state_ != null) { + state_ = + com.google.cloud.tpu.v2alpha1.QueuedResourceState.newBuilder(state_).mergeFrom(value).buildPartial(); + } else { + state_ = value; + } + onChanged(); + } else { + stateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearState() { + if (stateBuilder_ == null) { + state_ = null; + onChanged(); + } else { + state_ = null; + stateBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.Builder getStateBuilder() { + + onChanged(); + return getStateFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceStateOrBuilder getStateOrBuilder() { + if (stateBuilder_ != null) { + return stateBuilder_.getMessageOrBuilder(); + } else { + return state_ == null ? + com.google.cloud.tpu.v2alpha1.QueuedResourceState.getDefaultInstance() : state_; + } + } + /** + *
+     * Output only. State of the QueuedResource request
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState, com.google.cloud.tpu.v2alpha1.QueuedResourceState.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceStateOrBuilder> + getStateFieldBuilder() { + if (stateBuilder_ == null) { + stateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState, com.google.cloud.tpu.v2alpha1.QueuedResourceState.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceStateOrBuilder>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResource) + private static final com.google.cloud.tpu.v2alpha1.QueuedResource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResource(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueuedResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceName.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceName.java new file mode 100644 index 000000000000..84248b824032 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class QueuedResourceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_QUEUED_RESOURCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/queuedResources/{queued_resource}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String queuedResource; + + @Deprecated + protected QueuedResourceName() { + project = null; + location = null; + queuedResource = null; + } + + private QueuedResourceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + queuedResource = Preconditions.checkNotNull(builder.getQueuedResource()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getQueuedResource() { + return queuedResource; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static QueuedResourceName of(String project, String location, String queuedResource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setQueuedResource(queuedResource) + .build(); + } + + public static String format(String project, String location, String queuedResource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setQueuedResource(queuedResource) + .build() + .toString(); + } + + public static QueuedResourceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_QUEUED_RESOURCE.validatedMatch( + formattedString, "QueuedResourceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("queued_resource")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (QueuedResourceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_QUEUED_RESOURCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (queuedResource != null) { + fieldMapBuilder.put("queued_resource", queuedResource); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_QUEUED_RESOURCE.instantiate( + "project", project, "location", location, "queued_resource", queuedResource); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + QueuedResourceName that = ((QueuedResourceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.queuedResource, that.queuedResource); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(queuedResource); + return h; + } + + /** Builder for projects/{project}/locations/{location}/queuedResources/{queued_resource}. */ + public static class Builder { + private String project; + private String location; + private String queuedResource; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getQueuedResource() { + return queuedResource; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setQueuedResource(String queuedResource) { + this.queuedResource = queuedResource; + return this; + } + + private Builder(QueuedResourceName queuedResourceName) { + this.project = queuedResourceName.project; + this.location = queuedResourceName.location; + this.queuedResource = queuedResourceName.queuedResource; + } + + public QueuedResourceName build() { + return new QueuedResourceName(this); + } + } +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceOrBuilder.java new file mode 100644 index 000000000000..2514810929eb --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceOrBuilder.java @@ -0,0 +1,168 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface QueuedResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. Immutable. The name of the QueuedResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. Immutable. The name of the QueuedResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Defines a TPU resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + * @return Whether the tpu field is set. + */ + boolean hasTpu(); + /** + *
+   * Defines a TPU resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + * @return The tpu. + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.Tpu getTpu(); + /** + *
+   * Defines a TPU resource.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Tpu tpu = 2; + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.TpuOrBuilder getTpuOrBuilder(); + + /** + *
+   * The BestEffort tier.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + * @return Whether the bestEffort field is set. + */ + boolean hasBestEffort(); + /** + *
+   * The BestEffort tier.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + * @return The bestEffort. + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffort getBestEffort(); + /** + *
+   * The BestEffort tier.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.BestEffort best_effort = 3; + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.BestEffortOrBuilder getBestEffortOrBuilder(); + + /** + *
+   * The Guaranteed tier
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + * @return Whether the guaranteed field is set. + */ + boolean hasGuaranteed(); + /** + *
+   * The Guaranteed tier
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + * @return The guaranteed. + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed getGuaranteed(); + /** + *
+   * The Guaranteed tier
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.Guaranteed guaranteed = 4; + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.GuaranteedOrBuilder getGuaranteedOrBuilder(); + + /** + *
+   * The queueing policy of the QueuedRequest.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + * @return Whether the queueingPolicy field is set. + */ + boolean hasQueueingPolicy(); + /** + *
+   * The queueing policy of the QueuedRequest.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + * @return The queueingPolicy. + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy getQueueingPolicy(); + /** + *
+   * The queueing policy of the QueuedRequest.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy queueing_policy = 5; + */ + com.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicyOrBuilder getQueueingPolicyOrBuilder(); + + /** + *
+   * Output only. State of the QueuedResource request
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the state field is set. + */ + boolean hasState(); + /** + *
+   * Output only. State of the QueuedResource request
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState getState(); + /** + *
+   * Output only. State of the QueuedResource request
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceStateOrBuilder getStateOrBuilder(); + + public com.google.cloud.tpu.v2alpha1.QueuedResource.ResourceCase getResourceCase(); + + public com.google.cloud.tpu.v2alpha1.QueuedResource.TierCase getTierCase(); +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceState.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceState.java new file mode 100644 index 000000000000..048db0e52688 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceState.java @@ -0,0 +1,6463 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * QueuedResourceState defines the details of the QueuedResource request.
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState} + */ +public final class QueuedResourceState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState) + QueuedResourceStateOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueuedResourceState.newBuilder() to construct. + private QueuedResourceState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueuedResourceState() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueuedResourceState(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.Builder.class); + } + + /** + *
+   * Output only state of the request
+   * 
+ * + * Protobuf enum {@code google.cloud.tpu.v2alpha1.QueuedResourceState.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * State of the QueuedResource request is not known/set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The QueuedResource request has been received. We're still working on
+     * determining if we will be able to honor this request.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The QueuedResource request has passed initial validation/admission
+     * control and has been persisted in the queue.
+     * 
+ * + * ACCEPTED = 2; + */ + ACCEPTED(2), + /** + *
+     * The QueuedResource request has been selected. The
+     * associated resources are currently being provisioned (or very soon
+     * will begin provisioning).
+     * 
+ * + * PROVISIONING = 3; + */ + PROVISIONING(3), + /** + *
+     * The request could not be completed. This may be due to some
+     * late-discovered problem with the request itself, or due to
+     * unavailability of resources within the constraints of the request
+     * (e.g., the 'valid until' start timing constraint expired).
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + *
+     * The QueuedResource is being deleted.
+     * 
+ * + * DELETING = 5; + */ + DELETING(5), + /** + *
+     * The resources specified in the QueuedResource request have been
+     * provisioned and are ready for use by the end-user/consumer.
+     * 
+ * + * ACTIVE = 6; + */ + ACTIVE(6), + /** + *
+     * The resources specified in the QueuedResource request are being
+     * deleted. This may have been initiated by the user, or
+     * the Cloud TPU service. Inspect the state data for more details.
+     * 
+ * + * SUSPENDING = 7; + */ + SUSPENDING(7), + /** + *
+     * The resources specified in the QueuedResource request have been
+     * deleted.
+     * 
+ * + * SUSPENDED = 8; + */ + SUSPENDED(8), + UNRECOGNIZED(-1), + ; + + /** + *
+     * State of the QueuedResource request is not known/set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The QueuedResource request has been received. We're still working on
+     * determining if we will be able to honor this request.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The QueuedResource request has passed initial validation/admission
+     * control and has been persisted in the queue.
+     * 
+ * + * ACCEPTED = 2; + */ + public static final int ACCEPTED_VALUE = 2; + /** + *
+     * The QueuedResource request has been selected. The
+     * associated resources are currently being provisioned (or very soon
+     * will begin provisioning).
+     * 
+ * + * PROVISIONING = 3; + */ + public static final int PROVISIONING_VALUE = 3; + /** + *
+     * The request could not be completed. This may be due to some
+     * late-discovered problem with the request itself, or due to
+     * unavailability of resources within the constraints of the request
+     * (e.g., the 'valid until' start timing constraint expired).
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + *
+     * The QueuedResource is being deleted.
+     * 
+ * + * DELETING = 5; + */ + public static final int DELETING_VALUE = 5; + /** + *
+     * The resources specified in the QueuedResource request have been
+     * provisioned and are ready for use by the end-user/consumer.
+     * 
+ * + * ACTIVE = 6; + */ + public static final int ACTIVE_VALUE = 6; + /** + *
+     * The resources specified in the QueuedResource request are being
+     * deleted. This may have been initiated by the user, or
+     * the Cloud TPU service. Inspect the state data for more details.
+     * 
+ * + * SUSPENDING = 7; + */ + public static final int SUSPENDING_VALUE = 7; + /** + *
+     * The resources specified in the QueuedResource request have been
+     * deleted.
+     * 
+ * + * SUSPENDED = 8; + */ + public static final int SUSPENDED_VALUE = 8; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return ACCEPTED; + case 3: return PROVISIONING; + case 4: return FAILED; + case 5: return DELETING; + case 6: return ACTIVE; + case 7: return SUSPENDING; + case 8: return SUSPENDED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.State) + } + + public interface CreatingDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Further data for the creating state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData} + */ + public static final class CreatingData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) + CreatingDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatingData.newBuilder() to construct. + private CreatingData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreatingData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreatingData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_CreatingData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_CreatingData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_CreatingData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_CreatingData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_CreatingData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatingData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AcceptedDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Further data for the accepted state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData} + */ + public static final class AcceptedData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) + AcceptedDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcceptedData.newBuilder() to construct. + private AcceptedData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AcceptedData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AcceptedData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_AcceptedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_AcceptedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_AcceptedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_AcceptedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_AcceptedData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptedData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProvisioningDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Further data for the provisioning state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData} + */ + public static final class ProvisioningData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) + ProvisioningDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProvisioningData.newBuilder() to construct. + private ProvisioningData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProvisioningData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProvisioningData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ProvisioningData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ProvisioningData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ProvisioningData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ProvisioningData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ProvisioningData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProvisioningData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FailedDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The error that caused the queued resource to enter the FAILED state.
+     * 
+ * + * .google.rpc.Status error = 1; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+     * The error that caused the queued resource to enter the FAILED state.
+     * 
+ * + * .google.rpc.Status error = 1; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+     * The error that caused the queued resource to enter the FAILED state.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + } + /** + *
+   * Further data for the failed state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData} + */ + public static final class FailedData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) + FailedDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use FailedData.newBuilder() to construct. + private FailedData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FailedData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FailedData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_FailedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_FailedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.Builder.class); + } + + public static final int ERROR_FIELD_NUMBER = 1; + private com.google.rpc.Status error_; + /** + *
+     * The error that caused the queued resource to enter the FAILED state.
+     * 
+ * + * .google.rpc.Status error = 1; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+     * The error that caused the queued resource to enter the FAILED state.
+     * 
+ * + * .google.rpc.Status error = 1; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+     * The error that caused the queued resource to enter the FAILED state.
+     * 
+ * + * .google.rpc.Status error = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (error_ != null) { + output.writeMessage(1, getError()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getError()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) obj; + + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_FailedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_FailedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_FailedData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData(this); + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance()) return this; + if (other.hasError()) { + mergeError(other.getError()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+       * The error that caused the queued resource to enter the FAILED state.
+       * 
+ * + * .google.rpc.Status error = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FailedData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeletingDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Further data for the deleting state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData} + */ + public static final class DeletingData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) + DeletingDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletingData.newBuilder() to construct. + private DeletingData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeletingData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeletingData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_DeletingData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_DeletingData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_DeletingData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_DeletingData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_DeletingData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletingData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ActiveDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Further data for the active state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData} + */ + public static final class ActiveData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) + ActiveDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActiveData.newBuilder() to construct. + private ActiveData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ActiveData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ActiveData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ActiveData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ActiveData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ActiveData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ActiveData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_ActiveData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SuspendingDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Further data for the suspending state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData} + */ + public static final class SuspendingData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) + SuspendingDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use SuspendingData.newBuilder() to construct. + private SuspendingData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SuspendingData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SuspendingData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendingData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendingData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendingData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendingData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendingData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SuspendingData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SuspendedDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Further data for the suspended state.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData} + */ + public static final class SuspendedData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) + SuspendedDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use SuspendedData.newBuilder() to construct. + private SuspendedData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SuspendedData() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SuspendedData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_SuspendedData_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SuspendedData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int stateDataCase_ = 0; + private java.lang.Object stateData_; + public enum StateDataCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CREATING_DATA(2), + ACCEPTED_DATA(3), + PROVISIONING_DATA(4), + FAILED_DATA(5), + DELETING_DATA(6), + ACTIVE_DATA(7), + SUSPENDING_DATA(8), + SUSPENDED_DATA(9), + STATEDATA_NOT_SET(0); + private final int value; + private StateDataCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StateDataCase valueOf(int value) { + return forNumber(value); + } + + public static StateDataCase forNumber(int value) { + switch (value) { + case 2: return CREATING_DATA; + case 3: return ACCEPTED_DATA; + case 4: return PROVISIONING_DATA; + case 5: return FAILED_DATA; + case 6: return DELETING_DATA; + case 7: return ACTIVE_DATA; + case 8: return SUSPENDING_DATA; + case 9: return SUSPENDED_DATA; + case 0: return STATEDATA_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public StateDataCase + getStateDataCase() { + return StateDataCase.forNumber( + stateDataCase_); + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * State of the QueuedResource request.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * State of the QueuedResource request.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.tpu.v2alpha1.QueuedResourceState.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2alpha1.QueuedResourceState.State result = com.google.cloud.tpu.v2alpha1.QueuedResourceState.State.valueOf(state_); + return result == null ? com.google.cloud.tpu.v2alpha1.QueuedResourceState.State.UNRECOGNIZED : result; + } + + public static final int CREATING_DATA_FIELD_NUMBER = 2; + /** + *
+   * Further data for the creating state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + * @return Whether the creatingData field is set. + */ + @java.lang.Override + public boolean hasCreatingData() { + return stateDataCase_ == 2; + } + /** + *
+   * Further data for the creating state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + * @return The creatingData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData getCreatingData() { + if (stateDataCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance(); + } + /** + *
+   * Further data for the creating state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingDataOrBuilder getCreatingDataOrBuilder() { + if (stateDataCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance(); + } + + public static final int ACCEPTED_DATA_FIELD_NUMBER = 3; + /** + *
+   * Further data for the accepted state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + * @return Whether the acceptedData field is set. + */ + @java.lang.Override + public boolean hasAcceptedData() { + return stateDataCase_ == 3; + } + /** + *
+   * Further data for the accepted state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + * @return The acceptedData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData getAcceptedData() { + if (stateDataCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance(); + } + /** + *
+   * Further data for the accepted state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedDataOrBuilder getAcceptedDataOrBuilder() { + if (stateDataCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance(); + } + + public static final int PROVISIONING_DATA_FIELD_NUMBER = 4; + /** + *
+   * Further data for the provisioning state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + * @return Whether the provisioningData field is set. + */ + @java.lang.Override + public boolean hasProvisioningData() { + return stateDataCase_ == 4; + } + /** + *
+   * Further data for the provisioning state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + * @return The provisioningData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData getProvisioningData() { + if (stateDataCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance(); + } + /** + *
+   * Further data for the provisioning state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningDataOrBuilder getProvisioningDataOrBuilder() { + if (stateDataCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance(); + } + + public static final int FAILED_DATA_FIELD_NUMBER = 5; + /** + *
+   * Further data for the failed state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + * @return Whether the failedData field is set. + */ + @java.lang.Override + public boolean hasFailedData() { + return stateDataCase_ == 5; + } + /** + *
+   * Further data for the failed state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + * @return The failedData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData getFailedData() { + if (stateDataCase_ == 5) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance(); + } + /** + *
+   * Further data for the failed state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedDataOrBuilder getFailedDataOrBuilder() { + if (stateDataCase_ == 5) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance(); + } + + public static final int DELETING_DATA_FIELD_NUMBER = 6; + /** + *
+   * Further data for the deleting state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + * @return Whether the deletingData field is set. + */ + @java.lang.Override + public boolean hasDeletingData() { + return stateDataCase_ == 6; + } + /** + *
+   * Further data for the deleting state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + * @return The deletingData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData getDeletingData() { + if (stateDataCase_ == 6) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance(); + } + /** + *
+   * Further data for the deleting state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingDataOrBuilder getDeletingDataOrBuilder() { + if (stateDataCase_ == 6) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance(); + } + + public static final int ACTIVE_DATA_FIELD_NUMBER = 7; + /** + *
+   * Further data for the active state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + * @return Whether the activeData field is set. + */ + @java.lang.Override + public boolean hasActiveData() { + return stateDataCase_ == 7; + } + /** + *
+   * Further data for the active state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + * @return The activeData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData getActiveData() { + if (stateDataCase_ == 7) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance(); + } + /** + *
+   * Further data for the active state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveDataOrBuilder getActiveDataOrBuilder() { + if (stateDataCase_ == 7) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance(); + } + + public static final int SUSPENDING_DATA_FIELD_NUMBER = 8; + /** + *
+   * Further data for the suspending state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + * @return Whether the suspendingData field is set. + */ + @java.lang.Override + public boolean hasSuspendingData() { + return stateDataCase_ == 8; + } + /** + *
+   * Further data for the suspending state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + * @return The suspendingData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData getSuspendingData() { + if (stateDataCase_ == 8) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance(); + } + /** + *
+   * Further data for the suspending state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingDataOrBuilder getSuspendingDataOrBuilder() { + if (stateDataCase_ == 8) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance(); + } + + public static final int SUSPENDED_DATA_FIELD_NUMBER = 9; + /** + *
+   * Further data for the suspended state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + * @return Whether the suspendedData field is set. + */ + @java.lang.Override + public boolean hasSuspendedData() { + return stateDataCase_ == 9; + } + /** + *
+   * Further data for the suspended state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + * @return The suspendedData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData getSuspendedData() { + if (stateDataCase_ == 9) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance(); + } + /** + *
+   * Further data for the suspended state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedDataOrBuilder getSuspendedDataOrBuilder() { + if (stateDataCase_ == 9) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (stateDataCase_ == 2) { + output.writeMessage(2, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_); + } + if (stateDataCase_ == 3) { + output.writeMessage(3, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_); + } + if (stateDataCase_ == 4) { + output.writeMessage(4, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_); + } + if (stateDataCase_ == 5) { + output.writeMessage(5, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_); + } + if (stateDataCase_ == 6) { + output.writeMessage(6, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_); + } + if (stateDataCase_ == 7) { + output.writeMessage(7, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_); + } + if (stateDataCase_ == 8) { + output.writeMessage(8, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_); + } + if (stateDataCase_ == 9) { + output.writeMessage(9, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (stateDataCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_); + } + if (stateDataCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_); + } + if (stateDataCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_); + } + if (stateDataCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_); + } + if (stateDataCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_); + } + if (stateDataCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_); + } + if (stateDataCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_); + } + if (stateDataCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.QueuedResourceState other = (com.google.cloud.tpu.v2alpha1.QueuedResourceState) obj; + + if (state_ != other.state_) return false; + if (!getStateDataCase().equals(other.getStateDataCase())) return false; + switch (stateDataCase_) { + case 2: + if (!getCreatingData() + .equals(other.getCreatingData())) return false; + break; + case 3: + if (!getAcceptedData() + .equals(other.getAcceptedData())) return false; + break; + case 4: + if (!getProvisioningData() + .equals(other.getProvisioningData())) return false; + break; + case 5: + if (!getFailedData() + .equals(other.getFailedData())) return false; + break; + case 6: + if (!getDeletingData() + .equals(other.getDeletingData())) return false; + break; + case 7: + if (!getActiveData() + .equals(other.getActiveData())) return false; + break; + case 8: + if (!getSuspendingData() + .equals(other.getSuspendingData())) return false; + break; + case 9: + if (!getSuspendedData() + .equals(other.getSuspendedData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (stateDataCase_) { + case 2: + hash = (37 * hash) + CREATING_DATA_FIELD_NUMBER; + hash = (53 * hash) + getCreatingData().hashCode(); + break; + case 3: + hash = (37 * hash) + ACCEPTED_DATA_FIELD_NUMBER; + hash = (53 * hash) + getAcceptedData().hashCode(); + break; + case 4: + hash = (37 * hash) + PROVISIONING_DATA_FIELD_NUMBER; + hash = (53 * hash) + getProvisioningData().hashCode(); + break; + case 5: + hash = (37 * hash) + FAILED_DATA_FIELD_NUMBER; + hash = (53 * hash) + getFailedData().hashCode(); + break; + case 6: + hash = (37 * hash) + DELETING_DATA_FIELD_NUMBER; + hash = (53 * hash) + getDeletingData().hashCode(); + break; + case 7: + hash = (37 * hash) + ACTIVE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getActiveData().hashCode(); + break; + case 8: + hash = (37 * hash) + SUSPENDING_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSuspendingData().hashCode(); + break; + case 9: + hash = (37 * hash) + SUSPENDED_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSuspendedData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.QueuedResourceState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * QueuedResourceState defines the details of the QueuedResource request.
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.QueuedResourceState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.QueuedResourceState) + com.google.cloud.tpu.v2alpha1.QueuedResourceStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.class, com.google.cloud.tpu.v2alpha1.QueuedResourceState.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.QueuedResourceState.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (creatingDataBuilder_ != null) { + creatingDataBuilder_.clear(); + } + if (acceptedDataBuilder_ != null) { + acceptedDataBuilder_.clear(); + } + if (provisioningDataBuilder_ != null) { + provisioningDataBuilder_.clear(); + } + if (failedDataBuilder_ != null) { + failedDataBuilder_.clear(); + } + if (deletingDataBuilder_ != null) { + deletingDataBuilder_.clear(); + } + if (activeDataBuilder_ != null) { + activeDataBuilder_.clear(); + } + if (suspendingDataBuilder_ != null) { + suspendingDataBuilder_.clear(); + } + if (suspendedDataBuilder_ != null) { + suspendedDataBuilder_.clear(); + } + stateDataCase_ = 0; + stateData_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_QueuedResourceState_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState build() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState buildPartial() { + com.google.cloud.tpu.v2alpha1.QueuedResourceState result = new com.google.cloud.tpu.v2alpha1.QueuedResourceState(this); + result.state_ = state_; + if (stateDataCase_ == 2) { + if (creatingDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = creatingDataBuilder_.build(); + } + } + if (stateDataCase_ == 3) { + if (acceptedDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = acceptedDataBuilder_.build(); + } + } + if (stateDataCase_ == 4) { + if (provisioningDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = provisioningDataBuilder_.build(); + } + } + if (stateDataCase_ == 5) { + if (failedDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = failedDataBuilder_.build(); + } + } + if (stateDataCase_ == 6) { + if (deletingDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = deletingDataBuilder_.build(); + } + } + if (stateDataCase_ == 7) { + if (activeDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = activeDataBuilder_.build(); + } + } + if (stateDataCase_ == 8) { + if (suspendingDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = suspendingDataBuilder_.build(); + } + } + if (stateDataCase_ == 9) { + if (suspendedDataBuilder_ == null) { + result.stateData_ = stateData_; + } else { + result.stateData_ = suspendedDataBuilder_.build(); + } + } + result.stateDataCase_ = stateDataCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.QueuedResourceState) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.QueuedResourceState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.QueuedResourceState other) { + if (other == com.google.cloud.tpu.v2alpha1.QueuedResourceState.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getStateDataCase()) { + case CREATING_DATA: { + mergeCreatingData(other.getCreatingData()); + break; + } + case ACCEPTED_DATA: { + mergeAcceptedData(other.getAcceptedData()); + break; + } + case PROVISIONING_DATA: { + mergeProvisioningData(other.getProvisioningData()); + break; + } + case FAILED_DATA: { + mergeFailedData(other.getFailedData()); + break; + } + case DELETING_DATA: { + mergeDeletingData(other.getDeletingData()); + break; + } + case ACTIVE_DATA: { + mergeActiveData(other.getActiveData()); + break; + } + case SUSPENDING_DATA: { + mergeSuspendingData(other.getSuspendingData()); + break; + } + case SUSPENDED_DATA: { + mergeSuspendedData(other.getSuspendedData()); + break; + } + case STATEDATA_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + state_ = input.readEnum(); + + break; + } // case 8 + case 18: { + input.readMessage( + getCreatingDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getAcceptedDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getProvisioningDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getFailedDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getDeletingDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getActiveDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 7; + break; + } // case 58 + case 66: { + input.readMessage( + getSuspendingDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getSuspendedDataFieldBuilder().getBuilder(), + extensionRegistry); + stateDataCase_ = 9; + break; + } // case 74 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int stateDataCase_ = 0; + private java.lang.Object stateData_; + public StateDataCase + getStateDataCase() { + return StateDataCase.forNumber( + stateDataCase_); + } + + public Builder clearStateData() { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + return this; + } + + + private int state_ = 0; + /** + *
+     * State of the QueuedResource request.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * State of the QueuedResource request.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * State of the QueuedResource request.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.tpu.v2alpha1.QueuedResourceState.State result = com.google.cloud.tpu.v2alpha1.QueuedResourceState.State.valueOf(state_); + return result == null ? com.google.cloud.tpu.v2alpha1.QueuedResourceState.State.UNRECOGNIZED : result; + } + /** + *
+     * State of the QueuedResource request.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.tpu.v2alpha1.QueuedResourceState.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * State of the QueuedResource request.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingDataOrBuilder> creatingDataBuilder_; + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + * @return Whether the creatingData field is set. + */ + @java.lang.Override + public boolean hasCreatingData() { + return stateDataCase_ == 2; + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + * @return The creatingData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData getCreatingData() { + if (creatingDataBuilder_ == null) { + if (stateDataCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance(); + } else { + if (stateDataCase_ == 2) { + return creatingDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + public Builder setCreatingData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData value) { + if (creatingDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + creatingDataBuilder_.setMessage(value); + } + stateDataCase_ = 2; + return this; + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + public Builder setCreatingData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.Builder builderForValue) { + if (creatingDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + creatingDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 2; + return this; + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + public Builder mergeCreatingData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData value) { + if (creatingDataBuilder_ == null) { + if (stateDataCase_ == 2 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 2) { + creatingDataBuilder_.mergeFrom(value); + } else { + creatingDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 2; + return this; + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + public Builder clearCreatingData() { + if (creatingDataBuilder_ == null) { + if (stateDataCase_ == 2) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 2) { + stateDataCase_ = 0; + stateData_ = null; + } + creatingDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.Builder getCreatingDataBuilder() { + return getCreatingDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingDataOrBuilder getCreatingDataOrBuilder() { + if ((stateDataCase_ == 2) && (creatingDataBuilder_ != null)) { + return creatingDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 2) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the creating state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingDataOrBuilder> + getCreatingDataFieldBuilder() { + if (creatingDataBuilder_ == null) { + if (!(stateDataCase_ == 2)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.getDefaultInstance(); + } + creatingDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 2; + onChanged();; + return creatingDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedDataOrBuilder> acceptedDataBuilder_; + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + * @return Whether the acceptedData field is set. + */ + @java.lang.Override + public boolean hasAcceptedData() { + return stateDataCase_ == 3; + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + * @return The acceptedData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData getAcceptedData() { + if (acceptedDataBuilder_ == null) { + if (stateDataCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance(); + } else { + if (stateDataCase_ == 3) { + return acceptedDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + public Builder setAcceptedData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData value) { + if (acceptedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + acceptedDataBuilder_.setMessage(value); + } + stateDataCase_ = 3; + return this; + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + public Builder setAcceptedData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.Builder builderForValue) { + if (acceptedDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + acceptedDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 3; + return this; + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + public Builder mergeAcceptedData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData value) { + if (acceptedDataBuilder_ == null) { + if (stateDataCase_ == 3 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 3) { + acceptedDataBuilder_.mergeFrom(value); + } else { + acceptedDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 3; + return this; + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + public Builder clearAcceptedData() { + if (acceptedDataBuilder_ == null) { + if (stateDataCase_ == 3) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 3) { + stateDataCase_ = 0; + stateData_ = null; + } + acceptedDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.Builder getAcceptedDataBuilder() { + return getAcceptedDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedDataOrBuilder getAcceptedDataOrBuilder() { + if ((stateDataCase_ == 3) && (acceptedDataBuilder_ != null)) { + return acceptedDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 3) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the accepted state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedDataOrBuilder> + getAcceptedDataFieldBuilder() { + if (acceptedDataBuilder_ == null) { + if (!(stateDataCase_ == 3)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.getDefaultInstance(); + } + acceptedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 3; + onChanged();; + return acceptedDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningDataOrBuilder> provisioningDataBuilder_; + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + * @return Whether the provisioningData field is set. + */ + @java.lang.Override + public boolean hasProvisioningData() { + return stateDataCase_ == 4; + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + * @return The provisioningData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData getProvisioningData() { + if (provisioningDataBuilder_ == null) { + if (stateDataCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance(); + } else { + if (stateDataCase_ == 4) { + return provisioningDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + public Builder setProvisioningData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData value) { + if (provisioningDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + provisioningDataBuilder_.setMessage(value); + } + stateDataCase_ = 4; + return this; + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + public Builder setProvisioningData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.Builder builderForValue) { + if (provisioningDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + provisioningDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 4; + return this; + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + public Builder mergeProvisioningData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData value) { + if (provisioningDataBuilder_ == null) { + if (stateDataCase_ == 4 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 4) { + provisioningDataBuilder_.mergeFrom(value); + } else { + provisioningDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 4; + return this; + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + public Builder clearProvisioningData() { + if (provisioningDataBuilder_ == null) { + if (stateDataCase_ == 4) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 4) { + stateDataCase_ = 0; + stateData_ = null; + } + provisioningDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.Builder getProvisioningDataBuilder() { + return getProvisioningDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningDataOrBuilder getProvisioningDataOrBuilder() { + if ((stateDataCase_ == 4) && (provisioningDataBuilder_ != null)) { + return provisioningDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 4) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the provisioning state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningDataOrBuilder> + getProvisioningDataFieldBuilder() { + if (provisioningDataBuilder_ == null) { + if (!(stateDataCase_ == 4)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.getDefaultInstance(); + } + provisioningDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 4; + onChanged();; + return provisioningDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedDataOrBuilder> failedDataBuilder_; + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + * @return Whether the failedData field is set. + */ + @java.lang.Override + public boolean hasFailedData() { + return stateDataCase_ == 5; + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + * @return The failedData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData getFailedData() { + if (failedDataBuilder_ == null) { + if (stateDataCase_ == 5) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance(); + } else { + if (stateDataCase_ == 5) { + return failedDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + public Builder setFailedData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData value) { + if (failedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + failedDataBuilder_.setMessage(value); + } + stateDataCase_ = 5; + return this; + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + public Builder setFailedData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.Builder builderForValue) { + if (failedDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + failedDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 5; + return this; + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + public Builder mergeFailedData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData value) { + if (failedDataBuilder_ == null) { + if (stateDataCase_ == 5 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 5) { + failedDataBuilder_.mergeFrom(value); + } else { + failedDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 5; + return this; + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + public Builder clearFailedData() { + if (failedDataBuilder_ == null) { + if (stateDataCase_ == 5) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 5) { + stateDataCase_ = 0; + stateData_ = null; + } + failedDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.Builder getFailedDataBuilder() { + return getFailedDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedDataOrBuilder getFailedDataOrBuilder() { + if ((stateDataCase_ == 5) && (failedDataBuilder_ != null)) { + return failedDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 5) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the failed state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedDataOrBuilder> + getFailedDataFieldBuilder() { + if (failedDataBuilder_ == null) { + if (!(stateDataCase_ == 5)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.getDefaultInstance(); + } + failedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 5; + onChanged();; + return failedDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingDataOrBuilder> deletingDataBuilder_; + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + * @return Whether the deletingData field is set. + */ + @java.lang.Override + public boolean hasDeletingData() { + return stateDataCase_ == 6; + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + * @return The deletingData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData getDeletingData() { + if (deletingDataBuilder_ == null) { + if (stateDataCase_ == 6) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance(); + } else { + if (stateDataCase_ == 6) { + return deletingDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + public Builder setDeletingData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData value) { + if (deletingDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + deletingDataBuilder_.setMessage(value); + } + stateDataCase_ = 6; + return this; + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + public Builder setDeletingData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.Builder builderForValue) { + if (deletingDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + deletingDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 6; + return this; + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + public Builder mergeDeletingData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData value) { + if (deletingDataBuilder_ == null) { + if (stateDataCase_ == 6 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 6) { + deletingDataBuilder_.mergeFrom(value); + } else { + deletingDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 6; + return this; + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + public Builder clearDeletingData() { + if (deletingDataBuilder_ == null) { + if (stateDataCase_ == 6) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 6) { + stateDataCase_ = 0; + stateData_ = null; + } + deletingDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.Builder getDeletingDataBuilder() { + return getDeletingDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingDataOrBuilder getDeletingDataOrBuilder() { + if ((stateDataCase_ == 6) && (deletingDataBuilder_ != null)) { + return deletingDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 6) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the deleting state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingDataOrBuilder> + getDeletingDataFieldBuilder() { + if (deletingDataBuilder_ == null) { + if (!(stateDataCase_ == 6)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.getDefaultInstance(); + } + deletingDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 6; + onChanged();; + return deletingDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveDataOrBuilder> activeDataBuilder_; + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + * @return Whether the activeData field is set. + */ + @java.lang.Override + public boolean hasActiveData() { + return stateDataCase_ == 7; + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + * @return The activeData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData getActiveData() { + if (activeDataBuilder_ == null) { + if (stateDataCase_ == 7) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance(); + } else { + if (stateDataCase_ == 7) { + return activeDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + public Builder setActiveData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData value) { + if (activeDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + activeDataBuilder_.setMessage(value); + } + stateDataCase_ = 7; + return this; + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + public Builder setActiveData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.Builder builderForValue) { + if (activeDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + activeDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 7; + return this; + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + public Builder mergeActiveData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData value) { + if (activeDataBuilder_ == null) { + if (stateDataCase_ == 7 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 7) { + activeDataBuilder_.mergeFrom(value); + } else { + activeDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 7; + return this; + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + public Builder clearActiveData() { + if (activeDataBuilder_ == null) { + if (stateDataCase_ == 7) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 7) { + stateDataCase_ = 0; + stateData_ = null; + } + activeDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.Builder getActiveDataBuilder() { + return getActiveDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveDataOrBuilder getActiveDataOrBuilder() { + if ((stateDataCase_ == 7) && (activeDataBuilder_ != null)) { + return activeDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 7) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the active state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveDataOrBuilder> + getActiveDataFieldBuilder() { + if (activeDataBuilder_ == null) { + if (!(stateDataCase_ == 7)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.getDefaultInstance(); + } + activeDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 7; + onChanged();; + return activeDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingDataOrBuilder> suspendingDataBuilder_; + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + * @return Whether the suspendingData field is set. + */ + @java.lang.Override + public boolean hasSuspendingData() { + return stateDataCase_ == 8; + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + * @return The suspendingData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData getSuspendingData() { + if (suspendingDataBuilder_ == null) { + if (stateDataCase_ == 8) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance(); + } else { + if (stateDataCase_ == 8) { + return suspendingDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + public Builder setSuspendingData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData value) { + if (suspendingDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + suspendingDataBuilder_.setMessage(value); + } + stateDataCase_ = 8; + return this; + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + public Builder setSuspendingData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.Builder builderForValue) { + if (suspendingDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + suspendingDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 8; + return this; + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + public Builder mergeSuspendingData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData value) { + if (suspendingDataBuilder_ == null) { + if (stateDataCase_ == 8 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 8) { + suspendingDataBuilder_.mergeFrom(value); + } else { + suspendingDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 8; + return this; + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + public Builder clearSuspendingData() { + if (suspendingDataBuilder_ == null) { + if (stateDataCase_ == 8) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 8) { + stateDataCase_ = 0; + stateData_ = null; + } + suspendingDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.Builder getSuspendingDataBuilder() { + return getSuspendingDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingDataOrBuilder getSuspendingDataOrBuilder() { + if ((stateDataCase_ == 8) && (suspendingDataBuilder_ != null)) { + return suspendingDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 8) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the suspending state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingDataOrBuilder> + getSuspendingDataFieldBuilder() { + if (suspendingDataBuilder_ == null) { + if (!(stateDataCase_ == 8)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.getDefaultInstance(); + } + suspendingDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 8; + onChanged();; + return suspendingDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedDataOrBuilder> suspendedDataBuilder_; + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + * @return Whether the suspendedData field is set. + */ + @java.lang.Override + public boolean hasSuspendedData() { + return stateDataCase_ == 9; + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + * @return The suspendedData. + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData getSuspendedData() { + if (suspendedDataBuilder_ == null) { + if (stateDataCase_ == 9) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance(); + } else { + if (stateDataCase_ == 9) { + return suspendedDataBuilder_.getMessage(); + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + public Builder setSuspendedData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData value) { + if (suspendedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateData_ = value; + onChanged(); + } else { + suspendedDataBuilder_.setMessage(value); + } + stateDataCase_ = 9; + return this; + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + public Builder setSuspendedData( + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.Builder builderForValue) { + if (suspendedDataBuilder_ == null) { + stateData_ = builderForValue.build(); + onChanged(); + } else { + suspendedDataBuilder_.setMessage(builderForValue.build()); + } + stateDataCase_ = 9; + return this; + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + public Builder mergeSuspendedData(com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData value) { + if (suspendedDataBuilder_ == null) { + if (stateDataCase_ == 9 && + stateData_ != com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance()) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.newBuilder((com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_) + .mergeFrom(value).buildPartial(); + } else { + stateData_ = value; + } + onChanged(); + } else { + if (stateDataCase_ == 9) { + suspendedDataBuilder_.mergeFrom(value); + } else { + suspendedDataBuilder_.setMessage(value); + } + } + stateDataCase_ = 9; + return this; + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + public Builder clearSuspendedData() { + if (suspendedDataBuilder_ == null) { + if (stateDataCase_ == 9) { + stateDataCase_ = 0; + stateData_ = null; + onChanged(); + } + } else { + if (stateDataCase_ == 9) { + stateDataCase_ = 0; + stateData_ = null; + } + suspendedDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.Builder getSuspendedDataBuilder() { + return getSuspendedDataFieldBuilder().getBuilder(); + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedDataOrBuilder getSuspendedDataOrBuilder() { + if ((stateDataCase_ == 9) && (suspendedDataBuilder_ != null)) { + return suspendedDataBuilder_.getMessageOrBuilder(); + } else { + if (stateDataCase_ == 9) { + return (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_; + } + return com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance(); + } + } + /** + *
+     * Further data for the suspended state.
+     * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedDataOrBuilder> + getSuspendedDataFieldBuilder() { + if (suspendedDataBuilder_ == null) { + if (!(stateDataCase_ == 9)) { + stateData_ = com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.getDefaultInstance(); + } + suspendedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData.Builder, com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedDataOrBuilder>( + (com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData) stateData_, + getParentForChildren(), + isClean()); + stateData_ = null; + } + stateDataCase_ = 9; + onChanged();; + return suspendedDataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.QueuedResourceState) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.QueuedResourceState) + private static final com.google.cloud.tpu.v2alpha1.QueuedResourceState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.QueuedResourceState(); + } + + public static com.google.cloud.tpu.v2alpha1.QueuedResourceState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueuedResourceState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.QueuedResourceState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceStateOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceStateOrBuilder.java new file mode 100644 index 000000000000..22322f40f69a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/QueuedResourceStateOrBuilder.java @@ -0,0 +1,246 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface QueuedResourceStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.QueuedResourceState) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * State of the QueuedResource request.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * State of the QueuedResource request.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.State state = 1; + * @return The state. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.State getState(); + + /** + *
+   * Further data for the creating state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + * @return Whether the creatingData field is set. + */ + boolean hasCreatingData(); + /** + *
+   * Further data for the creating state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + * @return The creatingData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData getCreatingData(); + /** + *
+   * Further data for the creating state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingData creating_data = 2; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.CreatingDataOrBuilder getCreatingDataOrBuilder(); + + /** + *
+   * Further data for the accepted state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + * @return Whether the acceptedData field is set. + */ + boolean hasAcceptedData(); + /** + *
+   * Further data for the accepted state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + * @return The acceptedData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData getAcceptedData(); + /** + *
+   * Further data for the accepted state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedData accepted_data = 3; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.AcceptedDataOrBuilder getAcceptedDataOrBuilder(); + + /** + *
+   * Further data for the provisioning state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + * @return Whether the provisioningData field is set. + */ + boolean hasProvisioningData(); + /** + *
+   * Further data for the provisioning state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + * @return The provisioningData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData getProvisioningData(); + /** + *
+   * Further data for the provisioning state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningData provisioning_data = 4; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ProvisioningDataOrBuilder getProvisioningDataOrBuilder(); + + /** + *
+   * Further data for the failed state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + * @return Whether the failedData field is set. + */ + boolean hasFailedData(); + /** + *
+   * Further data for the failed state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + * @return The failedData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData getFailedData(); + /** + *
+   * Further data for the failed state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.FailedData failed_data = 5; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.FailedDataOrBuilder getFailedDataOrBuilder(); + + /** + *
+   * Further data for the deleting state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + * @return Whether the deletingData field is set. + */ + boolean hasDeletingData(); + /** + *
+   * Further data for the deleting state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + * @return The deletingData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData getDeletingData(); + /** + *
+   * Further data for the deleting state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingData deleting_data = 6; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.DeletingDataOrBuilder getDeletingDataOrBuilder(); + + /** + *
+   * Further data for the active state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + * @return Whether the activeData field is set. + */ + boolean hasActiveData(); + /** + *
+   * Further data for the active state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + * @return The activeData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData getActiveData(); + /** + *
+   * Further data for the active state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveData active_data = 7; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.ActiveDataOrBuilder getActiveDataOrBuilder(); + + /** + *
+   * Further data for the suspending state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + * @return Whether the suspendingData field is set. + */ + boolean hasSuspendingData(); + /** + *
+   * Further data for the suspending state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + * @return The suspendingData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData getSuspendingData(); + /** + *
+   * Further data for the suspending state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingData suspending_data = 8; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendingDataOrBuilder getSuspendingDataOrBuilder(); + + /** + *
+   * Further data for the suspended state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + * @return Whether the suspendedData field is set. + */ + boolean hasSuspendedData(); + /** + *
+   * Further data for the suspended state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + * @return The suspendedData. + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData getSuspendedData(); + /** + *
+   * Further data for the suspended state.
+   * 
+ * + * .google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedData suspended_data = 9; + */ + com.google.cloud.tpu.v2alpha1.QueuedResourceState.SuspendedDataOrBuilder getSuspendedDataOrBuilder(); + + public com.google.cloud.tpu.v2alpha1.QueuedResourceState.StateDataCase getStateDataCase(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersion.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersion.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersion.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersion.java index e807de6b1fcc..e21251a63412 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersion.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersion.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A runtime version that a Node can be configured with.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.RuntimeVersion} */ -public final class RuntimeVersion extends com.google.protobuf.GeneratedMessageV3 - implements +public final class RuntimeVersion extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.RuntimeVersion) RuntimeVersionOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use RuntimeVersion.newBuilder() to construct. private RuntimeVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RuntimeVersion() { name_ = ""; version_ = ""; @@ -44,41 +26,37 @@ private RuntimeVersion() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new RuntimeVersion(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.RuntimeVersion.class, - com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder.class); + com.google.cloud.tpu.v2alpha1.RuntimeVersion.class, com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ @java.lang.Override @@ -87,29 +65,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -120,14 +98,11 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VERSION_FIELD_NUMBER = 2; private volatile java.lang.Object version_; /** - * - * *
    * The runtime version.
    * 
* * string version = 2; - * * @return The version. */ @java.lang.Override @@ -136,29 +111,29 @@ public java.lang.String getVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; } } /** - * - * *
    * The runtime version.
    * 
* * string version = 2; - * * @return The bytes for version. */ @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { + public com.google.protobuf.ByteString + getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); version_ = b; return b; } else { @@ -167,7 +142,6 @@ public com.google.protobuf.ByteString getVersionBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -179,7 +153,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -209,16 +184,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.RuntimeVersion)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.RuntimeVersion other = - (com.google.cloud.tpu.v2alpha1.RuntimeVersion) obj; + com.google.cloud.tpu.v2alpha1.RuntimeVersion other = (com.google.cloud.tpu.v2alpha1.RuntimeVersion) obj; - if (!getName().equals(other.getName())) return false; - if (!getVersion().equals(other.getVersion())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -239,136 +215,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.RuntimeVersion parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.RuntimeVersion prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A runtime version that a Node can be configured with.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.RuntimeVersion} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.RuntimeVersion) com.google.cloud.tpu.v2alpha1.RuntimeVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.RuntimeVersion.class, - com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder.class); + com.google.cloud.tpu.v2alpha1.RuntimeVersion.class, com.google.cloud.tpu.v2alpha1.RuntimeVersion.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.RuntimeVersion.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -380,9 +350,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_RuntimeVersion_descriptor; } @java.lang.Override @@ -401,8 +371,7 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.RuntimeVersion buildPartial() { - com.google.cloud.tpu.v2alpha1.RuntimeVersion result = - new com.google.cloud.tpu.v2alpha1.RuntimeVersion(this); + com.google.cloud.tpu.v2alpha1.RuntimeVersion result = new com.google.cloud.tpu.v2alpha1.RuntimeVersion(this); result.name_ = name_; result.version_ = version_; onBuilt(); @@ -413,39 +382,38 @@ public com.google.cloud.tpu.v2alpha1.RuntimeVersion buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.RuntimeVersion) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.RuntimeVersion) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.RuntimeVersion)other); } else { super.mergeFrom(other); return this; @@ -488,25 +456,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - version_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + version_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -519,20 +484,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -541,21 +504,20 @@ public java.lang.String getName() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -563,61 +525,54 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
      * The resource name.
      * 
* * string name = 1; - * * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -625,20 +580,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { private java.lang.Object version_ = ""; /** - * - * *
      * The runtime version.
      * 
* * string version = 2; - * * @return The version. */ public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; @@ -647,21 +600,20 @@ public java.lang.String getVersion() { } } /** - * - * *
      * The runtime version.
      * 
* * string version = 2; - * * @return The bytes for version. */ - public com.google.protobuf.ByteString getVersionBytes() { + public com.google.protobuf.ByteString + getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); version_ = b; return b; } else { @@ -669,68 +621,61 @@ public com.google.protobuf.ByteString getVersionBytes() { } } /** - * - * *
      * The runtime version.
      * 
* * string version = 2; - * * @param value The version to set. * @return This builder for chaining. */ - public Builder setVersion(java.lang.String value) { + public Builder setVersion( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + version_ = value; onChanged(); return this; } /** - * - * *
      * The runtime version.
      * 
* * string version = 2; - * * @return This builder for chaining. */ public Builder clearVersion() { - + version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** - * - * *
      * The runtime version.
      * 
* * string version = 2; - * * @param value The bytes for version to set. * @return This builder for chaining. */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -740,12 +685,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.RuntimeVersion) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.RuntimeVersion) private static final com.google.cloud.tpu.v2alpha1.RuntimeVersion DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.RuntimeVersion(); } @@ -754,27 +699,27 @@ public static com.google.cloud.tpu.v2alpha1.RuntimeVersion getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RuntimeVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -789,4 +734,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.RuntimeVersion getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionName.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionName.java similarity index 100% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionName.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionName.java diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionOrBuilder.java similarity index 52% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionOrBuilder.java index 06fc731dd3cd..61ba8883f9e3 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/RuntimeVersionOrBuilder.java @@ -1,75 +1,49 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface RuntimeVersionOrBuilder - extends +public interface RuntimeVersionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.RuntimeVersion) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The name. */ java.lang.String getName(); /** - * - * *
    * The resource name.
    * 
* * string name = 1; - * * @return The bytes for name. */ - com.google.protobuf.ByteString getNameBytes(); + com.google.protobuf.ByteString + getNameBytes(); /** - * - * *
    * The runtime version.
    * 
* * string version = 2; - * * @return The version. */ java.lang.String getVersion(); /** - * - * *
    * The runtime version.
    * 
* * string version = 2; - * * @return The bytes for version. */ - com.google.protobuf.ByteString getVersionBytes(); + com.google.protobuf.ByteString + getVersionBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfig.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfig.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfig.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfig.java index 88257d0fd561..0c16941e0d38 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfig.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfig.java @@ -1,81 +1,60 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Sets the scheduling options for this node.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.SchedulingConfig} */ -public final class SchedulingConfig extends com.google.protobuf.GeneratedMessageV3 - implements +public final class SchedulingConfig extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.SchedulingConfig) SchedulingConfigOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use SchedulingConfig.newBuilder() to construct. private SchedulingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - - private SchedulingConfig() {} + private SchedulingConfig() { + } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new SchedulingConfig(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.SchedulingConfig.class, - com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.SchedulingConfig.class, com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder.class); } public static final int PREEMPTIBLE_FIELD_NUMBER = 1; private boolean preemptible_; /** - * - * *
    * Defines whether the node is preemptible.
    * 
* * bool preemptible = 1; - * * @return The preemptible. */ @java.lang.Override @@ -86,14 +65,11 @@ public boolean getPreemptible() { public static final int RESERVED_FIELD_NUMBER = 2; private boolean reserved_; /** - * - * *
    * Whether the node is created under a reservation.
    * 
* * bool reserved = 2; - * * @return The reserved. */ @java.lang.Override @@ -102,7 +78,6 @@ public boolean getReserved() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -114,7 +89,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (preemptible_ != false) { output.writeBool(1, preemptible_); } @@ -131,10 +107,12 @@ public int getSerializedSize() { size = 0; if (preemptible_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, preemptible_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, preemptible_); } if (reserved_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, reserved_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, reserved_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -144,16 +122,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.SchedulingConfig)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.SchedulingConfig other = - (com.google.cloud.tpu.v2alpha1.SchedulingConfig) obj; + com.google.cloud.tpu.v2alpha1.SchedulingConfig other = (com.google.cloud.tpu.v2alpha1.SchedulingConfig) obj; - if (getPreemptible() != other.getPreemptible()) return false; - if (getReserved() != other.getReserved()) return false; + if (getPreemptible() + != other.getPreemptible()) return false; + if (getReserved() + != other.getReserved()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -166,144 +145,140 @@ public int hashCode() { int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PREEMPTIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPreemptible()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPreemptible()); hash = (37 * hash) + RESERVED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReserved()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReserved()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.SchedulingConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.SchedulingConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Sets the scheduling options for this node.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.SchedulingConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.SchedulingConfig) com.google.cloud.tpu.v2alpha1.SchedulingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.SchedulingConfig.class, - com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.SchedulingConfig.class, com.google.cloud.tpu.v2alpha1.SchedulingConfig.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.SchedulingConfig.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -315,9 +290,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SchedulingConfig_descriptor; } @java.lang.Override @@ -336,8 +311,7 @@ public com.google.cloud.tpu.v2alpha1.SchedulingConfig build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.SchedulingConfig buildPartial() { - com.google.cloud.tpu.v2alpha1.SchedulingConfig result = - new com.google.cloud.tpu.v2alpha1.SchedulingConfig(this); + com.google.cloud.tpu.v2alpha1.SchedulingConfig result = new com.google.cloud.tpu.v2alpha1.SchedulingConfig(this); result.preemptible_ = preemptible_; result.reserved_ = reserved_; onBuilt(); @@ -348,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.SchedulingConfig buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.SchedulingConfig) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.SchedulingConfig) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.SchedulingConfig)other); } else { super.mergeFrom(other); return this; @@ -421,25 +394,22 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: - { - preemptible_ = input.readBool(); - - break; - } // case 8 - case 16: - { - reserved_ = input.readBool(); - - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 8: { + preemptible_ = input.readBool(); + + break; + } // case 8 + case 16: { + reserved_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -450,16 +420,13 @@ public Builder mergeFrom( return this; } - private boolean preemptible_; + private boolean preemptible_ ; /** - * - * *
      * Defines whether the node is preemptible.
      * 
* * bool preemptible = 1; - * * @return The preemptible. */ @java.lang.Override @@ -467,51 +434,42 @@ public boolean getPreemptible() { return preemptible_; } /** - * - * *
      * Defines whether the node is preemptible.
      * 
* * bool preemptible = 1; - * * @param value The preemptible to set. * @return This builder for chaining. */ public Builder setPreemptible(boolean value) { - + preemptible_ = value; onChanged(); return this; } /** - * - * *
      * Defines whether the node is preemptible.
      * 
* * bool preemptible = 1; - * * @return This builder for chaining. */ public Builder clearPreemptible() { - + preemptible_ = false; onChanged(); return this; } - private boolean reserved_; + private boolean reserved_ ; /** - * - * *
      * Whether the node is created under a reservation.
      * 
* * bool reserved = 2; - * * @return The reserved. */ @java.lang.Override @@ -519,43 +477,37 @@ public boolean getReserved() { return reserved_; } /** - * - * *
      * Whether the node is created under a reservation.
      * 
* * bool reserved = 2; - * * @param value The reserved to set. * @return This builder for chaining. */ public Builder setReserved(boolean value) { - + reserved_ = value; onChanged(); return this; } /** - * - * *
      * Whether the node is created under a reservation.
      * 
* * bool reserved = 2; - * * @return This builder for chaining. */ public Builder clearReserved() { - + reserved_ = false; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -565,12 +517,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.SchedulingConfig) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.SchedulingConfig) private static final com.google.cloud.tpu.v2alpha1.SchedulingConfig DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.SchedulingConfig(); } @@ -579,27 +531,27 @@ public static com.google.cloud.tpu.v2alpha1.SchedulingConfig getDefaultInstance( return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SchedulingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -614,4 +566,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.SchedulingConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java new file mode 100644 index 000000000000..5e8a02cbe3b3 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SchedulingConfigOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface SchedulingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.SchedulingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Defines whether the node is preemptible.
+   * 
+ * + * bool preemptible = 1; + * @return The preemptible. + */ + boolean getPreemptible(); + + /** + *
+   * Whether the node is created under a reservation.
+   * 
+ * + * bool reserved = 2; + * @return The reserved. + */ + boolean getReserved(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccount.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccount.java similarity index 69% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccount.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccount.java index b5ea84fe9ab9..5a539b853547 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccount.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccount.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A service account.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ServiceAccount} */ -public final class ServiceAccount extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ServiceAccount extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ServiceAccount) ServiceAccountOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ServiceAccount.newBuilder() to construct. private ServiceAccount(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ServiceAccount() { email_ = ""; scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -44,42 +26,38 @@ private ServiceAccount() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ServiceAccount(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ServiceAccount.class, - com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder.class); + com.google.cloud.tpu.v2alpha1.ServiceAccount.class, com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder.class); } public static final int EMAIL_FIELD_NUMBER = 1; private volatile java.lang.Object email_; /** - * - * *
    * Email address of the service account. If empty, default Compute service
    * account will be used.
    * 
* * string email = 1; - * * @return The email. */ @java.lang.Override @@ -88,30 +66,30 @@ public java.lang.String getEmail() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); email_ = s; return s; } } /** - * - * *
    * Email address of the service account. If empty, default Compute service
    * account will be used.
    * 
* * string email = 1; - * * @return The bytes for email. */ @java.lang.Override - public com.google.protobuf.ByteString getEmailBytes() { + public com.google.protobuf.ByteString + getEmailBytes() { java.lang.Object ref = email_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); email_ = b; return b; } else { @@ -122,45 +100,37 @@ public com.google.protobuf.ByteString getEmailBytes() { public static final int SCOPE_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList scope_; /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @return A list containing the scope. */ - public com.google.protobuf.ProtocolStringList getScopeList() { + public com.google.protobuf.ProtocolStringList + getScopeList() { return scope_; } /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @return The count of scope. */ public int getScopeCount() { return scope_.size(); } /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @param index The index of the element to return. * @return The scope at the given index. */ @@ -168,24 +138,21 @@ public java.lang.String getScope(int index) { return scope_.get(index); } /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @param index The index of the value to return. * @return The bytes of the scope at the given index. */ - public com.google.protobuf.ByteString getScopeBytes(int index) { + public com.google.protobuf.ByteString + getScopeBytes(int index) { return scope_.getByteString(index); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -197,7 +164,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); } @@ -232,16 +200,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ServiceAccount)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ServiceAccount other = - (com.google.cloud.tpu.v2alpha1.ServiceAccount) obj; + com.google.cloud.tpu.v2alpha1.ServiceAccount other = (com.google.cloud.tpu.v2alpha1.ServiceAccount) obj; - if (!getEmail().equals(other.getEmail())) return false; - if (!getScopeList().equals(other.getScopeList())) return false; + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getScopeList() + .equals(other.getScopeList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,136 +233,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ServiceAccount parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ServiceAccount prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A service account.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ServiceAccount} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ServiceAccount) com.google.cloud.tpu.v2alpha1.ServiceAccountOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ServiceAccount.class, - com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder.class); + com.google.cloud.tpu.v2alpha1.ServiceAccount.class, com.google.cloud.tpu.v2alpha1.ServiceAccount.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ServiceAccount.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -405,9 +368,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceAccount_descriptor; } @java.lang.Override @@ -426,8 +389,7 @@ public com.google.cloud.tpu.v2alpha1.ServiceAccount build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ServiceAccount buildPartial() { - com.google.cloud.tpu.v2alpha1.ServiceAccount result = - new com.google.cloud.tpu.v2alpha1.ServiceAccount(this); + com.google.cloud.tpu.v2alpha1.ServiceAccount result = new com.google.cloud.tpu.v2alpha1.ServiceAccount(this); int from_bitField0_ = bitField0_; result.email_ = email_; if (((bitField0_ & 0x00000001) != 0)) { @@ -443,39 +405,38 @@ public com.google.cloud.tpu.v2alpha1.ServiceAccount buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ServiceAccount) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ServiceAccount) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ServiceAccount)other); } else { super.mergeFrom(other); return this; @@ -524,26 +485,23 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - email_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureScopeIsMutable(); - scope_.add(s); - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + email_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopeIsMutable(); + scope_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -553,26 +511,23 @@ public Builder mergeFrom( } // finally return this; } - private int bitField0_; private java.lang.Object email_ = ""; /** - * - * *
      * Email address of the service account. If empty, default Compute service
      * account will be used.
      * 
* * string email = 1; - * * @return The email. */ public java.lang.String getEmail() { java.lang.Object ref = email_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); email_ = s; return s; @@ -581,22 +536,21 @@ public java.lang.String getEmail() { } } /** - * - * *
      * Email address of the service account. If empty, default Compute service
      * account will be used.
      * 
* * string email = 1; - * * @return The bytes for email. */ - public com.google.protobuf.ByteString getEmailBytes() { + public com.google.protobuf.ByteString + getEmailBytes() { java.lang.Object ref = email_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); email_ = b; return b; } else { @@ -604,118 +558,101 @@ public com.google.protobuf.ByteString getEmailBytes() { } } /** - * - * *
      * Email address of the service account. If empty, default Compute service
      * account will be used.
      * 
* * string email = 1; - * * @param value The email to set. * @return This builder for chaining. */ - public Builder setEmail(java.lang.String value) { + public Builder setEmail( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + email_ = value; onChanged(); return this; } /** - * - * *
      * Email address of the service account. If empty, default Compute service
      * account will be used.
      * 
* * string email = 1; - * * @return This builder for chaining. */ public Builder clearEmail() { - + email_ = getDefaultInstance().getEmail(); onChanged(); return this; } /** - * - * *
      * Email address of the service account. If empty, default Compute service
      * account will be used.
      * 
* * string email = 1; - * * @param value The bytes for email to set. * @return This builder for chaining. */ - public Builder setEmailBytes(com.google.protobuf.ByteString value) { + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + email_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList scope_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - + private com.google.protobuf.LazyStringList scope_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureScopeIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { scope_ = new com.google.protobuf.LazyStringArrayList(scope_); bitField0_ |= 0x00000001; - } + } } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @return A list containing the scope. */ - public com.google.protobuf.ProtocolStringList getScopeList() { + public com.google.protobuf.ProtocolStringList + getScopeList() { return scope_.getUnmodifiableView(); } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @return The count of scope. */ public int getScopeCount() { return scope_.size(); } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @param index The index of the element to return. * @return The scope at the given index. */ @@ -723,95 +660,85 @@ public java.lang.String getScope(int index) { return scope_.get(index); } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @param index The index of the value to return. * @return The bytes of the scope at the given index. */ - public com.google.protobuf.ByteString getScopeBytes(int index) { + public com.google.protobuf.ByteString + getScopeBytes(int index) { return scope_.getByteString(index); } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @param index The index to set the value at. * @param value The scope to set. * @return This builder for chaining. */ - public Builder setScope(int index, java.lang.String value) { + public Builder setScope( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureScopeIsMutable(); + throw new NullPointerException(); + } + ensureScopeIsMutable(); scope_.set(index, value); onChanged(); return this; } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @param value The scope to add. * @return This builder for chaining. */ - public Builder addScope(java.lang.String value) { + public Builder addScope( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureScopeIsMutable(); + throw new NullPointerException(); + } + ensureScopeIsMutable(); scope_.add(value); onChanged(); return this; } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @param values The scope to add. * @return This builder for chaining. */ - public Builder addAllScope(java.lang.Iterable values) { + public Builder addAllScope( + java.lang.Iterable values) { ensureScopeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scope_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, scope_); onChanged(); return this; } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @return This builder for chaining. */ public Builder clearScope() { @@ -821,31 +748,29 @@ public Builder clearScope() { return this; } /** - * - * *
      * The list of scopes to be made available for this service account. If empty,
      * access to all Cloud APIs will be allowed.
      * 
* * repeated string scope = 2; - * * @param value The bytes of the scope to add. * @return This builder for chaining. */ - public Builder addScopeBytes(com.google.protobuf.ByteString value) { + public Builder addScopeBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureScopeIsMutable(); scope_.add(value); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -855,12 +780,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ServiceAccount) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ServiceAccount) private static final com.google.cloud.tpu.v2alpha1.ServiceAccount DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ServiceAccount(); } @@ -869,27 +794,27 @@ public static com.google.cloud.tpu.v2alpha1.ServiceAccount getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ServiceAccount parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAccount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -904,4 +829,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.ServiceAccount getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccountOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccountOrBuilder.java similarity index 68% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccountOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccountOrBuilder.java index 34e4ff1082bf..b066871c5cad 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccountOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceAccountOrBuilder.java @@ -1,107 +1,76 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface ServiceAccountOrBuilder - extends +public interface ServiceAccountOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ServiceAccount) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Email address of the service account. If empty, default Compute service
    * account will be used.
    * 
* * string email = 1; - * * @return The email. */ java.lang.String getEmail(); /** - * - * *
    * Email address of the service account. If empty, default Compute service
    * account will be used.
    * 
* * string email = 1; - * * @return The bytes for email. */ - com.google.protobuf.ByteString getEmailBytes(); + com.google.protobuf.ByteString + getEmailBytes(); /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @return A list containing the scope. */ - java.util.List getScopeList(); + java.util.List + getScopeList(); /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @return The count of scope. */ int getScopeCount(); /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @param index The index of the element to return. * @return The scope at the given index. */ java.lang.String getScope(int index); /** - * - * *
    * The list of scopes to be made available for this service account. If empty,
    * access to all Cloud APIs will be allowed.
    * 
* * repeated string scope = 2; - * * @param index The index of the value to return. * @return The bytes of the scope at the given index. */ - com.google.protobuf.ByteString getScopeBytes(int index); + com.google.protobuf.ByteString + getScopeBytes(int index); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentity.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentity.java similarity index 65% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentity.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentity.java index c7e5a1654140..225377b132b2 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentity.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentity.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * The per-product per-project service identity for Cloud TPU service.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ServiceIdentity} */ -public final class ServiceIdentity extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ServiceIdentity extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ServiceIdentity) ServiceIdentityOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ServiceIdentity.newBuilder() to construct. private ServiceIdentity(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ServiceIdentity() { email_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ServiceIdentity(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ServiceIdentity.class, - com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder.class); + com.google.cloud.tpu.v2alpha1.ServiceIdentity.class, com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder.class); } public static final int EMAIL_FIELD_NUMBER = 1; private volatile java.lang.Object email_; /** - * - * *
    * The email address of the service identity.
    * 
* * string email = 1; - * * @return The email. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getEmail() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); email_ = s; return s; } } /** - * - * *
    * The email address of the service identity.
    * 
* * string email = 1; - * * @return The bytes for email. */ @java.lang.Override - public com.google.protobuf.ByteString getEmailBytes() { + public com.google.protobuf.ByteString + getEmailBytes() { java.lang.Object ref = email_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); email_ = b; return b; } else { @@ -117,7 +95,6 @@ public com.google.protobuf.ByteString getEmailBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -129,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); } @@ -153,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ServiceIdentity)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ServiceIdentity other = - (com.google.cloud.tpu.v2alpha1.ServiceIdentity) obj; + com.google.cloud.tpu.v2alpha1.ServiceIdentity other = (com.google.cloud.tpu.v2alpha1.ServiceIdentity) obj; - if (!getEmail().equals(other.getEmail())) return false; + if (!getEmail() + .equals(other.getEmail())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -180,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ServiceIdentity parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ServiceIdentity prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * The per-product per-project service identity for Cloud TPU service.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ServiceIdentity} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ServiceIdentity) com.google.cloud.tpu.v2alpha1.ServiceIdentityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ServiceIdentity.class, - com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder.class); + com.google.cloud.tpu.v2alpha1.ServiceIdentity.class, com.google.cloud.tpu.v2alpha1.ServiceIdentity.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ServiceIdentity.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -319,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ServiceIdentity_descriptor; } @java.lang.Override @@ -340,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.ServiceIdentity build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ServiceIdentity buildPartial() { - com.google.cloud.tpu.v2alpha1.ServiceIdentity result = - new com.google.cloud.tpu.v2alpha1.ServiceIdentity(this); + com.google.cloud.tpu.v2alpha1.ServiceIdentity result = new com.google.cloud.tpu.v2alpha1.ServiceIdentity(this); result.email_ = email_; onBuilt(); return result; @@ -351,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.ServiceIdentity buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ServiceIdentity) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ServiceIdentity) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ServiceIdentity)other); } else { super.mergeFrom(other); return this; @@ -422,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - email_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + email_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -447,20 +415,18 @@ public Builder mergeFrom( private java.lang.Object email_ = ""; /** - * - * *
      * The email address of the service identity.
      * 
* * string email = 1; - * * @return The email. */ public java.lang.String getEmail() { java.lang.Object ref = email_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); email_ = s; return s; @@ -469,21 +435,20 @@ public java.lang.String getEmail() { } } /** - * - * *
      * The email address of the service identity.
      * 
* * string email = 1; - * * @return The bytes for email. */ - public com.google.protobuf.ByteString getEmailBytes() { + public com.google.protobuf.ByteString + getEmailBytes() { java.lang.Object ref = email_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); email_ = b; return b; } else { @@ -491,68 +456,61 @@ public com.google.protobuf.ByteString getEmailBytes() { } } /** - * - * *
      * The email address of the service identity.
      * 
* * string email = 1; - * * @param value The email to set. * @return This builder for chaining. */ - public Builder setEmail(java.lang.String value) { + public Builder setEmail( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + email_ = value; onChanged(); return this; } /** - * - * *
      * The email address of the service identity.
      * 
* * string email = 1; - * * @return This builder for chaining. */ public Builder clearEmail() { - + email_ = getDefaultInstance().getEmail(); onChanged(); return this; } /** - * - * *
      * The email address of the service identity.
      * 
* * string email = 1; - * * @param value The bytes for email to set. * @return This builder for chaining. */ - public Builder setEmailBytes(com.google.protobuf.ByteString value) { + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + email_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -562,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ServiceIdentity) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ServiceIdentity) private static final com.google.cloud.tpu.v2alpha1.ServiceIdentity DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ServiceIdentity(); } @@ -576,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.ServiceIdentity getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ServiceIdentity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceIdentity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -611,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.ServiceIdentity getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java new file mode 100644 index 000000000000..12b3c9f7dcd5 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ServiceIdentityOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface ServiceIdentityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ServiceIdentity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The email address of the service identity.
+   * 
+ * + * string email = 1; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+   * The email address of the service identity.
+   * 
+ * + * string email = 1; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfig.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfig.java similarity index 64% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfig.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfig.java index 01ee73e7e08e..a5db02be0049 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfig.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfig.java @@ -1,81 +1,60 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A set of Shielded Instance options.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ShieldedInstanceConfig} */ -public final class ShieldedInstanceConfig extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ShieldedInstanceConfig extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) ShieldedInstanceConfigOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ShieldedInstanceConfig.newBuilder() to construct. private ShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - - private ShieldedInstanceConfig() {} + private ShieldedInstanceConfig() { + } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ShieldedInstanceConfig(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.class, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.class, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder.class); } public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; private boolean enableSecureBoot_; /** - * - * *
    * Defines whether the instance has Secure Boot enabled.
    * 
* * bool enable_secure_boot = 1; - * * @return The enableSecureBoot. */ @java.lang.Override @@ -84,7 +63,6 @@ public boolean getEnableSecureBoot() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -96,7 +74,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (enableSecureBoot_ != false) { output.writeBool(1, enableSecureBoot_); } @@ -110,7 +89,8 @@ public int getSerializedSize() { size = 0; if (enableSecureBoot_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enableSecureBoot_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -120,15 +100,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig other = - (com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) obj; + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig other = (com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) obj; - if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; + if (getEnableSecureBoot() + != other.getEnableSecureBoot()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -141,142 +121,137 @@ public int hashCode() { int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableSecureBoot()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A set of Shielded Instance options.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.ShieldedInstanceConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.class, - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder.class); + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.class, com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -286,9 +261,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_ShieldedInstanceConfig_descriptor; } @java.lang.Override @@ -307,8 +282,7 @@ public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig buildPartial() { - com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig result = - new com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig(this); + com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig result = new com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig(this); result.enableSecureBoot_ = enableSecureBoot_; onBuilt(); return result; @@ -318,39 +292,38 @@ public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig)other); } else { super.mergeFrom(other); return this; @@ -358,8 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig other) { - if (other == com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig.getDefaultInstance()) return this; if (other.getEnableSecureBoot() != false) { setEnableSecureBoot(other.getEnableSecureBoot()); } @@ -389,19 +361,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: - { - enableSecureBoot_ = input.readBool(); - - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 8: { + enableSecureBoot_ = input.readBool(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -412,16 +382,13 @@ public Builder mergeFrom( return this; } - private boolean enableSecureBoot_; + private boolean enableSecureBoot_ ; /** - * - * *
      * Defines whether the instance has Secure Boot enabled.
      * 
* * bool enable_secure_boot = 1; - * * @return The enableSecureBoot. */ @java.lang.Override @@ -429,43 +396,37 @@ public boolean getEnableSecureBoot() { return enableSecureBoot_; } /** - * - * *
      * Defines whether the instance has Secure Boot enabled.
      * 
* * bool enable_secure_boot = 1; - * * @param value The enableSecureBoot to set. * @return This builder for chaining. */ public Builder setEnableSecureBoot(boolean value) { - + enableSecureBoot_ = value; onChanged(); return this; } /** - * - * *
      * Defines whether the instance has Secure Boot enabled.
      * 
* * bool enable_secure_boot = 1; - * * @return This builder for chaining. */ public Builder clearEnableSecureBoot() { - + enableSecureBoot_ = false; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -475,12 +436,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) private static final com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig(); } @@ -489,27 +450,27 @@ public static com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig getDefaultIns return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ShieldedInstanceConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShieldedInstanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -524,4 +485,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.ShieldedInstanceConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java new file mode 100644 index 000000000000..a720bd197b91 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/ShieldedInstanceConfigOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface ShieldedInstanceConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.ShieldedInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Defines whether the instance has Secure Boot enabled.
+   * 
+ * + * bool enable_secure_boot = 1; + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); +} diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequest.java new file mode 100644 index 000000000000..af3593be0065 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequest.java @@ -0,0 +1,853 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +/** + *
+ * Request for [SimulateMaintenanceEvent][google.cloud.tpu.v2alpha1.Tpu.SimulateMaintenanceEvent].
+ * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest} + */ +public final class SimulateMaintenanceEventRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) + SimulateMaintenanceEventRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use SimulateMaintenanceEventRequest.newBuilder() to construct. + private SimulateMaintenanceEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SimulateMaintenanceEventRequest() { + name_ = ""; + workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SimulateMaintenanceEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SimulateMaintenanceEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SimulateMaintenanceEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.class, com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WORKER_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList workerIds_; + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @return A list containing the workerIds. + */ + public com.google.protobuf.ProtocolStringList + getWorkerIdsList() { + return workerIds_; + } + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @return The count of workerIds. + */ + public int getWorkerIdsCount() { + return workerIds_.size(); + } + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @param index The index of the element to return. + * @return The workerIds at the given index. + */ + public java.lang.String getWorkerIds(int index) { + return workerIds_.get(index); + } + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @param index The index of the value to return. + * @return The bytes of the workerIds at the given index. + */ + public com.google.protobuf.ByteString + getWorkerIdsBytes(int index) { + return workerIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < workerIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, workerIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < workerIds_.size(); i++) { + dataSize += computeStringSizeNoTag(workerIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getWorkerIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest)) { + return super.equals(obj); + } + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest other = (com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getWorkerIdsList() + .equals(other.getWorkerIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getWorkerIdsCount() > 0) { + hash = (37 * hash) + WORKER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getWorkerIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for [SimulateMaintenanceEvent][google.cloud.tpu.v2alpha1.Tpu.SimulateMaintenanceEvent].
+   * 
+ * + * Protobuf type {@code google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SimulateMaintenanceEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SimulateMaintenanceEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.class, com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.Builder.class); + } + + // Construct using com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_SimulateMaintenanceEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest getDefaultInstanceForType() { + return com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest build() { + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest buildPartial() { + com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest result = new com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + workerIds_ = workerIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.workerIds_ = workerIds_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) { + return mergeFrom((com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest other) { + if (other == com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.workerIds_.isEmpty()) { + if (workerIds_.isEmpty()) { + workerIds_ = other.workerIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWorkerIdsIsMutable(); + workerIds_.addAll(other.workerIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureWorkerIdsIsMutable(); + workerIds_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureWorkerIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + workerIds_ = new com.google.protobuf.LazyStringArrayList(workerIds_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @return A list containing the workerIds. + */ + public com.google.protobuf.ProtocolStringList + getWorkerIdsList() { + return workerIds_.getUnmodifiableView(); + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @return The count of workerIds. + */ + public int getWorkerIdsCount() { + return workerIds_.size(); + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @param index The index of the element to return. + * @return The workerIds at the given index. + */ + public java.lang.String getWorkerIds(int index) { + return workerIds_.get(index); + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @param index The index of the value to return. + * @return The bytes of the workerIds at the given index. + */ + public com.google.protobuf.ByteString + getWorkerIdsBytes(int index) { + return workerIds_.getByteString(index); + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @param index The index to set the value at. + * @param value The workerIds to set. + * @return This builder for chaining. + */ + public Builder setWorkerIds( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerIdsIsMutable(); + workerIds_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @param value The workerIds to add. + * @return This builder for chaining. + */ + public Builder addWorkerIds( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerIdsIsMutable(); + workerIds_.add(value); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @param values The workerIds to add. + * @return This builder for chaining. + */ + public Builder addAllWorkerIds( + java.lang.Iterable values) { + ensureWorkerIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, workerIds_); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @return This builder for chaining. + */ + public Builder clearWorkerIds() { + workerIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+     * maintenance event simulation. A maintenance event will only be fired on the
+     * first specified worker ID. Future implementations may support firing on
+     * multiple workers.
+     * 
+ * + * repeated string worker_ids = 2; + * @param value The bytes of the workerIds to add. + * @return This builder for chaining. + */ + public Builder addWorkerIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWorkerIdsIsMutable(); + workerIds_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) + private static final com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest(); + } + + public static com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimulateMaintenanceEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequestOrBuilder.java new file mode 100644 index 000000000000..d39424314b2f --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SimulateMaintenanceEventRequestOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface SimulateMaintenanceEventRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @return A list containing the workerIds. + */ + java.util.List + getWorkerIdsList(); + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @return The count of workerIds. + */ + int getWorkerIdsCount(); + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @param index The index of the element to return. + * @return The workerIds at the given index. + */ + java.lang.String getWorkerIds(int index); + /** + *
+   * The 0-based worker ID. If it is empty, worker ID 0 will be selected for
+   * maintenance event simulation. A maintenance event will only be fired on the
+   * first specified worker ID. Future implementations may support firing on
+   * multiple workers.
+   * 
+ * + * repeated string worker_ids = 2; + * @param index The index of the value to return. + * @return The bytes of the workerIds at the given index. + */ + com.google.protobuf.ByteString + getWorkerIdsBytes(int index); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequest.java similarity index 62% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequest.java index a4d6b55275da..67c1c76e232e 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequest.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Request for [StartNode][google.cloud.tpu.v2alpha1.Tpu.StartNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.StartNodeRequest} */ -public final class StartNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class StartNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.StartNodeRequest) StartNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use StartNodeRequest.newBuilder() to construct. private StartNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StartNodeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new StartNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.StartNodeRequest.class, - com.google.cloud.tpu.v2alpha1.StartNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.StartNodeRequest.class, com.google.cloud.tpu.v2alpha1.StartNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
-   * The resource name.
+   * Required. The resource name.
    * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
-   * The resource name.
+   * Required. The resource name.
    * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -117,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -129,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -153,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.StartNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.StartNodeRequest other = - (com.google.cloud.tpu.v2alpha1.StartNodeRequest) obj; + com.google.cloud.tpu.v2alpha1.StartNodeRequest other = (com.google.cloud.tpu.v2alpha1.StartNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -180,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.StartNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.StartNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [StartNode][google.cloud.tpu.v2alpha1.Tpu.StartNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.StartNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.StartNodeRequest) com.google.cloud.tpu.v2alpha1.StartNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.StartNodeRequest.class, - com.google.cloud.tpu.v2alpha1.StartNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.StartNodeRequest.class, com.google.cloud.tpu.v2alpha1.StartNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.StartNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -319,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StartNodeRequest_descriptor; } @java.lang.Override @@ -340,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.StartNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.StartNodeRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.StartNodeRequest result = - new com.google.cloud.tpu.v2alpha1.StartNodeRequest(this); + com.google.cloud.tpu.v2alpha1.StartNodeRequest result = new com.google.cloud.tpu.v2alpha1.StartNodeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -351,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.StartNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.StartNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.StartNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.StartNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -422,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -447,20 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -469,21 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -491,68 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -562,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.StartNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.StartNodeRequest) private static final com.google.cloud.tpu.v2alpha1.StartNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.StartNodeRequest(); } @@ -576,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.StartNodeRequest getDefaultInstance( return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StartNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -611,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.StartNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java new file mode 100644 index 000000000000..0a4c2e5cf7ea --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StartNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface StartNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.StartNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequest.java similarity index 62% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequest.java index 4f4701cbe48d..d3569030ee33 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequest.java @@ -1,83 +1,61 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Request for [StopNode][google.cloud.tpu.v2alpha1.Tpu.StopNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.StopNodeRequest} */ -public final class StopNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class StopNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.StopNodeRequest) StopNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use StopNodeRequest.newBuilder() to construct. private StopNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private StopNodeRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new StopNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.StopNodeRequest.class, - com.google.cloud.tpu.v2alpha1.StopNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.StopNodeRequest.class, com.google.cloud.tpu.v2alpha1.StopNodeRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** - * - * *
-   * The resource name.
+   * Required. The resource name.
    * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ @java.lang.Override @@ -86,29 +64,29 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * - * *
-   * The resource name.
+   * Required. The resource name.
    * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -117,7 +95,6 @@ public com.google.protobuf.ByteString getNameBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -129,7 +106,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -153,15 +131,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.StopNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.StopNodeRequest other = - (com.google.cloud.tpu.v2alpha1.StopNodeRequest) obj; + com.google.cloud.tpu.v2alpha1.StopNodeRequest other = (com.google.cloud.tpu.v2alpha1.StopNodeRequest) obj; - if (!getName().equals(other.getName())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -180,136 +158,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.StopNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.StopNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [StopNode][google.cloud.tpu.v2alpha1.Tpu.StopNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.StopNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.StopNodeRequest) com.google.cloud.tpu.v2alpha1.StopNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.StopNodeRequest.class, - com.google.cloud.tpu.v2alpha1.StopNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.StopNodeRequest.class, com.google.cloud.tpu.v2alpha1.StopNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.StopNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -319,9 +291,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_StopNodeRequest_descriptor; } @java.lang.Override @@ -340,8 +312,7 @@ public com.google.cloud.tpu.v2alpha1.StopNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.StopNodeRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.StopNodeRequest result = - new com.google.cloud.tpu.v2alpha1.StopNodeRequest(this); + com.google.cloud.tpu.v2alpha1.StopNodeRequest result = new com.google.cloud.tpu.v2alpha1.StopNodeRequest(this); result.name_ = name_; onBuilt(); return result; @@ -351,39 +322,38 @@ public com.google.cloud.tpu.v2alpha1.StopNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.StopNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.StopNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.StopNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -422,19 +392,17 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -447,20 +415,18 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; @@ -469,21 +435,20 @@ public java.lang.String getName() { } } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for name. */ - public com.google.protobuf.ByteString getNameBytes() { + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -491,68 +456,61 @@ public com.google.protobuf.ByteString getNameBytes() { } } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The name to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + name_ = value; onChanged(); return this; } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * - * *
-     * The resource name.
+     * Required. The resource name.
      * 
* - * string name = 1; - * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setNameBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -562,12 +520,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.StopNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.StopNodeRequest) private static final com.google.cloud.tpu.v2alpha1.StopNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.StopNodeRequest(); } @@ -576,27 +534,27 @@ public static com.google.cloud.tpu.v2alpha1.StopNodeRequest getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StopNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -611,4 +569,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.StopNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java new file mode 100644 index 000000000000..1462c20dab3c --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/StopNodeRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tpu/v2alpha1/cloud_tpu.proto + +package com.google.cloud.tpu.v2alpha1; + +public interface StopNodeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.StopNodeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Symptom.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Symptom.java similarity index 70% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Symptom.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Symptom.java index 14f40a2e2bb2..696a76b03ce9 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Symptom.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/Symptom.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * A Symptom instance.
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.Symptom} */ -public final class Symptom extends com.google.protobuf.GeneratedMessageV3 - implements +public final class Symptom extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.Symptom) SymptomOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use Symptom.newBuilder() to construct. private Symptom(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Symptom() { symptomType_ = 0; details_ = ""; @@ -45,33 +27,30 @@ private Symptom() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new Symptom(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Symptom_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Symptom_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.Symptom.class, - com.google.cloud.tpu.v2alpha1.Symptom.Builder.class); + com.google.cloud.tpu.v2alpha1.Symptom.class, com.google.cloud.tpu.v2alpha1.Symptom.Builder.class); } /** - * - * *
    * SymptomType represents the different types of Symptoms that a TPU can be
    * at.
@@ -79,10 +58,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * Protobuf enum {@code google.cloud.tpu.v2alpha1.Symptom.SymptomType}
    */
-  public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum {
+  public enum SymptomType
+      implements com.google.protobuf.ProtocolMessageEnum {
     /**
-     *
-     *
      * 
      * Unspecified symptom.
      * 
@@ -91,8 +69,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ SYMPTOM_TYPE_UNSPECIFIED(0), /** - * - * *
      * TPU VM memory is low.
      * 
@@ -101,8 +77,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ LOW_MEMORY(1), /** - * - * *
      * TPU runtime is out of memory.
      * 
@@ -111,8 +85,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ OUT_OF_MEMORY(2), /** - * - * *
      * TPU runtime execution has timed out.
      * 
@@ -121,8 +93,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ EXECUTE_TIMED_OUT(3), /** - * - * *
      * TPU runtime fails to construct a mesh that recognizes each TPU device's
      * neighbors.
@@ -132,8 +102,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum {
      */
     MESH_BUILD_FAIL(4),
     /**
-     *
-     *
      * 
      * TPU HBM is out of memory.
      * 
@@ -142,8 +110,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ HBM_OUT_OF_MEMORY(5), /** - * - * *
      * Abusive behaviors have been identified on the current project.
      * 
@@ -155,8 +121,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { ; /** - * - * *
      * Unspecified symptom.
      * 
@@ -165,8 +129,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int SYMPTOM_TYPE_UNSPECIFIED_VALUE = 0; /** - * - * *
      * TPU VM memory is low.
      * 
@@ -175,8 +137,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int LOW_MEMORY_VALUE = 1; /** - * - * *
      * TPU runtime is out of memory.
      * 
@@ -185,8 +145,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int OUT_OF_MEMORY_VALUE = 2; /** - * - * *
      * TPU runtime execution has timed out.
      * 
@@ -195,8 +153,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int EXECUTE_TIMED_OUT_VALUE = 3; /** - * - * *
      * TPU runtime fails to construct a mesh that recognizes each TPU device's
      * neighbors.
@@ -206,8 +162,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum {
      */
     public static final int MESH_BUILD_FAIL_VALUE = 4;
     /**
-     *
-     *
      * 
      * TPU HBM is out of memory.
      * 
@@ -216,8 +170,6 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int HBM_OUT_OF_MEMORY_VALUE = 5; /** - * - * *
      * Abusive behaviors have been identified on the current project.
      * 
@@ -226,6 +178,7 @@ public enum SymptomType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int PROJECT_ABUSE_VALUE = 6; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -250,57 +203,53 @@ public static SymptomType valueOf(int value) { */ public static SymptomType forNumber(int value) { switch (value) { - case 0: - return SYMPTOM_TYPE_UNSPECIFIED; - case 1: - return LOW_MEMORY; - case 2: - return OUT_OF_MEMORY; - case 3: - return EXECUTE_TIMED_OUT; - case 4: - return MESH_BUILD_FAIL; - case 5: - return HBM_OUT_OF_MEMORY; - case 6: - return PROJECT_ABUSE; - default: - return null; + case 0: return SYMPTOM_TYPE_UNSPECIFIED; + case 1: return LOW_MEMORY; + case 2: return OUT_OF_MEMORY; + case 3: return EXECUTE_TIMED_OUT; + case 4: return MESH_BUILD_FAIL; + case 5: return HBM_OUT_OF_MEMORY; + case 6: return PROJECT_ABUSE; + default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< + SymptomType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SymptomType findValueByNumber(int number) { + return SymptomType.forNumber(number); + } + }; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SymptomType findValueByNumber(int number) { - return SymptomType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { return getDescriptor(); } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { return com.google.cloud.tpu.v2alpha1.Symptom.getDescriptor().getEnumTypes().get(0); } private static final SymptomType[] VALUES = values(); - public static SymptomType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static SymptomType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -320,14 +269,11 @@ private SymptomType(int value) { public static final int CREATE_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp createTime_; /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ @java.lang.Override @@ -335,14 +281,11 @@ public boolean hasCreateTime() { return createTime_ != null; } /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ @java.lang.Override @@ -350,8 +293,6 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** - * - * *
    * Timestamp when the Symptom is created.
    * 
@@ -366,50 +307,38 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int SYMPTOM_TYPE_FIELD_NUMBER = 2; private int symptomType_; /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @return The enum numeric value on the wire for symptomType. */ - @java.lang.Override - public int getSymptomTypeValue() { + @java.lang.Override public int getSymptomTypeValue() { return symptomType_; } /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @return The symptomType. */ - @java.lang.Override - public com.google.cloud.tpu.v2alpha1.Symptom.SymptomType getSymptomType() { + @java.lang.Override public com.google.cloud.tpu.v2alpha1.Symptom.SymptomType getSymptomType() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Symptom.SymptomType result = - com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.valueOf(symptomType_); + com.google.cloud.tpu.v2alpha1.Symptom.SymptomType result = com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.valueOf(symptomType_); return result == null ? com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.UNRECOGNIZED : result; } public static final int DETAILS_FIELD_NUMBER = 3; private volatile java.lang.Object details_; /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The details. */ @java.lang.Override @@ -418,29 +347,29 @@ public java.lang.String getDetails() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; } } /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The bytes for details. */ @java.lang.Override - public com.google.protobuf.ByteString getDetailsBytes() { + public com.google.protobuf.ByteString + getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); details_ = b; return b; } else { @@ -451,14 +380,11 @@ public com.google.protobuf.ByteString getDetailsBytes() { public static final int WORKER_ID_FIELD_NUMBER = 4; private volatile java.lang.Object workerId_; /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The workerId. */ @java.lang.Override @@ -467,29 +393,29 @@ public java.lang.String getWorkerId() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); workerId_ = s; return s; } } /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The bytes for workerId. */ @java.lang.Override - public com.google.protobuf.ByteString getWorkerIdBytes() { + public com.google.protobuf.ByteString + getWorkerIdBytes() { java.lang.Object ref = workerId_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); workerId_ = b; return b; } else { @@ -498,7 +424,6 @@ public com.google.protobuf.ByteString getWorkerIdBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -510,12 +435,12 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } - if (symptomType_ - != com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { + if (symptomType_ != com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, symptomType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { @@ -534,11 +459,12 @@ public int getSerializedSize() { size = 0; if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); } - if (symptomType_ - != com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, symptomType_); + if (symptomType_ != com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.SYMPTOM_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, symptomType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, details_); @@ -554,7 +480,7 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.Symptom)) { return super.equals(obj); @@ -563,11 +489,14 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; + if (!getCreateTime() + .equals(other.getCreateTime())) return false; } if (symptomType_ != other.symptomType_) return false; - if (!getDetails().equals(other.getDetails())) return false; - if (!getWorkerId().equals(other.getWorkerId())) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!getWorkerId() + .equals(other.getWorkerId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -594,135 +523,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom(com.google.protobuf.ByteString data) + public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.Symptom parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.Symptom prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * A Symptom instance.
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.Symptom} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.Symptom) com.google.cloud.tpu.v2alpha1.SymptomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Symptom_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Symptom_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.Symptom.class, - com.google.cloud.tpu.v2alpha1.Symptom.Builder.class); + com.google.cloud.tpu.v2alpha1.Symptom.class, com.google.cloud.tpu.v2alpha1.Symptom.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.Symptom.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -742,9 +666,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_Symptom_descriptor; } @java.lang.Override @@ -763,8 +687,7 @@ public com.google.cloud.tpu.v2alpha1.Symptom build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.Symptom buildPartial() { - com.google.cloud.tpu.v2alpha1.Symptom result = - new com.google.cloud.tpu.v2alpha1.Symptom(this); + com.google.cloud.tpu.v2alpha1.Symptom result = new com.google.cloud.tpu.v2alpha1.Symptom(this); if (createTimeBuilder_ == null) { result.createTime_ = createTime_; } else { @@ -781,39 +704,38 @@ public com.google.cloud.tpu.v2alpha1.Symptom buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.Symptom) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.Symptom) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.Symptom)other); } else { super.mergeFrom(other); return this; @@ -862,37 +784,34 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 16: - { - symptomType_ = input.readEnum(); - - break; - } // case 16 - case 26: - { - details_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - workerId_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 16: { + symptomType_ = input.readEnum(); + + break; + } // case 16 + case 26: { + details_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + workerId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -905,47 +824,34 @@ public Builder mergeFrom( private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** - * - * *
      * Timestamp when the Symptom is created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return createTimeBuilder_ != null || createTime_ != null; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -966,15 +872,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
* * .google.protobuf.Timestamp create_time = 1; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); onChanged(); @@ -985,8 +890,6 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -997,7 +900,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (createTime_ != null) { createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); } else { createTime_ = value; } @@ -1009,8 +912,6 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1029,8 +930,6 @@ public Builder clearCreateTime() { return this; } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1038,13 +937,11 @@ public Builder clearCreateTime() { * .google.protobuf.Timestamp create_time = 1; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - + onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1055,14 +952,11 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** - * - * *
      * Timestamp when the Symptom is created.
      * 
@@ -1070,17 +964,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); createTime_ = null; } return createTimeBuilder_; @@ -1088,67 +979,51 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { private int symptomType_ = 0; /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @return The enum numeric value on the wire for symptomType. */ - @java.lang.Override - public int getSymptomTypeValue() { + @java.lang.Override public int getSymptomTypeValue() { return symptomType_; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @param value The enum numeric value on the wire for symptomType to set. * @return This builder for chaining. */ public Builder setSymptomTypeValue(int value) { - + symptomType_ = value; onChanged(); return this; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @return The symptomType. */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.Symptom.SymptomType getSymptomType() { @SuppressWarnings("deprecation") - com.google.cloud.tpu.v2alpha1.Symptom.SymptomType result = - com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.valueOf(symptomType_); - return result == null - ? com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.UNRECOGNIZED - : result; + com.google.cloud.tpu.v2alpha1.Symptom.SymptomType result = com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.valueOf(symptomType_); + return result == null ? com.google.cloud.tpu.v2alpha1.Symptom.SymptomType.UNRECOGNIZED : result; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @param value The symptomType to set. * @return This builder for chaining. */ @@ -1156,24 +1031,21 @@ public Builder setSymptomType(com.google.cloud.tpu.v2alpha1.Symptom.SymptomType if (value == null) { throw new NullPointerException(); } - + symptomType_ = value.getNumber(); onChanged(); return this; } /** - * - * *
      * Type of the Symptom.
      * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @return This builder for chaining. */ public Builder clearSymptomType() { - + symptomType_ = 0; onChanged(); return this; @@ -1181,20 +1053,18 @@ public Builder clearSymptomType() { private java.lang.Object details_ = ""; /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @return The details. */ public java.lang.String getDetails() { java.lang.Object ref = details_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); details_ = s; return s; @@ -1203,21 +1073,20 @@ public java.lang.String getDetails() { } } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @return The bytes for details. */ - public com.google.protobuf.ByteString getDetailsBytes() { + public com.google.protobuf.ByteString + getDetailsBytes() { java.lang.Object ref = details_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); details_ = b; return b; } else { @@ -1225,61 +1094,54 @@ public com.google.protobuf.ByteString getDetailsBytes() { } } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @param value The details to set. * @return This builder for chaining. */ - public Builder setDetails(java.lang.String value) { + public Builder setDetails( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + details_ = value; onChanged(); return this; } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @return This builder for chaining. */ public Builder clearDetails() { - + details_ = getDefaultInstance().getDetails(); onChanged(); return this; } /** - * - * *
      * Detailed information of the current Symptom.
      * 
* * string details = 3; - * * @param value The bytes for details to set. * @return This builder for chaining. */ - public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + details_ = value; onChanged(); return this; @@ -1287,20 +1149,18 @@ public Builder setDetailsBytes(com.google.protobuf.ByteString value) { private java.lang.Object workerId_ = ""; /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @return The workerId. */ public java.lang.String getWorkerId() { java.lang.Object ref = workerId_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); workerId_ = s; return s; @@ -1309,21 +1169,20 @@ public java.lang.String getWorkerId() { } } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @return The bytes for workerId. */ - public com.google.protobuf.ByteString getWorkerIdBytes() { + public com.google.protobuf.ByteString + getWorkerIdBytes() { java.lang.Object ref = workerId_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); workerId_ = b; return b; } else { @@ -1331,68 +1190,61 @@ public com.google.protobuf.ByteString getWorkerIdBytes() { } } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @param value The workerId to set. * @return This builder for chaining. */ - public Builder setWorkerId(java.lang.String value) { + public Builder setWorkerId( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + workerId_ = value; onChanged(); return this; } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @return This builder for chaining. */ public Builder clearWorkerId() { - + workerId_ = getDefaultInstance().getWorkerId(); onChanged(); return this; } /** - * - * *
      * A string used to uniquely distinguish a worker within a TPU node.
      * 
* * string worker_id = 4; - * * @param value The bytes for workerId to set. * @return This builder for chaining. */ - public Builder setWorkerIdBytes(com.google.protobuf.ByteString value) { + public Builder setWorkerIdBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + workerId_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1402,12 +1254,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.Symptom) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.Symptom) private static final com.google.cloud.tpu.v2alpha1.Symptom DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.Symptom(); } @@ -1416,27 +1268,27 @@ public static com.google.cloud.tpu.v2alpha1.Symptom getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Symptom parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symptom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1451,4 +1303,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.Symptom getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SymptomOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SymptomOrBuilder.java similarity index 71% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SymptomOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SymptomOrBuilder.java index 8d3ee93ede84..10c2a01cbd87 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SymptomOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/SymptomOrBuilder.java @@ -1,55 +1,31 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface SymptomOrBuilder - extends +public interface SymptomOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.Symptom) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return Whether the createTime field is set. */ boolean hasCreateTime(); /** - * - * *
    * Timestamp when the Symptom is created.
    * 
* * .google.protobuf.Timestamp create_time = 1; - * * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); /** - * - * *
    * Timestamp when the Symptom is created.
    * 
@@ -59,77 +35,61 @@ public interface SymptomOrBuilder com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @return The enum numeric value on the wire for symptomType. */ int getSymptomTypeValue(); /** - * - * *
    * Type of the Symptom.
    * 
* * .google.cloud.tpu.v2alpha1.Symptom.SymptomType symptom_type = 2; - * * @return The symptomType. */ com.google.cloud.tpu.v2alpha1.Symptom.SymptomType getSymptomType(); /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The details. */ java.lang.String getDetails(); /** - * - * *
    * Detailed information of the current Symptom.
    * 
* * string details = 3; - * * @return The bytes for details. */ - com.google.protobuf.ByteString getDetailsBytes(); + com.google.protobuf.ByteString + getDetailsBytes(); /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The workerId. */ java.lang.String getWorkerId(); /** - * - * *
    * A string used to uniquely distinguish a worker within a TPU node.
    * 
* * string worker_id = 4; - * * @return The bytes for workerId. */ - com.google.protobuf.ByteString getWorkerIdBytes(); + com.google.protobuf.ByteString + getWorkerIdBytes(); } diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequest.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequest.java similarity index 66% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequest.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequest.java index d44d082717b9..dfd9ca6c3620 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequest.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequest.java @@ -1,83 +1,62 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; /** - * - * *
  * Request for [UpdateNode][google.cloud.tpu.v2alpha1.Tpu.UpdateNode].
  * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.UpdateNodeRequest} */ -public final class UpdateNodeRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class UpdateNodeRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.tpu.v2alpha1.UpdateNodeRequest) UpdateNodeRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use UpdateNodeRequest.newBuilder() to construct. private UpdateNodeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - - private UpdateNodeRequest() {} + private UpdateNodeRequest() { + } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new UpdateNodeRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.class, - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.class, com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.Builder.class); } public static final int UPDATE_MASK_FIELD_NUMBER = 1; private com.google.protobuf.FieldMask updateMask_; /** - * - * *
    * Required. Mask of fields from [Node][Tpu.Node] to update.
-   * Supported fields: None.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
    * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the updateMask field is set. */ @java.lang.Override @@ -85,16 +64,13 @@ public boolean hasUpdateMask() { return updateMask_ != null; } /** - * - * *
    * Required. Mask of fields from [Node][Tpu.Node] to update.
-   * Supported fields: None.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
    * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return The updateMask. */ @java.lang.Override @@ -102,15 +78,13 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } /** - * - * *
    * Required. Mask of fields from [Node][Tpu.Node] to update.
-   * Supported fields: None.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
    * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @@ -120,15 +94,11 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public static final int NODE_FIELD_NUMBER = 2; private com.google.cloud.tpu.v2alpha1.Node node_; /** - * - * *
    * Required. The node. Only fields specified in update_mask are updated.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the node field is set. */ @java.lang.Override @@ -136,15 +106,11 @@ public boolean hasNode() { return node_ != null; } /** - * - * *
    * Required. The node. Only fields specified in update_mask are updated.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; * @return The node. */ @java.lang.Override @@ -152,14 +118,11 @@ public com.google.cloud.tpu.v2alpha1.Node getNode() { return node_ == null ? com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; } /** - * - * *
    * Required. The node. Only fields specified in update_mask are updated.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder() { @@ -167,7 +130,6 @@ public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -179,7 +141,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (updateMask_ != null) { output.writeMessage(1, getUpdateMask()); } @@ -196,10 +159,12 @@ public int getSerializedSize() { size = 0; if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); } if (node_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNode()); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNode()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -209,21 +174,22 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.cloud.tpu.v2alpha1.UpdateNodeRequest)) { return super.equals(obj); } - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest other = - (com.google.cloud.tpu.v2alpha1.UpdateNodeRequest) obj; + com.google.cloud.tpu.v2alpha1.UpdateNodeRequest other = (com.google.cloud.tpu.v2alpha1.UpdateNodeRequest) obj; if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; } if (hasNode() != other.hasNode()) return false; if (hasNode()) { - if (!getNode().equals(other.getNode())) return false; + if (!getNode() + .equals(other.getNode())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -249,136 +215,130 @@ public int hashCode() { return hash; } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.cloud.tpu.v2alpha1.UpdateNodeRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * Request for [UpdateNode][google.cloud.tpu.v2alpha1.Tpu.UpdateNode].
    * 
* * Protobuf type {@code google.cloud.tpu.v2alpha1.UpdateNodeRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.tpu.v2alpha1.UpdateNodeRequest) com.google.cloud.tpu.v2alpha1.UpdateNodeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_fieldAccessorTable + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.class, - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.Builder.class); + com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.class, com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.Builder.class); } // Construct using com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.newBuilder() - private Builder() {} + private Builder() { - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } @java.lang.Override public Builder clear() { super.clear(); @@ -398,9 +358,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.tpu.v2alpha1.CloudTpuProto - .internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tpu.v2alpha1.CloudTpuProto.internal_static_google_cloud_tpu_v2alpha1_UpdateNodeRequest_descriptor; } @java.lang.Override @@ -419,8 +379,7 @@ public com.google.cloud.tpu.v2alpha1.UpdateNodeRequest build() { @java.lang.Override public com.google.cloud.tpu.v2alpha1.UpdateNodeRequest buildPartial() { - com.google.cloud.tpu.v2alpha1.UpdateNodeRequest result = - new com.google.cloud.tpu.v2alpha1.UpdateNodeRequest(this); + com.google.cloud.tpu.v2alpha1.UpdateNodeRequest result = new com.google.cloud.tpu.v2alpha1.UpdateNodeRequest(this); if (updateMaskBuilder_ == null) { result.updateMask_ = updateMask_; } else { @@ -439,39 +398,38 @@ public com.google.cloud.tpu.v2alpha1.UpdateNodeRequest buildPartial() { public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.tpu.v2alpha1.UpdateNodeRequest) { - return mergeFrom((com.google.cloud.tpu.v2alpha1.UpdateNodeRequest) other); + return mergeFrom((com.google.cloud.tpu.v2alpha1.UpdateNodeRequest)other); } else { super.mergeFrom(other); return this; @@ -479,8 +437,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.cloud.tpu.v2alpha1.UpdateNodeRequest other) { - if (other == com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.getDefaultInstance()) - return this; + if (other == com.google.cloud.tpu.v2alpha1.UpdateNodeRequest.getDefaultInstance()) return this; if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } @@ -513,25 +470,26 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getNodeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getNodeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -544,58 +502,45 @@ public Builder mergeFrom( private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the updateMask field is set. */ public boolean hasUpdateMask() { return updateMaskBuilder_ != null || updateMask_ != null; } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return The updateMask. */ public com.google.protobuf.FieldMask getUpdateMask() { if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } else { return updateMaskBuilder_.getMessage(); } } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -611,17 +556,16 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { return this; } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { if (updateMaskBuilder_ == null) { updateMask_ = builderForValue.build(); onChanged(); @@ -632,21 +576,19 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal return this; } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { if (updateMask_ != null) { updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); } else { updateMask_ = value; } @@ -658,15 +600,13 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { return this; } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearUpdateMask() { if (updateMaskBuilder_ == null) { @@ -680,64 +620,54 @@ public Builder clearUpdateMask() { return this; } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - + onChanged(); return getUpdateMaskFieldBuilder().getBuilder(); } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { if (updateMaskBuilder_ != null) { return updateMaskBuilder_.getMessageOrBuilder(); } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } } /** - * - * *
      * Required. Mask of fields from [Node][Tpu.Node] to update.
-     * Supported fields: None.
+     * Supported fields: [description, tags, labels, metadata,
+     * network_config.enable_external_ips].
      * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> getUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); updateMask_ = null; } return updateMaskBuilder_; @@ -745,35 +675,24 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { private com.google.cloud.tpu.v2alpha1.Node node_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder> - nodeBuilder_; + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> nodeBuilder_; /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the node field is set. */ public boolean hasNode() { return nodeBuilder_ != null || node_ != null; } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; * @return The node. */ public com.google.cloud.tpu.v2alpha1.Node getNode() { @@ -784,14 +703,11 @@ public com.google.cloud.tpu.v2alpha1.Node getNode() { } } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setNode(com.google.cloud.tpu.v2alpha1.Node value) { if (nodeBuilder_ == null) { @@ -807,16 +723,14 @@ public Builder setNode(com.google.cloud.tpu.v2alpha1.Node value) { return this; } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ - public Builder setNode(com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { + public Builder setNode( + com.google.cloud.tpu.v2alpha1.Node.Builder builderForValue) { if (nodeBuilder_ == null) { node_ = builderForValue.build(); onChanged(); @@ -827,20 +741,17 @@ public Builder setNode(com.google.cloud.tpu.v2alpha1.Node.Builder builderForValu return this; } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeNode(com.google.cloud.tpu.v2alpha1.Node value) { if (nodeBuilder_ == null) { if (node_ != null) { node_ = - com.google.cloud.tpu.v2alpha1.Node.newBuilder(node_).mergeFrom(value).buildPartial(); + com.google.cloud.tpu.v2alpha1.Node.newBuilder(node_).mergeFrom(value).buildPartial(); } else { node_ = value; } @@ -852,14 +763,11 @@ public Builder mergeNode(com.google.cloud.tpu.v2alpha1.Node value) { return this; } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearNode() { if (nodeBuilder_ == null) { @@ -873,66 +781,55 @@ public Builder clearNode() { return this; } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.cloud.tpu.v2alpha1.Node.Builder getNodeBuilder() { - + onChanged(); return getNodeFieldBuilder().getBuilder(); } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder() { if (nodeBuilder_ != null) { return nodeBuilder_.getMessageOrBuilder(); } else { - return node_ == null ? com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; + return node_ == null ? + com.google.cloud.tpu.v2alpha1.Node.getDefaultInstance() : node_; } } /** - * - * *
      * Required. The node. Only fields specified in update_mask are updated.
      * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder> + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder> getNodeFieldBuilder() { if (nodeBuilder_ == null) { - nodeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.tpu.v2alpha1.Node, - com.google.cloud.tpu.v2alpha1.Node.Builder, - com.google.cloud.tpu.v2alpha1.NodeOrBuilder>( - getNode(), getParentForChildren(), isClean()); + nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tpu.v2alpha1.Node, com.google.cloud.tpu.v2alpha1.Node.Builder, com.google.cloud.tpu.v2alpha1.NodeOrBuilder>( + getNode(), + getParentForChildren(), + isClean()); node_ = null; } return nodeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -942,12 +839,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.tpu.v2alpha1.UpdateNodeRequest) } // @@protoc_insertion_point(class_scope:google.cloud.tpu.v2alpha1.UpdateNodeRequest) private static final com.google.cloud.tpu.v2alpha1.UpdateNodeRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.cloud.tpu.v2alpha1.UpdateNodeRequest(); } @@ -956,27 +853,27 @@ public static com.google.cloud.tpu.v2alpha1.UpdateNodeRequest getDefaultInstance return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateNodeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateNodeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -991,4 +888,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.cloud.tpu.v2alpha1.UpdateNodeRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequestOrBuilder.java b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequestOrBuilder.java similarity index 61% rename from java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequestOrBuilder.java rename to owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequestOrBuilder.java index 8a0ec26a4e6f..1e6d4f18b8b4 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequestOrBuilder.java +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/java/com/google/cloud/tpu/v2alpha1/UpdateNodeRequestOrBuilder.java @@ -1,104 +1,69 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tpu/v2alpha1/cloud_tpu.proto package com.google.cloud.tpu.v2alpha1; -public interface UpdateNodeRequestOrBuilder - extends +public interface UpdateNodeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tpu.v2alpha1.UpdateNodeRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. Mask of fields from [Node][Tpu.Node] to update.
-   * Supported fields: None.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
    * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); /** - * - * *
    * Required. Mask of fields from [Node][Tpu.Node] to update.
-   * Supported fields: None.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
    * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); /** - * - * *
    * Required. Mask of fields from [Node][Tpu.Node] to update.
-   * Supported fields: None.
+   * Supported fields: [description, tags, labels, metadata,
+   * network_config.enable_external_ips].
    * 
* - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); /** - * - * *
    * Required. The node. Only fields specified in update_mask are updated.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the node field is set. */ boolean hasNode(); /** - * - * *
    * Required. The node. Only fields specified in update_mask are updated.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; * @return The node. */ com.google.cloud.tpu.v2alpha1.Node getNode(); /** - * - * *
    * Required. The node. Only fields specified in update_mask are updated.
    * 
* - * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.cloud.tpu.v2alpha1.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; */ com.google.cloud.tpu.v2alpha1.NodeOrBuilder getNodeOrBuilder(); } diff --git a/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1/cloud_tpu.proto b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1/cloud_tpu.proto new file mode 100644 index 000000000000..b6f0623b7870 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/proto-google-cloud-tpu-v2alpha1/src/main/proto/google/cloud/tpu/v2alpha1/cloud_tpu.proto @@ -0,0 +1,1169 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.tpu.v2alpha1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/interval.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tpu/v2alpha1;tpu"; +option java_multiple_files = true; +option java_outer_classname = "CloudTpuProto"; +option java_package = "com.google.cloud.tpu.v2alpha1"; + +// Manages TPU nodes and other resources +// +// TPU API v2alpha1 +service Tpu { + option (google.api.default_host) = "tpu.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists nodes. + rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) { + option (google.api.http) = { + get: "/v2alpha1/{parent=projects/*/locations/*}/nodes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a node. + rpc GetNode(GetNodeRequest) returns (Node) { + option (google.api.http) = { + get: "/v2alpha1/{name=projects/*/locations/*/nodes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a node. + rpc CreateNode(CreateNodeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha1/{parent=projects/*/locations/*}/nodes" + body: "node" + }; + option (google.api.method_signature) = "parent,node,node_id"; + option (google.longrunning.operation_info) = { + response_type: "Node" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a node. + rpc DeleteNode(DeleteNodeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2alpha1/{name=projects/*/locations/*/nodes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Stops a node. This operation is only available with single TPU nodes. + rpc StopNode(StopNodeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:stop" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Node" + metadata_type: "OperationMetadata" + }; + } + + // Starts a node. + rpc StartNode(StartNodeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:start" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Node" + metadata_type: "OperationMetadata" + }; + } + + // Updates the configurations of a node. + rpc UpdateNode(UpdateNodeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2alpha1/{node.name=projects/*/locations/*/nodes/*}" + body: "node" + }; + option (google.api.method_signature) = "node,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Node" + metadata_type: "OperationMetadata" + }; + } + + // Lists queued resources. + rpc ListQueuedResources(ListQueuedResourcesRequest) returns (ListQueuedResourcesResponse) { + option (google.api.http) = { + get: "/v2alpha1/{parent=projects/*/locations/*}/queuedResources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a queued resource. + rpc GetQueuedResource(GetQueuedResourceRequest) returns (QueuedResource) { + option (google.api.http) = { + get: "/v2alpha1/{name=projects/*/locations/*/queuedResources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a QueuedResource TPU instance. + rpc CreateQueuedResource(CreateQueuedResourceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha1/{parent=projects/*/locations/*}/queuedResources" + body: "queued_resource" + }; + option (google.api.method_signature) = "parent,queued_resource,queued_resource_id"; + option (google.longrunning.operation_info) = { + response_type: "QueuedResource" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a QueuedResource TPU instance. + rpc DeleteQueuedResource(DeleteQueuedResourceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2alpha1/{name=projects/*/locations/*/queuedResources/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "QueuedResource" + metadata_type: "OperationMetadata" + }; + } + + // Generates the Cloud TPU service identity for the project. + rpc GenerateServiceIdentity(GenerateServiceIdentityRequest) returns (GenerateServiceIdentityResponse) { + option (google.api.http) = { + post: "/v2alpha1/{parent=projects/*/locations/*}:generateServiceIdentity" + body: "*" + }; + } + + // Lists accelerator types supported by this API. + rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) returns (ListAcceleratorTypesResponse) { + option (google.api.http) = { + get: "/v2alpha1/{parent=projects/*/locations/*}/acceleratorTypes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets AcceleratorType. + rpc GetAcceleratorType(GetAcceleratorTypeRequest) returns (AcceleratorType) { + option (google.api.http) = { + get: "/v2alpha1/{name=projects/*/locations/*/acceleratorTypes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists runtime versions supported by this API. + rpc ListRuntimeVersions(ListRuntimeVersionsRequest) returns (ListRuntimeVersionsResponse) { + option (google.api.http) = { + get: "/v2alpha1/{parent=projects/*/locations/*}/runtimeVersions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a runtime version. + rpc GetRuntimeVersion(GetRuntimeVersionRequest) returns (RuntimeVersion) { + option (google.api.http) = { + get: "/v2alpha1/{name=projects/*/locations/*/runtimeVersions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves the guest attributes for the node. + rpc GetGuestAttributes(GetGuestAttributesRequest) returns (GetGuestAttributesResponse) { + option (google.api.http) = { + post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:getGuestAttributes" + body: "*" + }; + } + + // Simulates a maintenance event. + rpc SimulateMaintenanceEvent(SimulateMaintenanceEventRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:simulateMaintenanceEvent" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Node" + metadata_type: "OperationMetadata" + }; + } +} + +// A guest attributes. +message GuestAttributes { + // The path to be queried. This can be the default namespace ('/') or a + // nested namespace ('/\/') or a specified key + // ('/\/\') + string query_path = 1; + + // The value of the requested queried path. + GuestAttributesValue query_value = 2; +} + +// Array of guest attribute namespace/key/value tuples. +message GuestAttributesValue { + // The list of guest attributes entries. + repeated GuestAttributesEntry items = 1; +} + +// A guest attributes namespace/key/value entry. +message GuestAttributesEntry { + // Namespace for the guest attribute entry. + string namespace = 1; + + // Key for the guest attribute entry. + string key = 2; + + // Value for the guest attribute entry. + string value = 3; +} + +// A node-attached disk resource. +// Next ID: 8; +message AttachedDisk { + // The different mode of the attached disk. + enum DiskMode { + // The disk mode is not known/set. + DISK_MODE_UNSPECIFIED = 0; + + // Attaches the disk in read-write mode. Only one TPU node can attach a disk + // in read-write mode at a time. + READ_WRITE = 1; + + // Attaches the disk in read-only mode. Multiple TPU nodes can attach + // a disk in read-only mode at a time. + READ_ONLY = 2; + } + + // Specifies the full path to an existing disk. + // For example: "projects/my-project/zones/us-central1-c/disks/my-disk". + string source_disk = 3; + + // The mode in which to attach this disk. + // If not specified, the default is READ_WRITE mode. + // Only applicable to data_disks. + DiskMode mode = 4; +} + +// Sets the scheduling options for this node. +message SchedulingConfig { + // Defines whether the node is preemptible. + bool preemptible = 1; + + // Whether the node is created under a reservation. + bool reserved = 2; +} + +// A network endpoint over which a TPU worker can be reached. +message NetworkEndpoint { + // The internal IP address of this network endpoint. + string ip_address = 1; + + // The port of this network endpoint. + int32 port = 2; + + // The access config for the TPU worker. + AccessConfig access_config = 5; +} + +// An access config attached to the TPU worker. +message AccessConfig { + // Output only. An external IP address associated with the TPU worker. + string external_ip = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Network related configurations. +message NetworkConfig { + // The name of the network for the TPU node. It must be a preexisting Google + // Compute Engine network. If none is provided, "default" will be used. + string network = 1; + + // The name of the subnetwork for the TPU node. It must be a preexisting + // Google Compute Engine subnetwork. If none is provided, "default" will be + // used. + string subnetwork = 2; + + // Indicates that external IP addresses would be associated with the TPU + // workers. If set to false, the specified subnetwork or network should have + // Private Google Access enabled. + bool enable_external_ips = 3; + + // Allows the TPU node to send and receive packets with non-matching + // destination or source IPs. This is required if you plan to use the TPU + // workers to forward routes. + bool can_ip_forward = 4; +} + +// A service account. +message ServiceAccount { + // Email address of the service account. If empty, default Compute service + // account will be used. + string email = 1; + + // The list of scopes to be made available for this service account. If empty, + // access to all Cloud APIs will be allowed. + repeated string scope = 2; +} + +// A TPU instance. +message Node { + option (google.api.resource) = { + type: "tpu.googleapis.com/Node" + pattern: "projects/{project}/locations/{location}/nodes/{node}" + }; + + // Represents the different states of a TPU node during its lifecycle. + enum State { + // TPU node state is not known/set. + STATE_UNSPECIFIED = 0; + + // TPU node is being created. + CREATING = 1; + + // TPU node has been created. + READY = 2; + + // TPU node is restarting. + RESTARTING = 3; + + // TPU node is undergoing reimaging. + REIMAGING = 4; + + // TPU node is being deleted. + DELETING = 5; + + // TPU node is being repaired and may be unusable. Details can be + // found in the 'help_description' field. + REPAIRING = 6; + + // TPU node is stopped. + STOPPED = 8; + + // TPU node is currently stopping. + STOPPING = 9; + + // TPU node is currently starting. + STARTING = 10; + + // TPU node has been preempted. Only applies to Preemptible TPU Nodes. + PREEMPTED = 11; + + // TPU node has been terminated due to maintenance or has reached the end of + // its life cycle (for preemptible nodes). + TERMINATED = 12; + + // TPU node is currently hiding. + HIDING = 13; + + // TPU node has been hidden. + HIDDEN = 14; + + // TPU node is currently unhiding. + UNHIDING = 15; + } + + // Health defines the status of a TPU node as reported by + // Health Monitor. + enum Health { + // Health status is unknown: not initialized or failed to retrieve. + HEALTH_UNSPECIFIED = 0; + + // The resource is healthy. + HEALTHY = 1; + + // The resource is unresponsive. + TIMEOUT = 3; + + // The in-guest ML stack is unhealthy. + UNHEALTHY_TENSORFLOW = 4; + + // The node is under maintenance/priority boost caused rescheduling and + // will resume running once rescheduled. + UNHEALTHY_MAINTENANCE = 5; + } + + // TPU API Version. + enum ApiVersion { + // API version is unknown. + API_VERSION_UNSPECIFIED = 0; + + // TPU API V1Alpha1 version. + V1_ALPHA1 = 1; + + // TPU API V1 version. + V1 = 2; + + // TPU API V2Alpha1 version. + V2_ALPHA1 = 3; + } + + // Output only. Immutable. The name of the TPU. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The user-supplied description of the TPU. Maximum of 512 characters. + string description = 3; + + // The type of hardware accelerators associated with this node. + string accelerator_type = 5; + + // Output only. The current state for the TPU Node. + State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If this field is populated, it contains a description of why the TPU Node + // is unhealthy. + string health_description = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The runtime version running in the Node. + string runtime_version = 11 [(google.api.field_behavior) = REQUIRED]; + + // Network configurations for the TPU node. + NetworkConfig network_config = 36; + + // The CIDR block that the TPU node will use when selecting an IP address. + // This CIDR block must be a /29 block; the Compute Engine networks API + // forbids a smaller block, and using a larger block would be wasteful (a + // node can only consume one IP address). Errors will occur if the CIDR block + // has already been used for a currently existing TPU node, the CIDR block + // conflicts with any subnetworks in the user's provided network, or the + // provided network is peered with another network that is using that CIDR + // block. + string cidr_block = 13; + + // The Google Cloud Platform Service Account to be used by the TPU node VMs. + // If None is specified, the default compute service account will be used. + ServiceAccount service_account = 37; + + // Output only. The time when the node was created. + google.protobuf.Timestamp create_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The scheduling options for this node. + SchedulingConfig scheduling_config = 17; + + // Output only. The network endpoints where TPU workers can be accessed and + // sent work. It is recommended that runtime clients of the node reach out + // to the 0th entry in this map first. + repeated NetworkEndpoint network_endpoints = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The health status of the TPU node. + Health health = 22; + + // Resource labels to represent user-provided metadata. + map labels = 24; + + // Custom metadata to apply to the TPU Node. + // Can set startup-script and shutdown-script + map metadata = 34; + + // Tags to apply to the TPU Node. Tags are used to identify valid sources or + // targets for network firewalls. + repeated string tags = 40; + + // Output only. The unique identifier for the TPU Node. + int64 id = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The additional data disks for the Node. + repeated AttachedDisk data_disks = 41; + + // Output only. The API version that created this Node. + ApiVersion api_version = 38 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Symptoms that have occurred to the TPU Node. + repeated Symptom symptoms = 39 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The qualified name of the QueuedResource that requested this Node. + string queued_resource = 43 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Shielded Instance options. + ShieldedInstanceConfig shielded_instance_config = 45; +} + +// A QueuedResource represents a request for resources that will be placed +// in a queue and fulfilled when the necessary resources are available. +message QueuedResource { + option (google.api.resource) = { + type: "tpu.googleapis.com/QueuedResource" + pattern: "projects/{project}/locations/{location}/queuedResources/{queued_resource}" + }; + + // Details of the TPU resource(s) being requested. + message Tpu { + // Details of the TPU node(s) being requested. Users can request either a + // single node or multiple nodes. + // NodeSpec provides the specification for node(s) to be created. + message NodeSpec { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + // regex format. This is only specified when requesting a single node. + // In case of multi-node requests, multi_node_params must be populated + // instead. It's an error to specify both node_id and multi_node_params. + string node_id = 2; + + // Required. The node. + Node node = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // The TPU node(s) being requested. + repeated NodeSpec node_spec = 1; + } + + // BestEffort tier definition. + message BestEffort { + + } + + // Guaranteed tier definition. + message Guaranteed { + // Optional. Defines the minimum duration of the guarantee. If specified, + // the requested resources will only be provisioned if they can be + // allocated for at least the given duration. + google.protobuf.Duration min_duration = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the request should be scheduled on reserved capacity. + bool reserved = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Defines the policy of the QueuedRequest. + message QueueingPolicy { + // Time flexibility specification. + oneof start_timing_constraints { + // A relative time after which resources should not be created. + // If the request cannot be fulfilled by this time the request will be + // failed. + google.protobuf.Duration valid_until_duration = 1; + + // An absolute time after which resources should not be created. + // If the request cannot be fulfilled by this time the request will be + // failed. + google.protobuf.Timestamp valid_until_time = 2; + + // A relative time after which resources may be created. + google.protobuf.Duration valid_after_duration = 3; + + // An absolute time at which resources may be created. + google.protobuf.Timestamp valid_after_time = 4; + + // An absolute time interval within which resources may be created. + google.type.Interval valid_interval = 5; + } + } + + // Output only. Immutable. The name of the QueuedResource. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Resource specification. + oneof resource { + // Defines a TPU resource. + Tpu tpu = 2; + } + + // Tier specifies the required tier. + oneof tier { + // The BestEffort tier. + BestEffort best_effort = 3; + + // The Guaranteed tier + Guaranteed guaranteed = 4; + } + + // The queueing policy of the QueuedRequest. + QueueingPolicy queueing_policy = 5; + + // Output only. State of the QueuedResource request + QueuedResourceState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// QueuedResourceState defines the details of the QueuedResource request. +message QueuedResourceState { + // Output only state of the request + enum State { + // State of the QueuedResource request is not known/set. + STATE_UNSPECIFIED = 0; + + // The QueuedResource request has been received. We're still working on + // determining if we will be able to honor this request. + CREATING = 1; + + // The QueuedResource request has passed initial validation/admission + // control and has been persisted in the queue. + ACCEPTED = 2; + + // The QueuedResource request has been selected. The + // associated resources are currently being provisioned (or very soon + // will begin provisioning). + PROVISIONING = 3; + + // The request could not be completed. This may be due to some + // late-discovered problem with the request itself, or due to + // unavailability of resources within the constraints of the request + // (e.g., the 'valid until' start timing constraint expired). + FAILED = 4; + + // The QueuedResource is being deleted. + DELETING = 5; + + // The resources specified in the QueuedResource request have been + // provisioned and are ready for use by the end-user/consumer. + ACTIVE = 6; + + // The resources specified in the QueuedResource request are being + // deleted. This may have been initiated by the user, or + // the Cloud TPU service. Inspect the state data for more details. + SUSPENDING = 7; + + // The resources specified in the QueuedResource request have been + // deleted. + SUSPENDED = 8; + } + + // Further data for the creating state. + message CreatingData { + + } + + // Further data for the accepted state. + message AcceptedData { + + } + + // Further data for the provisioning state. + message ProvisioningData { + + } + + // Further data for the failed state. + message FailedData { + // The error that caused the queued resource to enter the FAILED state. + google.rpc.Status error = 1; + } + + // Further data for the deleting state. + message DeletingData { + + } + + // Further data for the active state. + message ActiveData { + + } + + // Further data for the suspending state. + message SuspendingData { + + } + + // Further data for the suspended state. + message SuspendedData { + + } + + // State of the QueuedResource request. + State state = 1; + + // Further data for the state. + oneof state_data { + // Further data for the creating state. + CreatingData creating_data = 2; + + // Further data for the accepted state. + AcceptedData accepted_data = 3; + + // Further data for the provisioning state. + ProvisioningData provisioning_data = 4; + + // Further data for the failed state. + FailedData failed_data = 5; + + // Further data for the deleting state. + DeletingData deleting_data = 6; + + // Further data for the active state. + ActiveData active_data = 7; + + // Further data for the suspending state. + SuspendingData suspending_data = 8; + + // Further data for the suspended state. + SuspendedData suspended_data = 9; + } +} + +// Request for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes]. +message ListNodesRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "tpu.googleapis.com/Node" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// Response for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes]. +message ListNodesResponse { + // The listed nodes. + repeated Node nodes = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for [GetNode][google.cloud.tpu.v2alpha1.Tpu.GetNode]. +message GetNodeRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; +} + +// Request for [CreateNode][google.cloud.tpu.v2alpha1.Tpu.CreateNode]. +message CreateNodeRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The unqualified resource name. + string node_id = 2; + + // Required. The node. + Node node = 3 [(google.api.field_behavior) = REQUIRED]; + + // Idempotent request UUID. + string request_id = 6; +} + +// Request for [DeleteNode][google.cloud.tpu.v2alpha1.Tpu.DeleteNode]. +message DeleteNodeRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; + + // Idempotent request UUID. + string request_id = 3; +} + +// Request for [StopNode][google.cloud.tpu.v2alpha1.Tpu.StopNode]. +message StopNodeRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; +} + +// Request for [StartNode][google.cloud.tpu.v2alpha1.Tpu.StartNode]. +message StartNodeRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; +} + +// Request for [UpdateNode][google.cloud.tpu.v2alpha1.Tpu.UpdateNode]. +message UpdateNodeRequest { + // Required. Mask of fields from [Node][Tpu.Node] to update. + // Supported fields: [description, tags, labels, metadata, + // network_config.enable_external_ips]. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The node. Only fields specified in update_mask are updated. + Node node = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources]. +message ListQueuedResourcesRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "tpu.googleapis.com/QueuedResource" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// Response for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources]. +message ListQueuedResourcesResponse { + // The listed queued resources. + repeated QueuedResource queued_resources = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for [GetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.GetQueuedResource] +message GetQueuedResourceRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/QueuedResource" + } + ]; +} + +// Request for [CreateQueuedResource][google.cloud.tpu.v2alpha1.Tpu.CreateQueuedResource]. +message CreateQueuedResourceRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + // regex format. + string queued_resource_id = 2; + + // Required. The queued resource. + QueuedResource queued_resource = 3 [(google.api.field_behavior) = REQUIRED]; + + // Idempotent request UUID. + string request_id = 4; +} + +// Request for [DeleteQueuedResource][google.cloud.tpu.v2alpha1.Tpu.DeleteQueuedResource]. +message DeleteQueuedResourceRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/QueuedResource" + } + ]; + + // Idempotent request UUID. + string request_id = 2; +} + +// The per-product per-project service identity for Cloud TPU service. +message ServiceIdentity { + // The email address of the service identity. + string email = 1; +} + +// Request for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. +message GenerateServiceIdentityRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; +} + +// Response for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. +message GenerateServiceIdentityResponse { + // ServiceIdentity that was created or retrieved. + ServiceIdentity identity = 1; +} + +// A accelerator type that a Node can be configured with. +message AcceleratorType { + option (google.api.resource) = { + type: "tpu.googleapis.com/AcceleratorType" + pattern: "projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}" + }; + + // The resource name. + string name = 1; + + // The accelerator type. + string type = 2; +} + +// Request for [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType]. +message GetAcceleratorTypeRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/AcceleratorType" + } + ]; +} + +// Request for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. +message ListAcceleratorTypesRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "tpu.googleapis.com/AcceleratorType" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // List filter. + string filter = 5; + + // Sort results. + string order_by = 6; +} + +// Response for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. +message ListAcceleratorTypesResponse { + // The listed nodes. + repeated AcceleratorType accelerator_types = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A runtime version that a Node can be configured with. +message RuntimeVersion { + option (google.api.resource) = { + type: "tpu.googleapis.com/RuntimeVersion" + pattern: "projects/{project}/locations/{location}/runtimeVersions/{runtime_version}" + }; + + // The resource name. + string name = 1; + + // The runtime version. + string version = 2; +} + +// Request for [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion]. +message GetRuntimeVersionRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/RuntimeVersion" + } + ]; +} + +// Request for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. +message ListRuntimeVersionsRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "tpu.googleapis.com/RuntimeVersion" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // List filter. + string filter = 5; + + // Sort results. + string order_by = 6; +} + +// Response for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. +message ListRuntimeVersionsResponse { + // The listed nodes. + repeated RuntimeVersion runtime_versions = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} + +// A Symptom instance. +message Symptom { + // SymptomType represents the different types of Symptoms that a TPU can be + // at. + enum SymptomType { + // Unspecified symptom. + SYMPTOM_TYPE_UNSPECIFIED = 0; + + // TPU VM memory is low. + LOW_MEMORY = 1; + + // TPU runtime is out of memory. + OUT_OF_MEMORY = 2; + + // TPU runtime execution has timed out. + EXECUTE_TIMED_OUT = 3; + + // TPU runtime fails to construct a mesh that recognizes each TPU device's + // neighbors. + MESH_BUILD_FAIL = 4; + + // TPU HBM is out of memory. + HBM_OUT_OF_MEMORY = 5; + + // Abusive behaviors have been identified on the current project. + PROJECT_ABUSE = 6; + } + + // Timestamp when the Symptom is created. + google.protobuf.Timestamp create_time = 1; + + // Type of the Symptom. + SymptomType symptom_type = 2; + + // Detailed information of the current Symptom. + string details = 3; + + // A string used to uniquely distinguish a worker within a TPU node. + string worker_id = 4; +} + +// Request for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. +message GetGuestAttributesRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; + + // The guest attributes path to be queried. + string query_path = 2; + + // The 0-based worker ID. If it is empty, all workers' GuestAttributes will be + // returned. + repeated string worker_ids = 3; +} + +// Response for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. +message GetGuestAttributesResponse { + // The guest attributes for the TPU workers. + repeated GuestAttributes guest_attributes = 1; +} + +// Request for [SimulateMaintenanceEvent][google.cloud.tpu.v2alpha1.Tpu.SimulateMaintenanceEvent]. +message SimulateMaintenanceEventRequest { + // Required. The resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "tpu.googleapis.com/Node" + } + ]; + + // The 0-based worker ID. If it is empty, worker ID 0 will be selected for + // maintenance event simulation. A maintenance event will only be fired on the + // first specified worker ID. Future implementations may support firing on + // multiple workers. + repeated string worker_ids = 2; +} + +// A set of Shielded Instance options. +message ShieldedInstanceConfig { + // Defines whether the instance has Secure Boot enabled. + bool enable_secure_boot = 1; +} diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/stub/tpustubsettings/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/stub/tpustubsettings/getnode/SyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/stub/tpustubsettings/getnode/SyncGetNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/stub/tpustubsettings/getnode/SyncGetNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetCredentialsProvider.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/create/SyncCreateSetEndpoint.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNode.java similarity index 97% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNode.java index 34e7a466e490..41ac0d2eca61 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNode.java @@ -42,6 +42,7 @@ public static void asyncCreateNode() throws Exception { .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setNodeId("nodeId-1040171331") .setNode(Node.newBuilder().build()) + .setRequestId("requestId693933066") .build(); ApiFuture future = tpuClient.createNodeCallable().futureCall(request); // Do something. diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNodeLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNodeLRO.java similarity index 97% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNodeLRO.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNodeLRO.java index bd246636e65d..b351ca202b83 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNodeLRO.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/AsyncCreateNodeLRO.java @@ -42,6 +42,7 @@ public static void asyncCreateNodeLRO() throws Exception { .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setNodeId("nodeId-1040171331") .setNode(Node.newBuilder().build()) + .setRequestId("requestId693933066") .build(); OperationFuture future = tpuClient.createNodeOperationCallable().futureCall(request); diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNode.java similarity index 97% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNode.java index 130532da3ec1..29ea3e4ebe87 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNode.java @@ -40,6 +40,7 @@ public static void syncCreateNode() throws Exception { .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setNodeId("nodeId-1040171331") .setNode(Node.newBuilder().build()) + .setRequestId("requestId693933066") .build(); Node response = tpuClient.createNodeAsync(request).get(); } diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeLocationnameNodeString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeStringNodeString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeStringNodeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeStringNodeString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createnode/SyncCreateNodeStringNodeString.java diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResource.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResource.java new file mode 100644 index 000000000000..e0c32f9216d2 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_CreateQueuedResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.longrunning.Operation; + +public class AsyncCreateQueuedResource { + + public static void main(String[] args) throws Exception { + asyncCreateQueuedResource(); + } + + public static void asyncCreateQueuedResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + CreateQueuedResourceRequest request = + CreateQueuedResourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueuedResourceId("queuedResourceId437646236") + .setQueuedResource(QueuedResource.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = tpuClient.createQueuedResourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_CreateQueuedResource_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResourceLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResourceLRO.java new file mode 100644 index 000000000000..49c9bb39d92b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/AsyncCreateQueuedResourceLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_CreateQueuedResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.OperationMetadata; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class AsyncCreateQueuedResourceLRO { + + public static void main(String[] args) throws Exception { + asyncCreateQueuedResourceLRO(); + } + + public static void asyncCreateQueuedResourceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + CreateQueuedResourceRequest request = + CreateQueuedResourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueuedResourceId("queuedResourceId437646236") + .setQueuedResource(QueuedResource.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + tpuClient.createQueuedResourceOperationCallable().futureCall(request); + // Do something. + QueuedResource response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_CreateQueuedResource_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResource.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResource.java new file mode 100644 index 000000000000..1c2d5ea5614c --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_CreateQueuedResource_sync] +import com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncCreateQueuedResource { + + public static void main(String[] args) throws Exception { + syncCreateQueuedResource(); + } + + public static void syncCreateQueuedResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + CreateQueuedResourceRequest request = + CreateQueuedResourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQueuedResourceId("queuedResourceId437646236") + .setQueuedResource(QueuedResource.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + QueuedResource response = tpuClient.createQueuedResourceAsync(request).get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_CreateQueuedResource_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceLocationnameQueuedresourceString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceLocationnameQueuedresourceString.java new file mode 100644 index 000000000000..3a1c22d610c0 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceLocationnameQueuedresourceString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_CreateQueuedResource_LocationnameQueuedresourceString_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncCreateQueuedResourceLocationnameQueuedresourceString { + + public static void main(String[] args) throws Exception { + syncCreateQueuedResourceLocationnameQueuedresourceString(); + } + + public static void syncCreateQueuedResourceLocationnameQueuedresourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + QueuedResource queuedResource = QueuedResource.newBuilder().build(); + String queuedResourceId = "queuedResourceId437646236"; + QueuedResource response = + tpuClient.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_CreateQueuedResource_LocationnameQueuedresourceString_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceStringQueuedresourceString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceStringQueuedresourceString.java new file mode 100644 index 000000000000..5481f7bd33c0 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/createqueuedresource/SyncCreateQueuedResourceStringQueuedresourceString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_CreateQueuedResource_StringQueuedresourceString_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncCreateQueuedResourceStringQueuedresourceString { + + public static void main(String[] args) throws Exception { + syncCreateQueuedResourceStringQueuedresourceString(); + } + + public static void syncCreateQueuedResourceStringQueuedresourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + QueuedResource queuedResource = QueuedResource.newBuilder().build(); + String queuedResourceId = "queuedResourceId437646236"; + QueuedResource response = + tpuClient.createQueuedResourceAsync(parent, queuedResource, queuedResourceId).get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_CreateQueuedResource_StringQueuedresourceString_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNode.java similarity index 96% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNode.java index 16cbceab9499..c28b3aab2e25 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNode.java @@ -39,10 +39,11 @@ public static void asyncDeleteNode() throws Exception { DeleteNodeRequest request = DeleteNodeRequest.newBuilder() .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setRequestId("requestId693933066") .build(); ApiFuture future = tpuClient.deleteNodeCallable().futureCall(request); // Do something. - Operation response = future.get(); + future.get(); } } } diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNodeLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNodeLRO.java similarity index 92% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNodeLRO.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNodeLRO.java index 476cfb272726..435c3fbb58b0 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNodeLRO.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/AsyncDeleteNodeLRO.java @@ -19,10 +19,10 @@ // [START tpu_v2alpha1_generated_Tpu_DeleteNode_LRO_async] import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; -import com.google.cloud.tpu.v2alpha1.Node; import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.OperationMetadata; import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.protobuf.Empty; public class AsyncDeleteNodeLRO { @@ -40,11 +40,12 @@ public static void asyncDeleteNodeLRO() throws Exception { DeleteNodeRequest request = DeleteNodeRequest.newBuilder() .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setRequestId("requestId693933066") .build(); - OperationFuture future = + OperationFuture future = tpuClient.deleteNodeOperationCallable().futureCall(request); // Do something. - Node response = future.get(); + future.get(); } } } diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNode.java similarity index 92% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNode.java index f40e11359b72..19724d629ab7 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNode.java @@ -18,9 +18,9 @@ // [START tpu_v2alpha1_generated_Tpu_DeleteNode_sync] import com.google.cloud.tpu.v2alpha1.DeleteNodeRequest; -import com.google.cloud.tpu.v2alpha1.Node; import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.protobuf.Empty; public class SyncDeleteNode { @@ -38,8 +38,9 @@ public static void syncDeleteNode() throws Exception { DeleteNodeRequest request = DeleteNodeRequest.newBuilder() .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setRequestId("requestId693933066") .build(); - Node response = tpuClient.deleteNodeAsync(request).get(); + tpuClient.deleteNodeAsync(request).get(); } } } diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeNodename.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeNodename.java similarity index 93% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeNodename.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeNodename.java index 1bf705ef08ea..ff17001a610d 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeNodename.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeNodename.java @@ -17,9 +17,9 @@ package com.google.cloud.tpu.v2alpha1.samples; // [START tpu_v2alpha1_generated_Tpu_DeleteNode_Nodename_sync] -import com.google.cloud.tpu.v2alpha1.Node; import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.protobuf.Empty; public class SyncDeleteNodeNodename { @@ -35,7 +35,7 @@ public static void syncDeleteNodeNodename() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); - Node response = tpuClient.deleteNodeAsync(name).get(); + tpuClient.deleteNodeAsync(name).get(); } } } diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeString.java similarity index 93% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeString.java index 8effa2ea0484..457e447331cf 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeString.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletenode/SyncDeleteNodeString.java @@ -17,9 +17,9 @@ package com.google.cloud.tpu.v2alpha1.samples; // [START tpu_v2alpha1_generated_Tpu_DeleteNode_String_sync] -import com.google.cloud.tpu.v2alpha1.Node; import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.protobuf.Empty; public class SyncDeleteNodeString { @@ -35,7 +35,7 @@ public static void syncDeleteNodeString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { String name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString(); - Node response = tpuClient.deleteNodeAsync(name).get(); + tpuClient.deleteNodeAsync(name).get(); } } } diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResource.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResource.java new file mode 100644 index 000000000000..c254e61e3b8b --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResource.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteQueuedResource { + + public static void main(String[] args) throws Exception { + asyncDeleteQueuedResource(); + } + + public static void asyncDeleteQueuedResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + DeleteQueuedResourceRequest request = + DeleteQueuedResourceRequest.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = tpuClient.deleteQueuedResourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResourceLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResourceLRO.java new file mode 100644 index 000000000000..5af90a78c77a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/AsyncDeleteQueuedResourceLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.OperationMetadata; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class AsyncDeleteQueuedResourceLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteQueuedResourceLRO(); + } + + public static void asyncDeleteQueuedResourceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + DeleteQueuedResourceRequest request = + DeleteQueuedResourceRequest.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + tpuClient.deleteQueuedResourceOperationCallable().futureCall(request); + // Do something. + QueuedResource response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResource.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResource.java new file mode 100644 index 000000000000..ffb73af73a9c --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResource.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_sync] +import com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncDeleteQueuedResource { + + public static void main(String[] args) throws Exception { + syncDeleteQueuedResource(); + } + + public static void syncDeleteQueuedResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + DeleteQueuedResourceRequest request = + DeleteQueuedResourceRequest.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .setRequestId("requestId693933066") + .build(); + QueuedResource response = tpuClient.deleteQueuedResourceAsync(request).get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceQueuedresourcename.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceQueuedresourcename.java new file mode 100644 index 000000000000..869d0121b9a4 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceQueuedresourcename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_Queuedresourcename_sync] +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncDeleteQueuedResourceQueuedresourcename { + + public static void main(String[] args) throws Exception { + syncDeleteQueuedResourceQueuedresourcename(); + } + + public static void syncDeleteQueuedResourceQueuedresourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + QueuedResourceName name = + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]"); + QueuedResource response = tpuClient.deleteQueuedResourceAsync(name).get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_Queuedresourcename_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceString.java new file mode 100644 index 000000000000..f3b01d6e7867 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/deletequeuedresource/SyncDeleteQueuedResourceString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_String_sync] +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncDeleteQueuedResourceString { + + public static void main(String[] args) throws Exception { + syncDeleteQueuedResourceString(); + } + + public static void syncDeleteQueuedResourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String name = + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString(); + QueuedResource response = tpuClient.deleteQueuedResourceAsync(name).get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_DeleteQueuedResource_String_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/AsyncGenerateServiceIdentity.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/generateserviceidentity/SyncGenerateServiceIdentity.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/AsyncGetAcceleratorType.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/AsyncGetAcceleratorType.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/AsyncGetAcceleratorType.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/AsyncGetAcceleratorType.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorType.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorType.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorType.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorType.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeAcceleratortypename.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getacceleratortype/SyncGetAcceleratorTypeString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/AsyncGetGuestAttributes.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/AsyncGetGuestAttributes.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/AsyncGetGuestAttributes.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/AsyncGetGuestAttributes.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/SyncGetGuestAttributes.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/SyncGetGuestAttributes.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/SyncGetGuestAttributes.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getguestattributes/SyncGetGuestAttributes.java diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..4edb7fc987e0 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = tpuClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_GetLocation_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/SyncGetLocation.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..5f7bfb2bef9a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = tpuClient.getLocation(request); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_GetLocation_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/AsyncGetNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/AsyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/AsyncGetNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/AsyncGetNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeNodename.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeNodename.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeNodename.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeNodename.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getnode/SyncGetNodeString.java diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/AsyncGetQueuedResource.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/AsyncGetQueuedResource.java new file mode 100644 index 000000000000..890701e1ba2a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/AsyncGetQueuedResource.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_GetQueuedResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class AsyncGetQueuedResource { + + public static void main(String[] args) throws Exception { + asyncGetQueuedResource(); + } + + public static void asyncGetQueuedResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetQueuedResourceRequest request = + GetQueuedResourceRequest.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .build(); + ApiFuture future = tpuClient.getQueuedResourceCallable().futureCall(request); + // Do something. + QueuedResource response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_GetQueuedResource_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResource.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResource.java new file mode 100644 index 000000000000..c779b3f762ce --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResource.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_GetQueuedResource_sync] +import com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncGetQueuedResource { + + public static void main(String[] args) throws Exception { + syncGetQueuedResource(); + } + + public static void syncGetQueuedResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + GetQueuedResourceRequest request = + GetQueuedResourceRequest.newBuilder() + .setName( + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString()) + .build(); + QueuedResource response = tpuClient.getQueuedResource(request); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_GetQueuedResource_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceQueuedresourcename.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceQueuedresourcename.java new file mode 100644 index 000000000000..59b766c50891 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceQueuedresourcename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_GetQueuedResource_Queuedresourcename_sync] +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncGetQueuedResourceQueuedresourcename { + + public static void main(String[] args) throws Exception { + syncGetQueuedResourceQueuedresourcename(); + } + + public static void syncGetQueuedResourceQueuedresourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + QueuedResourceName name = + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]"); + QueuedResource response = tpuClient.getQueuedResource(name); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_GetQueuedResource_Queuedresourcename_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceString.java new file mode 100644 index 000000000000..1bdd0460e4fe --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getqueuedresource/SyncGetQueuedResourceString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_GetQueuedResource_String_sync] +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.QueuedResourceName; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncGetQueuedResourceString { + + public static void main(String[] args) throws Exception { + syncGetQueuedResourceString(); + } + + public static void syncGetQueuedResourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String name = + QueuedResourceName.of("[PROJECT]", "[LOCATION]", "[QUEUED_RESOURCE]").toString(); + QueuedResource response = tpuClient.getQueuedResource(name); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_GetQueuedResource_String_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/AsyncGetRuntimeVersion.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/AsyncGetRuntimeVersion.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/AsyncGetRuntimeVersion.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/AsyncGetRuntimeVersion.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersion.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersion.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersion.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersion.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionRuntimeversionname.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionString.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/getruntimeversion/SyncGetRuntimeVersionString.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java similarity index 91% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java index 8a4e39f603b5..91eb55771f18 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypes.java @@ -19,8 +19,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_async] import com.google.api.core.ApiFuture; import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.AcceleratorTypeName; import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class AsyncListAcceleratorTypes { @@ -38,9 +38,7 @@ public static void asyncListAcceleratorTypes() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListAcceleratorTypesRequest request = ListAcceleratorTypesRequest.newBuilder() - .setParent( - AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") - .toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java similarity index 92% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java index 324d85d1cb25..ea92aa546c10 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/AsyncListAcceleratorTypesPaged.java @@ -18,9 +18,9 @@ // [START tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_Paged_async] import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.AcceleratorTypeName; import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.TpuClient; import com.google.common.base.Strings; @@ -39,9 +39,7 @@ public static void asyncListAcceleratorTypesPaged() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListAcceleratorTypesRequest request = ListAcceleratorTypesRequest.newBuilder() - .setParent( - AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") - .toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java similarity index 90% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java index 7c25b9368e47..38a74fef5481 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypes.java @@ -18,8 +18,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_sync] import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.AcceleratorTypeName; import com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class SyncListAcceleratorTypes { @@ -37,9 +37,7 @@ public static void syncListAcceleratorTypes() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListAcceleratorTypesRequest request = ListAcceleratorTypesRequest.newBuilder() - .setParent( - AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]") - .toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java similarity index 72% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java index ae2c0509c9ee..da94f509e556 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesAcceleratortypename.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesLocationname.java @@ -16,30 +16,29 @@ package com.google.cloud.tpu.v2alpha1.samples; -// [START tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_Acceleratortypename_sync] +// [START tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_Locationname_sync] import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.AcceleratorTypeName; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.TpuClient; -public class SyncListAcceleratorTypesAcceleratortypename { +public class SyncListAcceleratorTypesLocationname { public static void main(String[] args) throws Exception { - syncListAcceleratorTypesAcceleratortypename(); + syncListAcceleratorTypesLocationname(); } - public static void syncListAcceleratorTypesAcceleratortypename() throws Exception { + public static void syncListAcceleratorTypesLocationname() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - AcceleratorTypeName parent = - AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) { // doThingsWith(element); } } } } -// [END tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_Acceleratortypename_sync] +// [END tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_Locationname_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java similarity index 90% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java index b376efc9d39b..287c5a58be89 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listacceleratortypes/SyncListAcceleratorTypesString.java @@ -18,7 +18,7 @@ // [START tpu_v2alpha1_generated_Tpu_ListAcceleratorTypes_String_sync] import com.google.cloud.tpu.v2alpha1.AcceleratorType; -import com.google.cloud.tpu.v2alpha1.AcceleratorTypeName; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class SyncListAcceleratorTypesString { @@ -34,8 +34,7 @@ public static void syncListAcceleratorTypesString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - String parent = - AcceleratorTypeName.of("[PROJECT]", "[LOCATION]", "[ACCELERATOR_TYPE]").toString(); + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (AcceleratorType element : tpuClient.listAcceleratorTypes(parent).iterateAll()) { // doThingsWith(element); } diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocations.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..6fd6bebc4fdd --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = tpuClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListLocations_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..a0717826e70e --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = tpuClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/SyncListLocations.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..9a707a074537 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : tpuClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListLocations_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodes.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodes.java similarity index 93% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodes.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodes.java index 4e556032923e..e8dfc5219fe6 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodes.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodes.java @@ -19,8 +19,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListNodes_async] import com.google.api.core.ApiFuture; import com.google.cloud.tpu.v2alpha1.ListNodesRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class AsyncListNodes { @@ -38,7 +38,7 @@ public static void asyncListNodes() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListNodesRequest request = ListNodesRequest.newBuilder() - .setParent(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodesPaged.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodesPaged.java similarity index 94% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodesPaged.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodesPaged.java index fcef34a90800..0a74cb9bc106 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodesPaged.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/AsyncListNodesPaged.java @@ -19,8 +19,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListNodes_Paged_async] import com.google.cloud.tpu.v2alpha1.ListNodesRequest; import com.google.cloud.tpu.v2alpha1.ListNodesResponse; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; import com.google.common.base.Strings; @@ -39,7 +39,7 @@ public static void asyncListNodesPaged() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListNodesRequest request = ListNodesRequest.newBuilder() - .setParent(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodes.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodes.java similarity index 93% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodes.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodes.java index 6e78a8343a3e..6559f840f73b 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodes.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodes.java @@ -18,8 +18,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListNodes_sync] import com.google.cloud.tpu.v2alpha1.ListNodesRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class SyncListNodes { @@ -37,7 +37,7 @@ public static void syncListNodes() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListNodesRequest request = ListNodesRequest.newBuilder() - .setParent(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesNodename.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesLocationname.java similarity index 77% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesNodename.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesLocationname.java index e9bde97e7794..180f257eb691 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesNodename.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesLocationname.java @@ -16,29 +16,29 @@ package com.google.cloud.tpu.v2alpha1.samples; -// [START tpu_v2alpha1_generated_Tpu_ListNodes_Nodename_sync] +// [START tpu_v2alpha1_generated_Tpu_ListNodes_Locationname_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; -public class SyncListNodesNodename { +public class SyncListNodesLocationname { public static void main(String[] args) throws Exception { - syncListNodesNodename(); + syncListNodesLocationname(); } - public static void syncListNodesNodename() throws Exception { + public static void syncListNodesLocationname() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - NodeName parent = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Node element : tpuClient.listNodes(parent).iterateAll()) { // doThingsWith(element); } } } } -// [END tpu_v2alpha1_generated_Tpu_ListNodes_Nodename_sync] +// [END tpu_v2alpha1_generated_Tpu_ListNodes_Locationname_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesString.java similarity index 92% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesString.java index 8bf2ea6b17f8..68fc5ac19797 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesString.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listnodes/SyncListNodesString.java @@ -17,8 +17,8 @@ package com.google.cloud.tpu.v2alpha1.samples; // [START tpu_v2alpha1_generated_Tpu_ListNodes_String_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.Node; -import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class SyncListNodesString { @@ -34,7 +34,7 @@ public static void syncListNodesString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - String parent = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString(); + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Node element : tpuClient.listNodes(parent).iterateAll()) { // doThingsWith(element); } diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResources.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResources.java new file mode 100644 index 000000000000..988f8dc88180 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResources.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListQueuedResources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class AsyncListQueuedResources { + + public static void main(String[] args) throws Exception { + asyncListQueuedResources(); + } + + public static void asyncListQueuedResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListQueuedResourcesRequest request = + ListQueuedResourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + tpuClient.listQueuedResourcesPagedCallable().futureCall(request); + // Do something. + for (QueuedResource element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListQueuedResources_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResourcesPaged.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResourcesPaged.java new file mode 100644 index 000000000000..1ea91583c7e5 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/AsyncListQueuedResourcesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListQueuedResources_Paged_async] +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest; +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse; +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.common.base.Strings; + +public class AsyncListQueuedResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncListQueuedResourcesPaged(); + } + + public static void asyncListQueuedResourcesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListQueuedResourcesRequest request = + ListQueuedResourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListQueuedResourcesResponse response = + tpuClient.listQueuedResourcesCallable().call(request); + for (QueuedResource element : response.getQueuedResourcesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListQueuedResources_Paged_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResources.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResources.java new file mode 100644 index 000000000000..9549ede72782 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResources.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListQueuedResources_sync] +import com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncListQueuedResources { + + public static void main(String[] args) throws Exception { + syncListQueuedResources(); + } + + public static void syncListQueuedResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + ListQueuedResourcesRequest request = + ListQueuedResourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (QueuedResource element : tpuClient.listQueuedResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListQueuedResources_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesLocationname.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesLocationname.java new file mode 100644 index 000000000000..d806ca892d75 --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListQueuedResources_Locationname_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncListQueuedResourcesLocationname { + + public static void main(String[] args) throws Exception { + syncListQueuedResourcesLocationname(); + } + + public static void syncListQueuedResourcesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (QueuedResource element : tpuClient.listQueuedResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListQueuedResources_Locationname_sync] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesString.java new file mode 100644 index 000000000000..9cafd9f86abf --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listqueuedresources/SyncListQueuedResourcesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_ListQueuedResources_String_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; +import com.google.cloud.tpu.v2alpha1.QueuedResource; +import com.google.cloud.tpu.v2alpha1.TpuClient; + +public class SyncListQueuedResourcesString { + + public static void main(String[] args) throws Exception { + syncListQueuedResourcesString(); + } + + public static void syncListQueuedResourcesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (QueuedResource element : tpuClient.listQueuedResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END tpu_v2alpha1_generated_Tpu_ListQueuedResources_String_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersions.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersions.java similarity index 92% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersions.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersions.java index d0c02b8051df..9edc96c7bcfd 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersions.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersions.java @@ -19,8 +19,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_async] import com.google.api.core.ApiFuture; import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.RuntimeVersionName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class AsyncListRuntimeVersions { @@ -38,8 +38,7 @@ public static void asyncListRuntimeVersions() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListRuntimeVersionsRequest request = ListRuntimeVersionsRequest.newBuilder() - .setParent( - RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java similarity index 93% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java index 9cea1243b636..8e35e7ea1199 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/AsyncListRuntimeVersionsPaged.java @@ -19,8 +19,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_Paged_async] import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.RuntimeVersionName; import com.google.cloud.tpu.v2alpha1.TpuClient; import com.google.common.base.Strings; @@ -39,8 +39,7 @@ public static void asyncListRuntimeVersionsPaged() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListRuntimeVersionsRequest request = ListRuntimeVersionsRequest.newBuilder() - .setParent( - RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersions.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersions.java similarity index 91% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersions.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersions.java index 72970f7a978f..abf47a694b78 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersions.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersions.java @@ -18,8 +18,8 @@ // [START tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_sync] import com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest; +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.RuntimeVersionName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class SyncListRuntimeVersions { @@ -37,8 +37,7 @@ public static void syncListRuntimeVersions() throws Exception { try (TpuClient tpuClient = TpuClient.create()) { ListRuntimeVersionsRequest request = ListRuntimeVersionsRequest.newBuilder() - .setParent( - RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString()) + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsRuntimeversionname.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java similarity index 73% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsRuntimeversionname.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java index e2a5b06a8f91..d2ff5d986f61 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsRuntimeversionname.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsLocationname.java @@ -16,30 +16,29 @@ package com.google.cloud.tpu.v2alpha1.samples; -// [START tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_Runtimeversionname_sync] +// [START tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_Locationname_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.RuntimeVersionName; import com.google.cloud.tpu.v2alpha1.TpuClient; -public class SyncListRuntimeVersionsRuntimeversionname { +public class SyncListRuntimeVersionsLocationname { public static void main(String[] args) throws Exception { - syncListRuntimeVersionsRuntimeversionname(); + syncListRuntimeVersionsLocationname(); } - public static void syncListRuntimeVersionsRuntimeversionname() throws Exception { + public static void syncListRuntimeVersionsLocationname() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - RuntimeVersionName parent = - RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]"); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) { // doThingsWith(element); } } } } -// [END tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_Runtimeversionname_sync] +// [END tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_Locationname_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsString.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsString.java similarity index 90% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsString.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsString.java index abe1466d56ad..629cdbba48fe 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsString.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/listruntimeversions/SyncListRuntimeVersionsString.java @@ -17,8 +17,8 @@ package com.google.cloud.tpu.v2alpha1.samples; // [START tpu_v2alpha1_generated_Tpu_ListRuntimeVersions_String_sync] +import com.google.cloud.tpu.v2alpha1.LocationName; import com.google.cloud.tpu.v2alpha1.RuntimeVersion; -import com.google.cloud.tpu.v2alpha1.RuntimeVersionName; import com.google.cloud.tpu.v2alpha1.TpuClient; public class SyncListRuntimeVersionsString { @@ -34,8 +34,7 @@ public static void syncListRuntimeVersionsString() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - String parent = - RuntimeVersionName.of("[PROJECT]", "[LOCATION]", "[RUNTIME_VERSION]").toString(); + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (RuntimeVersion element : tpuClient.listRuntimeVersions(parent).iterateAll()) { // doThingsWith(element); } diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java new file mode 100644 index 000000000000..81d94b775f3a --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_SimulateMaintenanceEvent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2alpha1.NodeName; +import com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest; +import com.google.cloud.tpu.v2alpha1.TpuClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncSimulateMaintenanceEvent { + + public static void main(String[] args) throws Exception { + asyncSimulateMaintenanceEvent(); + } + + public static void asyncSimulateMaintenanceEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + SimulateMaintenanceEventRequest request = + SimulateMaintenanceEventRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .addAllWorkerIds(new ArrayList()) + .build(); + ApiFuture future = + tpuClient.simulateMaintenanceEventCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_SimulateMaintenanceEvent_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java new file mode 100644 index 000000000000..f12d740e45ee --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_SimulateMaintenanceEvent_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.NodeName; +import com.google.cloud.tpu.v2alpha1.OperationMetadata; +import com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest; +import com.google.cloud.tpu.v2alpha1.TpuClient; +import java.util.ArrayList; + +public class AsyncSimulateMaintenanceEventLRO { + + public static void main(String[] args) throws Exception { + asyncSimulateMaintenanceEventLRO(); + } + + public static void asyncSimulateMaintenanceEventLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + SimulateMaintenanceEventRequest request = + SimulateMaintenanceEventRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .addAllWorkerIds(new ArrayList()) + .build(); + OperationFuture future = + tpuClient.simulateMaintenanceEventOperationCallable().futureCall(request); + // Do something. + Node response = future.get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_SimulateMaintenanceEvent_LRO_async] diff --git a/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java new file mode 100644 index 000000000000..8b832bb4ad9e --- /dev/null +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.tpu.v2alpha1.samples; + +// [START tpu_v2alpha1_generated_Tpu_SimulateMaintenanceEvent_sync] +import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.NodeName; +import com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest; +import com.google.cloud.tpu.v2alpha1.TpuClient; +import java.util.ArrayList; + +public class SyncSimulateMaintenanceEvent { + + public static void main(String[] args) throws Exception { + syncSimulateMaintenanceEvent(); + } + + public static void syncSimulateMaintenanceEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TpuClient tpuClient = TpuClient.create()) { + SimulateMaintenanceEventRequest request = + SimulateMaintenanceEventRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .addAllWorkerIds(new ArrayList()) + .build(); + Node response = tpuClient.simulateMaintenanceEventAsync(request).get(); + } + } +} +// [END tpu_v2alpha1_generated_Tpu_SimulateMaintenanceEvent_sync] diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNode.java similarity index 88% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNode.java index d33d7ae9ac20..b290a6f19048 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNode.java @@ -18,6 +18,7 @@ // [START tpu_v2alpha1_generated_Tpu_StartNode_async] import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.StartNodeRequest; import com.google.cloud.tpu.v2alpha1.TpuClient; import com.google.longrunning.Operation; @@ -35,7 +36,10 @@ public static void asyncStartNode() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); ApiFuture future = tpuClient.startNodeCallable().futureCall(request); // Do something. Operation response = future.get(); diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNodeLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNodeLRO.java similarity index 89% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNodeLRO.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNodeLRO.java index 5f9cb56ff40c..98ef81b501f1 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNodeLRO.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/AsyncStartNodeLRO.java @@ -19,6 +19,7 @@ // [START tpu_v2alpha1_generated_Tpu_StartNode_LRO_async] import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.OperationMetadata; import com.google.cloud.tpu.v2alpha1.StartNodeRequest; import com.google.cloud.tpu.v2alpha1.TpuClient; @@ -36,7 +37,10 @@ public static void asyncStartNodeLRO() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); OperationFuture future = tpuClient.startNodeOperationCallable().futureCall(request); // Do something. diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/SyncStartNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/SyncStartNode.java similarity index 87% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/SyncStartNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/SyncStartNode.java index 29dbe1ca8222..5fe04ef186e0 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/SyncStartNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/startnode/SyncStartNode.java @@ -18,6 +18,7 @@ // [START tpu_v2alpha1_generated_Tpu_StartNode_sync] import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.StartNodeRequest; import com.google.cloud.tpu.v2alpha1.TpuClient; @@ -34,7 +35,10 @@ public static void syncStartNode() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - StartNodeRequest request = StartNodeRequest.newBuilder().setName("name3373707").build(); + StartNodeRequest request = + StartNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); Node response = tpuClient.startNodeAsync(request).get(); } } diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNode.java similarity index 88% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNode.java index 4da002d7f3a6..d9b5fc6ac85a 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNode.java @@ -18,6 +18,7 @@ // [START tpu_v2alpha1_generated_Tpu_StopNode_async] import com.google.api.core.ApiFuture; +import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.StopNodeRequest; import com.google.cloud.tpu.v2alpha1.TpuClient; import com.google.longrunning.Operation; @@ -35,7 +36,10 @@ public static void asyncStopNode() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); ApiFuture future = tpuClient.stopNodeCallable().futureCall(request); // Do something. Operation response = future.get(); diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNodeLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNodeLRO.java similarity index 89% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNodeLRO.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNodeLRO.java index 32e2df51b220..54814fd3fd7f 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNodeLRO.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/AsyncStopNodeLRO.java @@ -19,6 +19,7 @@ // [START tpu_v2alpha1_generated_Tpu_StopNode_LRO_async] import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.OperationMetadata; import com.google.cloud.tpu.v2alpha1.StopNodeRequest; import com.google.cloud.tpu.v2alpha1.TpuClient; @@ -36,7 +37,10 @@ public static void asyncStopNodeLRO() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); OperationFuture future = tpuClient.stopNodeOperationCallable().futureCall(request); // Do something. diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/SyncStopNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/SyncStopNode.java similarity index 87% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/SyncStopNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/SyncStopNode.java index 56b23b6b24b8..05987adb887b 100644 --- a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/SyncStopNode.java +++ b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/stopnode/SyncStopNode.java @@ -18,6 +18,7 @@ // [START tpu_v2alpha1_generated_Tpu_StopNode_sync] import com.google.cloud.tpu.v2alpha1.Node; +import com.google.cloud.tpu.v2alpha1.NodeName; import com.google.cloud.tpu.v2alpha1.StopNodeRequest; import com.google.cloud.tpu.v2alpha1.TpuClient; @@ -34,7 +35,10 @@ public static void syncStopNode() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (TpuClient tpuClient = TpuClient.create()) { - StopNodeRequest request = StopNodeRequest.newBuilder().setName("name3373707").build(); + StopNodeRequest request = + StopNodeRequest.newBuilder() + .setName(NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]").toString()) + .build(); Node response = tpuClient.stopNodeAsync(request).get(); } } diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNodeLRO.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNodeLRO.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNodeLRO.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/AsyncUpdateNodeLRO.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNode.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpu/updatenode/SyncUpdateNodeNodeFieldmask.java diff --git a/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpusettings/getnode/SyncGetNode.java b/owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpusettings/getnode/SyncGetNode.java similarity index 100% rename from java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpusettings/getnode/SyncGetNode.java rename to owl-bot-staging/java-tpu/v2alpha1/samples/snippets/generated/com/google/cloud/tpu/v2alpha1/tpusettings/getnode/SyncGetNode.java